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