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