gdb: Adjust makefiles for gdb 7.3
[dragonfly.git] / gnu / usr.bin / gdb / libgdb / Makefile
CommitLineData
8b6a428f
SS
1.include "../Makefile.inc"
2
643b986c
SS
3TARGET_ARCH?= ${MACHINE_ARCH}
4
a938cc15
JM
5LIB= gdb
6INTERNALLIB= yes
8b6a428f 7
8b6a428f 8CONTRIBDIR= ${BASEDIR}/gdb
f17ea84b
SS
9.PATH: ${CONTRIBDIR} ${CONTRIBDIR}/cli ${CONTRIBDIR}/mi
10.PATH: ${CONTRIBDIR}/common ${CONTRIBDIR}/python ${CONTRIBDIR}/features
8b6a428f
SS
11.PATH: ${CONTRIBDIR}/tui
12
f17ea84b
SS
13VERSION!= cat ${CONTRIBDIR}/version.in
14
8b6a428f 15CFLAGS+= -I${.OBJDIR} -I${.CURDIR} -I${BASEDIR}/include -I${BASEDIR}/bfd
f17ea84b
SS
16CFLAGS+= -I${CONTRIBDIR} -I${CONTRIBDIR}/config -I${CONTRIBDIR}/common
17CFLAGS+= -I${BASEDIR}/libdecnumber
18CFLAGS+= -I${.CURDIR}/../libbfd -I${.OBJDIR}/../libbfd
8b6a428f 19CFLAGS+= -I${BASEDIR}
f17ea84b
SS
20CFLAGS+= -DTARGET_SYSTEM_ROOT='"/"' -DTARGET_SYSTEM_ROOT_RELOCATABLE=0
21CFLAGS+= -DBINDIR='"/usr/bin"'
0c3d4888 22CFLAGS+= -DMACHINE_ARCH='"${MACHINE_ARCH}"'
643b986c 23CFLAGS+= -DTARGET_ARCH='"${TARGET_ARCH}"'
f17ea84b 24CFLAGS+= -DVERSION_STRING='"${VERSION}"'
0c3d4888 25
a938cc15 26SRCS+= observer.h gdb_stdint.h
0c3d4888
SS
27
28# The order of these sources is important,
29# because init.c below needs to obey a certain ordering
30# of function calls.
31
32# COMMON_OBS
f17ea84b
SS
33SRCS+= \
34 version.c \
0c3d4888 35 annotate.c \
f17ea84b 36 addrmap.c \
0c3d4888
SS
37 auxv.c \
38 bfd-target.c \
39 blockframe.c breakpoint.c findvar.c regcache.c \
f17ea84b 40 charset.c disasm.c dummy-frame.c dfp.c \
0c3d4888 41 source.c value.c eval.c valops.c valarith.c valprint.c printcmd.c \
a938cc15 42 block.c symtab.c psymtab.c symfile.c symmisc.c linespec.c dictionary.c \
0c3d4888
SS
43 infcall.c \
44 infcmd.c infrun.c \
45 expprint.c environ.c stack.c thread.c \
46 exceptions.c \
a938cc15 47 filesystem.c \
0c3d4888
SS
48 inf-child.c \
49 interps.c \
50 main.c \
51 macrotab.c macrocmd.c macroexp.c macroscope.c \
a938cc15 52 mi-common.c \
0c3d4888
SS
53 event-loop.c event-top.c inf-loop.c completer.c \
54 gdbarch.c arch-utils.c gdbtypes.c osabi.c copying.c \
55 memattr.c mem-break.c target.c parse.c language.c buildsym.c \
f17ea84b 56 findcmd.c \
0c3d4888
SS
57 std-regs.c \
58 signals.c \
f17ea84b
SS
59 exec.c reverse.c \
60 bcache.c objfiles.c observer.c minsyms.c maint.c demangle.c \
0c3d4888
SS
61 dbxread.c coffread.c coff-pe-read.c \
62 dwarf2read.c mipsread.c stabsread.c corefile.c \
63 dwarf2expr.c dwarf2loc.c dwarf2-frame.c \
a938cc15 64 ada-lang.c c-lang.c d-lang.c f-lang.c objc-lang.c \
f17ea84b 65 ada-tasks.c \
0c3d4888
SS
66 ui-out.c cli-out.c \
67 varobj.c vec.c wrapper.c \
68 jv-lang.c jv-valprint.c jv-typeprint.c \
0c3d3a6f 69 m2-lang.c opencl-lang.c p-lang.c p-typeprint.c p-valprint.c \
0c3d4888
SS
70 sentinel-frame.c \
71 complaints.c typeprint.c \
72 ada-typeprint.c c-typeprint.c f-typeprint.c m2-typeprint.c \
a938cc15
JM
73 ada-valprint.c c-valprint.c cp-valprint.c d-valprint.c f-valprint.c \
74 m2-valprint.c \
0c3d4888
SS
75 serial.c mdebugread.c top.c utils.c \
76 ui-file.c \
77 user-regs.c \
78 frame.c frame-unwind.c doublest.c \
79 frame-base.c \
f17ea84b 80 inline-frame.c \
0c3d4888
SS
81 gnu-v2-abi.c gnu-v3-abi.c cp-abi.c cp-support.c \
82 cp-namespace.c \
83 reggroups.c regset.c \
84 trad-frame.c \
85 tramp-frame.c \
a938cc15 86 solib.c solib-target.c \
0c3d3a6f 87 prologue-value.c memory-map.c memrange.c xml-support.c xml-syscall.c \
f17ea84b 88 target-descriptions.c target-memory.c xml-tdesc.c xml-builtin.c \
a938cc15
JM
89 inferior.c osdata.c gdb_usleep.c record.c gcore.c \
90 jit.c progspace.c
0c3d4888
SS
91
92# TSOBS
bc8873f3 93SRCS+= inflow.c
0c3d4888
SS
94
95# SER_HARDWIRE
96SRCS+= ser-base.c ser-unix.c ser-pipe.c ser-tcp.c
97
0c3d4888
SS
98# REMOTE_OBS
99SRCS+= remote.c dcache.c tracepoint.c ax-general.c ax-gdb.c remote-fileio.c
100
101# SUBDIR_CLI_OBS
102SRCS+= cli-dump.c \
f17ea84b 103 cli-decode.c cli-script.c cli-cmds.c cli-setshow.c \
0c3d4888 104 cli-logging.c \
0c3d3a6f 105 cli-interp.c cli-utils.c
0c3d4888
SS
106
107# SUBDIR_MI_OBS
108SRCS+= mi-out.c mi-console.c \
109 mi-cmds.c mi-cmd-env.c mi-cmd-var.c mi-cmd-break.c mi-cmd-stack.c \
f17ea84b 110 mi-cmd-file.c mi-cmd-disas.c mi-symbol-cmds.c mi-cmd-target.c \
0c3d4888
SS
111 mi-interp.c \
112 mi-main.c mi-parse.c mi-getopt.c mi-common.c
113
a938cc15
JM
114# PYTHON OBJS
115SRCS+= python.c \
116 py-auto-load.c \
117 py-value.c \
118 py-prettyprint.c
119
0c3d4888 120# CONFIG_OBS
a938cc15 121SRCS+= elfread.c posix-hdep.c
0c3d4888
SS
122
123# SUBDIR_TUI_OBS
124SRCS+= tui-command.c \
125 tui-data.c \
126 tui-disasm.c \
a938cc15
JM
127 tui-file.c \
128 tui.c \
0c3d4888
SS
129 tui-hooks.c \
130 tui-interp.c \
131 tui-io.c \
132 tui-layout.c \
133 tui-out.c \
134 tui-regs.c \
135 tui-source.c \
136 tui-stack.c \
137 tui-win.c \
138 tui-windata.c \
139 tui-wingeneral.c \
140 tui-winsource.c
141
142# YYOBJ
143SRCS+= c-exp.y \
144 cp-name-parser.y \
145 objc-exp.y \
146 ada-exp.y \
147 jv-exp.y \
a938cc15
JM
148 f-exp.y \
149 m2-exp.y \
150 p-exp.y
0c3d4888
SS
151
152SRCS+= init.c
8b6a428f 153
f17ea84b
SS
154XMLFILES= gdb-target.dtd xinclude.dtd library-list.dtd osdata.dtd
155
8b6a428f 156# kernel-debugger
0c3d4888 157#SRCS+= freebsd-uthread.c
8b6a428f
SS
158#SRCS+= kthr.c trgt.c trgt_${MACHINE_ARCH}.c
159
7629c1f8 160DPADD= ${LIBEDIT} ${LIBKVM} ${LIBTERMCAP} ${LIBM}
8b6a428f 161DPADD+= ../libbfd/libbfd.a ../libopcodes/libopcodes.a ../libiberty/libiberty.a
f17ea84b 162LDADD= -ledit -ltermcap -lm
8b6a428f
SS
163LDADD+= -L../libbfd -lbfd -L../libopcodes -lopcodes -L../libiberty -liberty
164
643b986c 165.include "Makefile.${TARGET_ARCH}"
8b6a428f
SS
166
167init.c: ${SRCS:Ninit.c} Makefile
168 echo '#include "defs.h"' > ${.TARGET}
169 echo '#include "call-cmds.h"' >> ${.TARGET}
170 sed -n -e 's/^_initialize_\([a-z_0-9A-Z]*\).*/extern initialize_file_ftype _initialize_\1;/p' ${.ALLSRC:M*.c} >> ${.TARGET}
171 echo 'void' >> ${.TARGET}
172 echo 'initialize_all_files(void)' >> ${.TARGET}
173 echo '{' >> ${.TARGET}
174 sed -n -e 's/^_initialize_\([a-z_0-9A-Z]*\).*/ _initialize_\1 ();/p' ${.ALLSRC:M*.c} >> ${.TARGET}
175 echo '}' >> ${.TARGET}
176
177CLEANFILES+= init.c
178
f17ea84b 179xml-builtin.c: feature_to_c.sh ${XMLFILES}
d0b8e0d3 180 rm -f ${.TARGET}
f17ea84b
SS
181 sh ${CONTRIBDIR}/features/feature_to_c.sh ${.TARGET} ${.ALLSRC:M*.dtd}
182
183CLEANFILES+= xml-builtin.c
184
8b6a428f
SS
185# observer.inc can't be included in SRCS, it would duplicate the entry in OBJS
186observer.h: observer.sh observer.inc doc/observer.texi
187 sh ${CONTRIBDIR}/observer.sh h ${CONTRIBDIR}/doc/observer.texi ${.TARGET}
188observer.inc: observer.sh doc/observer.texi
189 sh ${CONTRIBDIR}/observer.sh inc ${CONTRIBDIR}/doc/observer.texi ${.TARGET}
190
0c3d4888
SS
191gdb_stdint.h:
192 touch ${.TARGET}
193
a938cc15 194CLEANFILES+= observer.h observer.inc gdb_stdint.h
f17ea84b
SS
195
196
8b6a428f 197.include <bsd.lib.mk>