summaryrefslogtreecommitdiffstats
path: root/c/src/librdbg/Makefile.am
blob: d75276b2646f27467d4854ec1e13a651a5e78fa9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
##
## $Id$
##

include $(top_srcdir)/automake/compile.am

DISTCLEANFILES =
CLEANFILES =
BUILT_SOURCES =
MAINTAINERCLEANFILES =

## FIXME: This Makefile.am is one blatant ugly HACK
## May-be this should be put into libcpu?

if HAS_RDBG
include_rdbgdir = $(includedir)/rdbg

include_rdbg_HEADERS = include/rdbg/rdbg.h include/rdbg/servrpc.h

noinst_LIBRARIES = librdbg.a
librdbg_a_CPPFLAGS = $(AM_CPPFLAGS)
librdbg_a_SOURCES = src/rdbg.c src/servcon.c src/servbkpt.c src/servrpc.c \
    src/excep.c src/servtgt.c src/servtsp.c src/servutil.c src/_servtgt.c \
    src/ptrace.c
endif

X_FILES = src/remdeb.x
EXTRA_DIST = src/remdeb.x

if HAS_RDBG
if HAS_RDBG_powerpc
librdbg_a_SOURCES += src/powerpc/excep_f.c src/powerpc/rdbg_f.c \
    src/powerpc/rdbg_cpu_asm.S

# Generated sources
librdbg_a_SOURCES += src/powerpc/new_exception_processing/remdeb_xdr.c
librdbg_a_SOURCES += src/powerpc/new_exception_processing/remdeb_svc.c
librdbg_a_SOURCES += src/powerpc/new_exception_processing/remdeb.h
include_rdbg_HEADERS += src/powerpc/new_exception_processing/remdeb.h
include_rdbg_HEADERS += include/rdbg/powerpc/rdbg_f.h \
    include/rdbg/powerpc/reg.h
endif
endif

# X source names
EXTRA_DIST += src/powerpc/new_exception_processing/remdeb_f.x

BUILT_SOURCES += src/powerpc/new_exception_processing/remdeb.h
BUILT_SOURCES += src/powerpc/new_exception_processing/remdeb_xdr.c
BUILT_SOURCES += src/powerpc/new_exception_processing/remdeb_svc.c
MAINTAINERCLEANFILES += src/powerpc/new_exception_processing/remdeb_xdr.c
MAINTAINERCLEANFILES += src/powerpc/new_exception_processing/remdeb_svc.c
MAINTAINERCLEANFILES += src/powerpc/new_exception_processing/remdeb.h

