[23e3f642] | 1 | ## |
---|
| 2 | ## $Id$ |
---|
| 3 | ## |
---|
| 4 | |
---|
| 5 | |
---|
| 6 | VPATH = @srcdir@:@srcdir@/..:@srcdir@/../.. |
---|
| 7 | |
---|
[e37d7196] | 8 | RPCCPUDIR = $(RTEMS_CPU)/any |
---|
| 9 | |
---|
[23e3f642] | 10 | LIBNAME = librdbg |
---|
| 11 | LIB = ${ARCH}/${LIBNAME}.a |
---|
| 12 | |
---|
[4e36a2f] | 13 | # C and C++ source names |
---|
[23e3f642] | 14 | C_FILES = rdbg.c servcon.c servbkpt.c servrpc.c excep.c excep_f.c servtgt.c \ |
---|
| 15 | servtsp.c servutil.c _servtgt.c rdbg_f.c ptrace.c |
---|
[c6bb4fa4] | 16 | C_O_FILES = $(C_FILES:%.c=${ARCH}/%.$(OBJEXT)) |
---|
[23e3f642] | 17 | |
---|
[4e36a2f] | 18 | # Asm source names |
---|
[23e3f642] | 19 | S_FILES = rdbg_cpu_asm.S |
---|
[c6bb4fa4] | 20 | S_O_FILES = $(S_FILES:%.S=${ARCH}/%.$(OBJEXT)) |
---|
[23e3f642] | 21 | |
---|
[4e36a2f] | 22 | # Generated C source names |
---|
[23e3f642] | 23 | GEN_C_FILES = remdeb_xdr.c remdeb_svc.c |
---|
[c6bb4fa4] | 24 | GEN_C_O_FILES = $(GEN_C_FILES:%.c=${ARCH}/%.$(OBJEXT)) |
---|
[23e3f642] | 25 | |
---|
[4e36a2f] | 26 | # H source names |
---|
[23e3f642] | 27 | H_FILES = remdeb.h |
---|
| 28 | |
---|
| 29 | # X source names |
---|
| 30 | X_FILES = remdeb.x remdeb_f.x |
---|
| 31 | |
---|
| 32 | OBJS = $(GEN_C_O_FILES) $(C_O_FILES) $(S_O_FILES) |
---|
| 33 | |
---|
[a8c829c] | 34 | MAINTAINERCLEANFILES = $(H_FILES) $(GEN_C_FILES) |
---|
| 35 | |
---|
[23e3f642] | 36 | include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg |
---|
[e37d7196] | 37 | include $(top_srcdir)/../../automake/compile.am |
---|
| 38 | include $(top_srcdir)/../../automake/lib.am |
---|
[23e3f642] | 39 | |
---|
| 40 | # |
---|
| 41 | # Add local stuff here using += |
---|
| 42 | # |
---|
| 43 | |
---|
[e37d7196] | 44 | FRONTEND = \"$(RPCCPUDIR)/remdeb_f.x\" |
---|
[23e3f642] | 45 | |
---|
[df49c60] | 46 | $(PROJECT_RELEASE)/lib/$(LIBNAME)$(LIB_VARIANT).a: $(LIB) |
---|
[23e3f642] | 47 | $(INSTALL_DATA) $< $@ |
---|
| 48 | |
---|
| 49 | $(LIB): ${OBJS} |
---|
| 50 | $(make-library) |
---|
| 51 | |
---|
[4c3ab846] | 52 | $(srcdir)/remdeb.h: $(X_FILES) |
---|
| 53 | if RPCTOOLS |
---|
[23e3f642] | 54 | @rm -f $@ |
---|
[e37d7196] | 55 | ( cd $(top_srcdir)/librdbg/src; \ |
---|
[23e3f642] | 56 | $(RPCGEN) -h -DFRONTEND=$(FRONTEND) \ |
---|
[e37d7196] | 57 | -o $(RPCCPUDIR)/remdeb.h remdeb.x ) |
---|
[4c3ab846] | 58 | endif |
---|
| 59 | $(srcdir)/remdeb_xdr.c: $(X_FILES) |
---|
| 60 | if RPCTOOLS |
---|
[23e3f642] | 61 | @rm -f $@ |
---|
[e37d7196] | 62 | ( cd $(top_srcdir)/librdbg/src; \ |
---|
[23e3f642] | 63 | $(RPCGEN) -c -DFRONTEND=$(FRONTEND) \ |
---|
[e37d7196] | 64 | -o $(RPCCPUDIR)/remdeb_xdr.c remdeb.x ) |
---|
[4c3ab846] | 65 | endif |
---|
[23e3f642] | 66 | |
---|
[4c3ab846] | 67 | $(srcdir)/remdeb_svc.c: $(X_FILES) |
---|
| 68 | if RPCTOOLS |
---|
[23e3f642] | 69 | @rm -f $@ tmpSvc.c |
---|
[e37d7196] | 70 | ( cd $(top_srcdir)/librdbg/src; \ |
---|
[4c3ab846] | 71 | $(RPCGEN) -m -DFRONTEND=$(FRONTEND) \ |
---|
[e37d7196] | 72 | -o $(RPCCPUDIR)/tmpSvc.c remdeb.x; \ |
---|
| 73 | $(AWK) -f ./awk.svc THEPROG="remdeb.h" $(RPCCPUDIR)/tmpSvc.c \ |
---|
| 74 | > $(RPCCPUDIR)/remdeb_svc.c; \ |
---|
| 75 | sed -e 's/fprintf.*,/printf(/' $(RPCCPUDIR)/remdeb_svc.c > $(RPCCPUDIR)/remdeb_svc.tmp; \ |
---|
| 76 | mv $(RPCCPUDIR)/remdeb_svc.tmp $(RPCCPUDIR)/remdeb_svc.c; \ |
---|
| 77 | rm -f $(RPCCPUDIR)/tmpSvc.c ) |
---|
[4c3ab846] | 78 | endif |
---|
| 79 | |
---|
| 80 | $(PROJECT_INCLUDE)/rdbg/remdeb.h: $(srcdir)/remdeb.h |
---|
| 81 | $(INSTALL_DATA) $< $@ |
---|
| 82 | |
---|
| 83 | $(PROJECT_INCLUDE)/rdbg: |
---|
| 84 | @$(mkinstalldirs) $@ |
---|
| 85 | |
---|
[7258b7a] | 86 | PREINSTALL_FILES = $(PROJECT_INCLUDE)/rdbg $(PROJECT_INCLUDE)/rdbg/remdeb.h |
---|
[4c3ab846] | 87 | |
---|
[df49c60] | 88 | TMPINSTALL_FILES += $(PROJECT_RELEASE)/lib/$(LIBNAME)$(LIB_VARIANT).a |
---|
[4c3ab846] | 89 | |
---|
| 90 | all-local: ${ARCH} $(PREINSTALL_FILES) $(TMPINSTALL_FILES) |
---|
[23e3f642] | 91 | |
---|
[4c3ab846] | 92 | EXTRA_DIST = remdeb_f.x $(GEN_C_FILES) |
---|
[23e3f642] | 93 | |
---|
[e37d7196] | 94 | include $(top_srcdir)/../../automake/local.am |
---|