1 | ## |
---|
2 | ## $Id$ |
---|
3 | ## |
---|
4 | |
---|
5 | AUTOMAKE_OPTIONS = foreign 1.4 |
---|
6 | |
---|
7 | VPATH = @srcdir@:@srcdir@/..:@srcdir@/../.. |
---|
8 | |
---|
9 | LIBNAME = librdbg |
---|
10 | LIB = ${ARCH}/${LIBNAME}.a |
---|
11 | |
---|
12 | # C and C++ source names, if any, go here -- minus the .c or .cc |
---|
13 | C_FILES = rdbg.c servcon.c servbkpt.c servrpc.c excep.c excep_f.c servtgt.c \ |
---|
14 | servtsp.c servutil.c _servtgt.c rdbg_f.c ptrace.c |
---|
15 | C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o) |
---|
16 | |
---|
17 | # Asm source names, if any, go here -- minus the .s |
---|
18 | S_FILES = rdbg_cpu_asm.S |
---|
19 | S_O_FILES = $(S_FILES:%.S=${ARCH}/%.o) |
---|
20 | |
---|
21 | # Generated C source names, if any, go here -- minus the .c |
---|
22 | GEN_C_FILES = remdeb_xdr.c remdeb_svc.c |
---|
23 | GEN_C_O_FILES = $(GEN_C_PIECES:%.c=${ARCH}/%.o) |
---|
24 | |
---|
25 | # H source names, if any, go here -- minus the .h |
---|
26 | H_FILES = remdeb.h |
---|
27 | |
---|
28 | # X source names |
---|
29 | X_FILES = remdeb.x remdeb_f.x |
---|
30 | |
---|
31 | OBJS = $(GEN_C_O_FILES) $(C_O_FILES) $(S_O_FILES) |
---|
32 | |
---|
33 | include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg |
---|
34 | include $(top_srcdir)/../../../automake/lib.am |
---|
35 | |
---|
36 | PREINSTALL_FILES = \ |
---|
37 | $(PROJECT_INCLUDE)/rdbg \ |
---|
38 | $(PROJECT_INCLUDE)/rdbg/remdeb.h |
---|
39 | |
---|
40 | $(PROJECT_INCLUDE)/rdbg: |
---|
41 | @$(mkinstalldirs) $@ |
---|
42 | |
---|
43 | TMPINSTALL_FILES += \ |
---|
44 | $(PROJECT_RELEASE)/lib/$(LIBNAME)$(LIBVARIANT).a |
---|
45 | |
---|
46 | # |
---|
47 | # Add local stuff here using += |
---|
48 | # |
---|
49 | |
---|
50 | CLEANFILES += $(LIB) $(H_FILES) $(GEN_C_FILES) |
---|
51 | |
---|
52 | FRONTEND = \"$(RTEMS_CPU)/mcp750/remdeb_f.x\" |
---|
53 | |
---|
54 | $(PROJECT_RELEASE)/lib/$(LIBNAME)$(LIBVARIANT).a: $(LIB) |
---|
55 | $(INSTALL_DATA) $< $@ |
---|
56 | |
---|
57 | all: ${ARCH} $(PREINSTALL_FILES) $(TMPINSTALL_FILES) |
---|
58 | |
---|
59 | $(LIB): ${OBJS} |
---|
60 | $(make-library) |
---|
61 | |
---|
62 | remdeb.h: $(X_FILES) |
---|
63 | @rm -f $@ |
---|
64 | ( pwd=`pwd`; cd $(srcdir)/../..; \ |
---|
65 | $(RPCGEN) -h -DFRONTEND=$(FRONTEND) \ |
---|
66 | -o $$pwd/$@ remdeb.x ) |
---|
67 | |
---|
68 | $(PROJECT_INCLUDE)/rdbg/remdeb.h: remdeb.h |
---|
69 | $(INSTALL_DATA) $< $@ |
---|
70 | |
---|
71 | remdeb_xdr.c: $(X_FILES) |
---|
72 | @rm -f $@ |
---|
73 | ( pwd=`pwd`; cd $(srcdir)/../..; \ |
---|
74 | $(RPCGEN) -c -DFRONTEND=$(FRONTEND) \ |
---|
75 | -o $$pwd/$@ remdeb.x ) |
---|
76 | |
---|
77 | remdeb_svc.c: $(X_FILES) |
---|
78 | @rm -f $@ tmpSvc.c |
---|
79 | ( pwd=`pwd`; cd $(srcdir)/../..; \ |
---|
80 | $(RPCGEN) -s udp -DFRONTEND=$(FRONTEND) \ |
---|
81 | -o $$pwd/tmpSvc.c remdeb.x ) |
---|
82 | $(AWK) -f $(srcdir)/../../awk.svc THEPROG="remdeb.h" tmpSvc.c >$@ |
---|
83 | @rm -f tmpSvc.c |
---|
84 | |
---|
85 | EXTRA_DIST = remdeb_f.x |
---|
86 | |
---|
87 | include $(top_srcdir)/../../../automake/local.am |
---|