af7ec8beeb967547b90bb357c1e7a27dd452a88b
[dragonfly.git] / gnu / usr.bin / gdb / gdb / Makefile
1 # $DragonFly: src/gnu/usr.bin/gdb/gdb/Makefile,v 1.4 2004/11/14 15:16:59 joerg Exp $
2
3 .include "../Makefile.inc"
4
5 PROG=   gdb
6
7 SUBDIR= doc
8
9 CONTRIBDIR=     ${BASEDIR}/gdb
10 .PATH:  ${CONTRIBDIR} ${CONTRIBDIR}/cli ${CONTRIBDIR}/mi ${CONTRIBDIR}/signals
11 .PATH:  ${CONTRIBDIR}/tui
12
13 CFLAGS+= -I${.OBJDIR} -I${.CURDIR} -I${BASEDIR}/include -I${BASEDIR}/bfd
14 CFLAGS+= -I${CONTRIBDIR} -I${CONTRIBDIR}/config -I${.CURDIR}/../libbfd
15 CFLAGS+= -I${BASEDIR} 
16
17 .if defined(GDB_TUI)
18 CFLAGS+= -DTUI=1
19 SRCS=   tui-main.c
20 .else
21 SRCS=   gdb.c
22 .endif
23
24 CLEANFILES+=    nm.h observer.h observer.inc tm.h xm.h
25
26 SRCS+=  nm.h observer.h tm.h xm.h
27
28 # libgdb
29 SRCS+=  annotate.c arch-utils.c auxv.c ax-gdb.c ax-general.c bcache.c
30 SRCS+=  bfd-target.c block.c blockframe.c breakpoint.c bsd-kvm.c buildsym.c
31 SRCS+=  c-exp.c c-lang.c c-typeprint.c c-valprint.c charset.c cli-cmds.c
32 SRCS+=  cli-decode.c cli-dump.c cli-interp.c cli-logging.c cli-out.c
33 SRCS+=  cli-script.c cli-setshow.c cli-utils.c coff-pe-read.c coffread.c
34 SRCS+=  complaints.c completer.c copying.c corefile.c corelow.c cp-abi.c
35 SRCS+=  cp-namespace.c cp-support.c cp-valprint.c dbxread.c dcache.c demangle.c
36 SRCS+=  dictionary.c disasm.c doublest.c dummy-frame.c dwarf2-frame.c
37 SRCS+=  dwarf2expr.c dwarf2loc.c dwarf2read.c dwarfread.c elfread.c environ.c
38 SRCS+=  eval.c event-loop.c event-top.c exec.c expprint.c f-exp.c f-lang.c
39 SRCS+=  f-typeprint.c f-valprint.c fbsd-proc.c findvar.c fork-child.c
40 SRCS+=  frame-base.c frame-unwind.c frame.c gcore.c gdb-events.c gdbarch.c
41 SRCS+=  gdbtypes.c gnu-v2-abi.c gnu-v3-abi.c hpacc-abi.c inf-loop.c infcall.c
42 SRCS+=  infcmd.c inflow.c infptrace.c infrun.c inftarg.c init.c interps.c
43 SRCS+=  jv-exp.y jv-lang.c jv-typeprint.c jv-valprint.c kod-cisco.c kod.c
44 SRCS+=  language.c linespec.c m2-exp.y m2-lang.c m2-typeprint.c m2-valprint.c
45 SRCS+=  macrocmd.c macroexp.c macroscope.c macrotab.c main.c maint.c
46 SRCS+=  mdebugread.c mem-break.c memattr.c mi-cmd-break.c mi-cmd-disas.c
47 SRCS+=  mi-cmd-env.c mi-cmd-file.c mi-cmd-stack.c mi-cmd-var.c mi-cmds.c
48 SRCS+=  mi-console.c mi-getopt.c mi-interp.c mi-main.c mi-out.c
49 SRCS+=  mi-parse.c mi-symbol-cmds.c minsyms.c mipsread.c nlmread.c objc-exp.y
50 SRCS+=  objc-lang.c objfiles.c observer.c osabi.c p-exp.y p-lang.c
51 SRCS+=  p-typeprint.c p-valprint.c parse.c printcmd.c regcache.c reggroups.c
52 SRCS+=  regset.c remote-fileio.c remote-utils.c remote.c scm-exp.c scm-lang.c
53 SRCS+=  scm-valprint.c sentinel-frame.c ser-pipe.c ser-tcp.c ser-unix.c
54 SRCS+=  serial.c signals.c solib-legacy.c solib-svr4.c solib.c source.c
55 SRCS+=  stabsread.c
56 SRCS+=  stack.c std-regs.c symfile.c symmisc.c symtab.c target.c thread.c
57 SRCS+=  top.c tracepoint.c trad-frame.c tramp-frame.c typeprint.c
58 SRCS+=  ui-file.c ui-out.c user-regs.c utils.c valarith.c valops.c valprint.c
59 SRCS+=  values.c varobj.c version.c wrapper.c
60 # tui specific
61 .if defined(GDB_TUI)
62 SRCS+=  tui.c tui-command.c tui-data.c tui-disasm.c tui-file.c tui-hooks.c
63 SRCS+=  tui-interp.c tui-io.c tui-layout.c tui-out.c tui-regs.c tui-source.c
64 SRCS+=  tui-stack.c tui-win.c tui-windata.c tui-wingeneral.c tui-winsource.c
65 .endif
66 # kernel-debugger
67 PATCHES!=       echo ${.CURDIR}/patches/*.patch
68 SRCS+=  freebsd-uthread.c kvm-fbsd.c kvm-fbsd.h ${PATCHES}
69
70 DPADD=  ${LIBREADLINE} ${LIBKVM} ${LIBTERMCAP} ${LIBM}
71 DPADD+= ../libbfd/libbfd.a ../libopcodes/libopcodes.a ../libiberty/libiberty.a
72 LDADD=  -lreadline -lkvm -ltermcap -lm
73 LDADD+= -L../libbfd -lbfd -L../libopcodes -lopcodes -L../libiberty -liberty
74
75 .include "Makefile.${MACHINE_ARCH}"
76
77 init.c: ${SRCS:Ninit.c} Makefile
78         echo '#include "defs.h"' > ${.TARGET}
79         echo '#include "call-cmds.h"' >> ${.TARGET}
80         sed -n -e 's/^_initialize_\([a-z_0-9A-Z]*\).*/extern initialize_file_ftype _initialize_\1;/p' ${.ALLSRC:M*.c} >> ${.TARGET}
81         echo 'void' >> ${.TARGET}
82         echo 'initialize_all_files(void)' >> ${.TARGET}
83         echo '{' >> ${.TARGET}
84         sed -n -e 's/^_initialize_\([a-z_0-9A-Z]*\).*/  _initialize_\1 ();/p' ${.ALLSRC:M*.c} >> ${.TARGET}
85         echo '}' >> ${.TARGET}
86
87 # observer.inc can't be included in SRCS, it would duplicate the entry in OBJS
88 observer.h: observer.sh observer.inc doc/observer.texi
89         sh ${CONTRIBDIR}/observer.sh h ${CONTRIBDIR}/doc/observer.texi ${.TARGET}
90 observer.inc: observer.sh doc/observer.texi
91         sh ${CONTRIBDIR}/observer.sh inc ${CONTRIBDIR}/doc/observer.texi ${.TARGET}
92
93 nm.h: nm-fbsd.h
94         cp ${.ALLSRC} ${.TARGET}
95
96 .include <bsd.prog.mk>