if RPCTOOLS
$(srcdir)/src/powerpc/new_exception_processing/remdeb.h: $(X_FILES) \
    src/powerpc/new_exception_processing/remdeb_f.x
	rm -f $@; ( cd $(srcdir) && \
	$(RPCGEN) -h -DFRONTEND=\"powerpc/new_exception_processing/remdeb_f.x\" \
	  -o src/powerpc/new_exception_processing/remdeb.h src/remdeb.x )

$(srcdir)/src/powerpc/new_exception_processing/remdeb_xdr.c: $(X_FILES) \
   src/powerpc/new_exception_processing/remdeb_f.x
	rm -f $@; ( cd $(srcdir) && \
	$(RPCGEN) -c -DFRONTEND=\"powerpc/new_exception_processing/remdeb_f.x\" src/remdeb.x \
	 | sed "s,^#include.*remdeb\.h.*,#include \"src/powerpc/new_exception_processing/remdeb.h\"," \
	 > src/powerpc/new_exception_processing/remdeb_xdr.c )

$(srcdir)/src/powerpc/new_exception_processing/remdeb_svc.c: $(X_FILES) \
   src/powerpc/new_exception_processing/remdeb_f.x
	rm -f $@; ( cd $(srcdir) && \
	$(RPCGEN) -m -DFRONTEND=\"powerpc/new_exception_processing/remdeb_f.x\" \
	  -o src/powerpc/new_exception_processing/tmpSvc.c src/remdeb.x; \
	$(AWK) -f src/awk.svc THEPROG="remdeb.h" src/powerpc/new_exception_processing/tmpSvc.c \
	  > src/powerpc/new_exception_processing/remdeb_svc.c; \
	sed -e 's/fprintf.*,/printf(/'  src/powerpc/new_exception_processing/remdeb_svc.c > src/powerpc/new_exception_processing/remdeb_svc.tmp; \
	mv src/powerpc/new_exception_processing/remdeb_svc.tmp src/powerpc/new_exception_processing/remdeb_svc.c; \
	rm -f src/powerpc/new_exception_processing/tmpSvc.c )
endif

if HAS_RDBG
if HAS_RDBG_i386
librdbg_a_SOURCES += src/i386/excep_f.c src/i386/rdbg_f.c \
    src/i386/rdbg_cpu_asm.S

# Generated sources
librdbg_a_SOURCES += src/i386/any/remdeb_xdr.c
librdbg_a_SOURCES += src/i386/any/remdeb_svc.c
librdbg_a_SOURCES += src/i386/any/remdeb.h
include_rdbg_HEADERS += src/i386/any/remdeb.h
include_rdbg_HEADERS += include/rdbg/i386/rdbg_f.h include/rdbg/i386/reg.h
endif
endif

# X source names
EXTRA_DIST += src/i386/any/remdeb_f.x
BUILT_SOURCES += src/i386/any/remdeb.h
BUILT_SOURCES += src/i386/any/remdeb_xdr.c
BUILT_SOURCES += src/i386/any/remdeb_svc.c
MAINTAINERCLEANFILES += src/i386/any/remdeb_xdr.c
MAINTAINERCLEANFILES += src/i386/any/remdeb_svc.c
MAINTAINERCLEANFILES += src/i386/any/remdeb.h

if RPCTOOLS
$(srcdir)/src/i386/any/remdeb.h: $(X_FILES) src/i386/any/remdeb_f.x
	rm -f $@; ( cd $(srcdir) && \
	$(RPCGEN) -h -DFRONTEND=\"i386/any/remdeb_f.x\" \
	  -o src/i386/any/remdeb.h src/remdeb.x )

$(srcdir)/src/i386/any/remdeb_xdr.c: $(X_FILES) src/i386/any/remdeb_f.x
	rm -f $@; ( cd $(srcdir) && \
	$(RPCGEN) -c -DFRONTEND=\"i386/any/remdeb_f.x\" src/remdeb.x \
	 | sed "s,^#include.*remdeb\.h.*,#include \"src/i386/any/remdeb.h\"," \
	 > src/i386/any/remdeb_xdr.c )

$(srcdir)/src/i386/any/remdeb_svc.c: $(X_FILES) src/i386/any/remdeb_f.x
	rm -f $@; ( cd $(srcdir) && \
	$(RPCGEN) -m -DFRONTEND=\"i386/any/remdeb_f.x\" \
	  -o src/i386/any/tmpSvc.c src/remdeb.x; \
	$(AWK) -f src/awk.svc THEPROG="remdeb.h" src/i386/any/tmpSvc.c \
	  > src/i386/any/remdeb_svc.c; \
	sed -e 's/fprintf.*,/printf(/'  src/i386/any/remdeb_svc.c > src/i386/any/remdeb_svc.tmp; \
	mv src/i386/any/remdeb_svc.tmp src/i386/any/remdeb_svc.c; \
	rm -f src/i386/any/tmpSvc.c )
endif

if HAS_RDBG
if HAS_RDBG_m68k
librdbg_a_SOURCES += src/m68k/excep_f.c src/m68k/rdbg_f.c \
    src/m68k/rdbg_cpu_asm.S

# Generated sources
librdbg_a_SOURCES += src/m68k/any/remdeb_xdr.c
librdbg_a_SOURCES += src/m68k/any/remdeb_svc.c
librdbg_a_SOURCES += src/m68k/any/remdeb.h
include_rdbg_HEADERS += src/m68k/any/remdeb.h
include_rdbg_HEADERS += include/rdbg/m68k/rdbg_f.h include/rdbg/m68k/reg.h
endif
endif

# X source names
EXTRA_DIST += src/m68k/any/remdeb_f.x
BUILT_SOURCES += src/m68k/any/remdeb.h
BUILT_SOURCES += src/m68k/any/remdeb_xdr.c
BUILT_SOURCES += src/m68k/any/remdeb_svc.c
MAINTAINERCLEANFILES += src/m68k/any/remdeb_xdr.c
MAINTAINERCLEANFILES += src/m68k/any/remdeb_svc.c
MAINTAINERCLEANFILES += src/m68k/any/remdeb.h

if RPCTOOLS
$(srcdir)/src/m68k/any/remdeb.h: $(X_FILES) src/m68k/any/remdeb_f.x
	rm -f $@; ( cd $(srcdir) && \
	$(RPCGEN) -h -DFRONTEND=\"m68k/any/remdeb_f.x\" \
	  -o src/m68k/any/remdeb.h src/remdeb.x )
$(srcdir)/src/m68k/any/remdeb_xdr.c: $(X_FILES) src/m68k/any/remdeb_f.x
	rm -f $@; ( cd $(srcdir) && \
	$(RPCGEN) -c -DFRONTEND=\"m68k/any/remdeb_f.x\" src/remdeb.x \
	 | sed "s,^#include.*remdeb\.h.*,#include \"src/m68k/any/remdeb.h\"," \
	 > src/m68k/any/remdeb_xdr.c )
$(srcdir)/src/m68k/any/remdeb_svc.c: $(X_FILES) src/m68k/any/remdeb_f.x
	rm -f $@; ( cd $(srcdir) && \
	$(RPCGEN) -m -DFRONTEND=\"m68k/any/remdeb_f.x\" \
	  -o src/m68k/any/tmpSvc.c src/remdeb.x; \
	$(AWK) -f src/awk.svc THEPROG="remdeb.h" src/m68k/any/tmpSvc.c \
	  > src/m68k/any/remdeb_svc.c; \
	sed -e 's/fprintf.*,/printf(/'  src/m68k/any/remdeb_svc.c > src/m68k/any/remdeb_svc.tmp; \
	mv src/m68k/any/remdeb_svc.tmp src/m68k/any/remdeb_svc.c; \
	rm -f src/m68k/any/tmpSvc.c )
endif

EXTRA_DIST += src/awk.svc

all-local: $(PREINSTALL_FILES) $(TMPINSTALL_FILES)

include $(srcdir)/preinstall.am
include $(top_srcdir)/automake/local.am