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