[82307a11] | 1 | # |
---|
| 2 | # $Id$ |
---|
| 3 | # |
---|
| 4 | |
---|
| 5 | @SET_MAKE@ |
---|
| 6 | srcdir = @srcdir@ |
---|
| 7 | top_srcdir = @top_srcdir@ |
---|
[6693a68] | 8 | top_builddir = ../../.. |
---|
| 9 | subdir = librdbg/i386/pc386 |
---|
[82307a11] | 10 | |
---|
[6693a68] | 11 | RTEMS_ROOT = @RTEMS_ROOT@ |
---|
[82307a11] | 12 | PROJECT_ROOT = @PROJECT_ROOT@ |
---|
| 13 | |
---|
| 14 | VPATH = @srcdir@:@srcdir@/..:@srcdir@/../.. |
---|
| 15 | |
---|
[6693a68] | 16 | LIBNAME = librdbg.a |
---|
| 17 | LIB = ${ARCH}/${LIBNAME} |
---|
[82307a11] | 18 | |
---|
| 19 | # C and C++ source names, if any, go here -- minus the .c or .cc |
---|
[981b99f] | 20 | C_PIECES = rdbg servcon servbkpt servrpc excep excep_f \ |
---|
| 21 | servtgt servtsp servutil _servtgt rdbg_f \ |
---|
| 22 | ptrace |
---|
| 23 | |
---|
[6693a68] | 24 | C_FILES = $(C_PIECES:%=%.c) |
---|
| 25 | C_O_FILES = $(C_PIECES:%=${ARCH}/%.o) |
---|
[82307a11] | 26 | |
---|
| 27 | # Asm source names, if any, go here -- minus the .s |
---|
[6693a68] | 28 | S_PIECES = rdbg_cpu_asm |
---|
| 29 | S_FILES = $(S_PIECES:%=%.S) |
---|
| 30 | S_O_FILES = $(S_PIECES:%=${ARCH}/%.o) |
---|
[82307a11] | 31 | |
---|
| 32 | # Generated C source names, if any, go here -- minus the .c |
---|
[6693a68] | 33 | GEN_C_PIECES = remdeb_xdr remdeb_svc |
---|
| 34 | GEN_C_FILES = $(GEN_C_PIECES:%=%.c) |
---|
| 35 | GEN_C_O_FILES = $(GEN_C_PIECES:%=${ARCH}/%.o) |
---|
[82307a11] | 36 | |
---|
| 37 | # H source names, if any, go here -- minus the .h |
---|
[6693a68] | 38 | H_PIECES = remdeb |
---|
| 39 | H_FILES = $(H_PIECES:%=%.h) |
---|
[82307a11] | 40 | |
---|
| 41 | # X source names |
---|
[6693a68] | 42 | X_FILES = remdeb.x remdeb_f.x |
---|
[82307a11] | 43 | |
---|
[6693a68] | 44 | SRCS = $(C_FILES) $(S_FILES) $(GEN_C_FILES) $(H_FILES) |
---|
| 45 | OBJS = $(GEN_C_O_FILES) $(C_O_FILES) $(S_O_FILES) |
---|
[82307a11] | 46 | |
---|
[6693a68] | 47 | RPCGEN = @RPCGEN@ |
---|
| 48 | AWK = @AWK@ |
---|
[82307a11] | 49 | |
---|
[6693a68] | 50 | include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg |
---|
[82307a11] | 51 | include $(RTEMS_ROOT)/make/lib.cfg |
---|
| 52 | |
---|
[6693a68] | 53 | INSTALL_CHANGE = @INSTALL_CHANGE@ |
---|
| 54 | mkinstalldirs = $(SHELL) $(top_srcdir)/@RTEMS_TOPdir@/mkinstalldirs |
---|
| 55 | |
---|
| 56 | INSTALLDIRS = $(PROJECT_INCLUDE)/rdbg |
---|
| 57 | |
---|
| 58 | $(INSTALLDIRS): |
---|
| 59 | @$(mkinstalldirs) $(INSTALLDIRS) |
---|
| 60 | |
---|
[82307a11] | 61 | # |
---|
| 62 | # Add local stuff here using += |
---|
| 63 | # |
---|
| 64 | |
---|
[6693a68] | 65 | DEFINES += |
---|
[82307a11] | 66 | CPPFLAGS += |
---|
[6693a68] | 67 | CFLAGS += |
---|
[82307a11] | 68 | |
---|
| 69 | # |
---|
| 70 | # Add your list of files to delete here. The config files |
---|
| 71 | # already know how to delete some stuff, so you may want |
---|
| 72 | # to just run 'make clean' first to see what gets missed. |
---|
| 73 | # 'make clobber' already includes 'make clean' |
---|
| 74 | # |
---|
| 75 | |
---|
[6693a68] | 76 | CLEAN_ADDITIONS += $(LIB) $(H_FILES) $(GEN_C_FILES) |
---|
[82307a11] | 77 | CLOBBER_ADDITIONS += |
---|
| 78 | |
---|
[6693a68] | 79 | FRONTEND = \"$(RTEMS_CPU)/@RTEMS_BSP@/remdeb_f.x\" |
---|
[82307a11] | 80 | |
---|
[6693a68] | 81 | all: ${ARCH} $(LIB) |
---|
[1896a650] | 82 | @$(INSTALL_VARIANT) -m 644 $(LIB) $(PROJECT_RELEASE)/lib |
---|
[82307a11] | 83 | |
---|
| 84 | $(LIB): $(SRCS) ${OBJS} |
---|
| 85 | $(make-library) |
---|
| 86 | |
---|
| 87 | remdeb.h: $(X_FILES) |
---|
| 88 | @rm -f $@ |
---|
[6693a68] | 89 | ( pwd=`pwd`; cd $(srcdir)/../..; \ |
---|
[82307a11] | 90 | $(RPCGEN) -h -DFRONTEND=$(FRONTEND) \ |
---|
[6693a68] | 91 | -o $$pwd/$@ remdeb.x ) |
---|
[1896a650] | 92 | @$(INSTALL_CHANGE) -m 755 $@ $(PROJECT_INCLUDE)/rdbg |
---|
[82307a11] | 93 | |
---|
| 94 | remdeb_xdr.c: $(X_FILES) |
---|
| 95 | @rm -f $@ |
---|
[6693a68] | 96 | ( pwd=`pwd`; cd $(srcdir)/../..; \ |
---|
[82307a11] | 97 | $(RPCGEN) -c -DFRONTEND=$(FRONTEND) \ |
---|
[6693a68] | 98 | -o $$pwd/$@ remdeb.x ) |
---|
[82307a11] | 99 | |
---|
| 100 | remdeb_svc.c: $(X_FILES) |
---|
| 101 | @rm -f $@ tmpSvc.c |
---|
[6693a68] | 102 | ( pwd=`pwd`; cd $(srcdir)/../..; \ |
---|
[82307a11] | 103 | $(RPCGEN) -s udp -DFRONTEND=$(FRONTEND) \ |
---|
[6693a68] | 104 | -o $$pwd/tmpSvc.c remdeb.x ) |
---|
| 105 | $(AWK) -f $(srcdir)/../../awk.svc THEPROG="remdeb.h" tmpSvc.c >$@ |
---|
[82307a11] | 106 | @rm -f tmpSvc.c |
---|
| 107 | |
---|
[08b5f55] | 108 | Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status |
---|
[82307a11] | 109 | cd $(top_builddir) \ |
---|
| 110 | && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status |
---|