[4721cf1] | 1 | # |
---|
| 2 | # $Id$ |
---|
| 3 | # |
---|
| 4 | |
---|
| 5 | @SET_MAKE@ |
---|
| 6 | srcdir = @srcdir@ |
---|
| 7 | VPATH = @srcdir@:@srcdir@/$(RTEMS_CPU) |
---|
| 8 | RTEMS_ROOT = @top_srcdir@ |
---|
| 9 | PROJECT_ROOT = @PROJECT_ROOT@ |
---|
| 10 | |
---|
[8548fe0] | 11 | INSTALL = @INSTALL@ |
---|
| 12 | |
---|
[4721cf1] | 13 | LIBNAME=librdbg.a |
---|
| 14 | LIB=${ARCH}/${LIBNAME} |
---|
| 15 | |
---|
| 16 | # C and C++ source names, if any, go here -- minus the .c or .cc |
---|
| 17 | C_PIECES= rdbg servcon servbkpt servrpc excep \ |
---|
| 18 | servtgt servtsp servutil _servtgt rdbg_f \ |
---|
| 19 | ptrace |
---|
| 20 | C_FILES=$(C_PIECES:%=%.c) |
---|
| 21 | C_O_FILES=$(C_PIECES:%=${ARCH}/%.o) |
---|
| 22 | |
---|
| 23 | # Asm source names, if any, go here -- minus the .s |
---|
| 24 | ASM_PIECES= rdbg_cpu_asm |
---|
| 25 | ASM_FILES=$(ASM_PIECES:%=%.s) |
---|
| 26 | ASM_O_FILES=$(ASM_PIECES:%=${ARCH}/%.o) |
---|
| 27 | |
---|
| 28 | # Generated C source names, if any, go here -- minus the .c |
---|
| 29 | C_GEN_PIECES= remdeb_xdr remdeb_svc |
---|
| 30 | C_GEN_FILES=$(C_GEN_PIECES:%=%.c) |
---|
| 31 | C_GEN_O_FILES=$(C_GEN_PIECES:%=${ARCH}/%.o) |
---|
| 32 | |
---|
| 33 | # H source names, if any, go here -- minus the .h |
---|
| 34 | H_PIECES=remdeb |
---|
| 35 | H_FILES=$(H_PIECES:%=%.h) |
---|
| 36 | |
---|
| 37 | # X source names, if any, go here -- minus the .x |
---|
| 38 | X_FILE1=remdeb.x |
---|
| 39 | X_FILE2=remdeb_f.x |
---|
| 40 | X_FILES=$(X_FILE1) $(X_FILE2) |
---|
| 41 | |
---|
| 42 | SRCS=$(C_FILES) $(ASM_FILES) |
---|
| 43 | OBJS=$(X_FILES) $(H_FILES) $(C_GEN_FILES) $(C_GEN_O_FILES) $(C_O_FILES) $(ASM_O_FILES) |
---|
| 44 | |
---|
| 45 | RPCGEN=rpcgen |
---|
| 46 | AWK=awk |
---|
| 47 | |
---|
| 48 | include $(RTEMS_ROOT)/make/custom/$(RTEMS_BSP).cfg |
---|
| 49 | include $(RTEMS_ROOT)/make/lib.cfg |
---|
| 50 | |
---|
| 51 | # |
---|
| 52 | # Add local stuff here using += |
---|
| 53 | # |
---|
| 54 | |
---|
| 55 | DEFINES += |
---|
| 56 | CPPFLAGS += |
---|
| 57 | CFLAGS += |
---|
| 58 | |
---|
| 59 | # |
---|
| 60 | # Add your list of files to delete here. The config files |
---|
| 61 | # already know how to delete some stuff, so you may want |
---|
| 62 | # to just run 'make clean' first to see what gets missed. |
---|
| 63 | # 'make clobber' already includes 'make clean' |
---|
| 64 | # |
---|
| 65 | |
---|
| 66 | CLEAN_ADDITIONS += $(LIB) $(H_FILES) $(X_FILES) $(C_GEN_FILES) |
---|
| 67 | CLOBBER_ADDITIONS += |
---|
| 68 | |
---|
| 69 | all: ${ARCH} $(LIB) |
---|
| 70 | $(INSTALL_VARIANT) -m 644 $(LIB) ${PROJECT_RELEASE}/lib |
---|
| 71 | |
---|
| 72 | $(LIB): $(SRCS) ${OBJS} |
---|
| 73 | $(make-library) |
---|
| 74 | |
---|
| 75 | remdeb.h: $(X_FILES) |
---|
| 76 | @rm -f $@ |
---|
| 77 | $(RPCGEN) -h remdeb.x -o $@ |
---|
| 78 | @rm -f $(PROJECT_INCLUDE)/rdbg/$@ |
---|
[8548fe0] | 79 | $(INSTALL_CHANGE) -m 444 $@ $(PROJECT_INCLUDE)/rdbg |
---|
[4721cf1] | 80 | |
---|
| 81 | remdeb_xdr.c: $(X_FILES) |
---|
| 82 | @rm -f $@ |
---|
| 83 | $(RPCGEN) -c remdeb.x -o $@ |
---|
| 84 | |
---|
| 85 | remdeb_svc.c: $(X_FILES) |
---|
| 86 | @rm -f $@ tmpSvc.c |
---|
| 87 | $(RPCGEN) -s udp remdeb.x -o tmpSvc.c |
---|
| 88 | $(AWK) -f @srcdir@/awk.svc THEPROG="remdeb.h" tmpSvc.c >$@ |
---|
| 89 | @rm -f tmpSvc.c |
---|
| 90 | |
---|
| 91 | preinstall: |
---|
| 92 | @rm -f $(X_FILES) |
---|
| 93 | @cp @srcdir@/$(X_FILE1) . |
---|
| 94 | @cp @srcdir@/$(RTEMS_CPU)/$(RTEMS_BSP)/$(X_FILE2) . |
---|
| 95 | |
---|
| 96 | |
---|
| 97 | |
---|
| 98 | |
---|