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