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