1# $FreeBSD: head/gnu/usr.bin/gdb/libgdb/Makefile 251858 2013-06-17 18:34:34Z emaste $
2
3# These assignments duplicate much of the functionality of
4# MACHINE_CPUARCH, but there's no easy way to export make functions...
5
6.if defined(TARGET_ARCH)
7TARGET_CPUARCH=${TARGET_ARCH:C/mips(n32|64)?(el)?/mips/:C/arm(v6)?(eb)?/arm/:C/powerpc64/powerpc/}
8.else
9TARGET_CPUARCH=${MACHINE_CPUARCH}
10.endif
11TARGET_ARCH?= ${MACHINE_ARCH}
12
13LIB= gdb
14INTERNALLIB=
15SRCS= annotate.c arch-utils.c auxv.c ax-gdb.c ax-general.c \
16 bcache.c bfd-target.c block.c blockframe.c breakpoint.c \
17 buildsym.c \
18 c-exp.y c-lang.c c-typeprint.c c-valprint.c charset.c \
19 cli-cmds.c cli-decode.c cli-dump.c cli-interp.c cli-logging.c \
20 cli-out.c cli-script.c cli-setshow.c cli-utils.c coff-pe-read.c \
21 coffread.c complaints.c completer.c copying.c corefile.c \
22 corelow.c cp-abi.c cp-namespace.c cp-support.c cp-valprint.c \
23 dbxread.c dcache.c demangle.c dictionary.c disasm.c doublest.c \
24 dummy-frame.c dwarf2-frame.c dwarf2expr.c dwarf2loc.c \
25 dwarf2read.c dwarfread.c \
26 elfread.c environ.c eval.c event-loop.c event-top.c exec.c \
27 expprint.c \
28 f-exp.y f-lang.c f-typeprint.c f-valprint.c findvar.c \
29 ${_fork_child} frame-base.c frame-unwind.c frame.c \
30 gdb-events.c gdbarch.c gdbtypes.c gnu-v2-abi.c gnu-v3-abi.c \
31 hpacc-abi.c \
32 inf-loop.c infcall.c infcmd.c inflow.c ${_infptrace} infrun.c \
33 ${_inftarg} init.c interps.c \
34 jv-exp.y jv-lang.c jv-typeprint.c jv-valprint.c \
35 kod-cisco.c kod.c \
36 language.c linespec.c \
37 m2-exp.y m2-lang.c m2-typeprint.c m2-valprint.c macrocmd.c \
38 macroexp.c macroscope.c macrotab.c main.c maint.c mdebugread.c \
39 mem-break.c memattr.c mi-cmd-break.c mi-cmd-disas.c \
40 mi-cmd-env.c mi-cmd-file.c mi-cmd-stack.c mi-cmd-var.c \
41 mi-cmds.c mi-console.c mi-getopt.c mi-interp.c mi-main.c \
42 mi-out.c mi-parse.c mi-symbol-cmds.c minsyms.c mipsread.c \
43 nlmread.c \
44 objc-exp.y objc-lang.c objfiles.c observer.c osabi.c \
45 p-exp.y p-lang.c p-typeprint.c p-valprint.c parse.c printcmd.c \
46 regcache.c reggroups.c remote-fileio.c remote-utils.c remote.c \
47 scm-exp.c scm-lang.c scm-valprint.c sentinel-frame.c ser-pipe.c \
48 ser-tcp.c ser-unix.c serial.c signals.c source.c stabsread.c \
49 stack.c std-regs.c symfile.c symmisc.c symtab.c \
50 target.c thread.c top.c tracepoint.c trad-frame.c tui-command.c \
51 tui-data.c tui-disasm.c tui-file.c tui-hooks.c tui-interp.c \
52 tui-io.c tui-layout.c tui-out.c tui-regs.c tui-source.c \
53 tui-stack.c tui-win.c tui-windata.c tui-wingeneral.c \
54 tui-winsource.c tui.c typeprint.c \
55 ui-file.c ui-out.c user-regs.c utils.c \
56 valarith.c valops.c valprint.c values.c varobj.c \
57 wrapper.c ${LIBSRCS}
58
59.for stupid_gnu in \
60xregcomp xre_exec xregexec xre_search xre_compile_fastmap xregerror xre_comp xre_set_syntax
61CFLAGS+= -D${stupid_gnu}=${stupid_gnu:S/^x//}
62.endfor
63
64.if ${TARGET_ARCH} == ${MACHINE_ARCH}
65_fork_child= fork-child.c
66_infptrace= infptrace.c
67_inftarg= inftarg.c
68.endif
69
70GENSRCS= version.c
71
72version.c:
73 echo '#include "version.h"' > ${.TARGET}
74 echo 'const char version[] = ${VERSION};' >> ${.TARGET}
75 echo 'const char host_name[] = "${MACHINE_ARCH}-${VENDOR}-freebsd";' \
76 >> ${.TARGET}
77 echo 'const char target_name[] = "${TARGET_ARCH}-${VENDOR}-freebsd";' \
78 >> ${.TARGET}
79
80.include <bsd.lib.mk>
2
3# These assignments duplicate much of the functionality of
4# MACHINE_CPUARCH, but there's no easy way to export make functions...
5
6.if defined(TARGET_ARCH)
7TARGET_CPUARCH=${TARGET_ARCH:C/mips(n32|64)?(el)?/mips/:C/arm(v6)?(eb)?/arm/:C/powerpc64/powerpc/}
8.else
9TARGET_CPUARCH=${MACHINE_CPUARCH}
10.endif
11TARGET_ARCH?= ${MACHINE_ARCH}
12
13LIB= gdb
14INTERNALLIB=
15SRCS= annotate.c arch-utils.c auxv.c ax-gdb.c ax-general.c \
16 bcache.c bfd-target.c block.c blockframe.c breakpoint.c \
17 buildsym.c \
18 c-exp.y c-lang.c c-typeprint.c c-valprint.c charset.c \
19 cli-cmds.c cli-decode.c cli-dump.c cli-interp.c cli-logging.c \
20 cli-out.c cli-script.c cli-setshow.c cli-utils.c coff-pe-read.c \
21 coffread.c complaints.c completer.c copying.c corefile.c \
22 corelow.c cp-abi.c cp-namespace.c cp-support.c cp-valprint.c \
23 dbxread.c dcache.c demangle.c dictionary.c disasm.c doublest.c \
24 dummy-frame.c dwarf2-frame.c dwarf2expr.c dwarf2loc.c \
25 dwarf2read.c dwarfread.c \
26 elfread.c environ.c eval.c event-loop.c event-top.c exec.c \
27 expprint.c \
28 f-exp.y f-lang.c f-typeprint.c f-valprint.c findvar.c \
29 ${_fork_child} frame-base.c frame-unwind.c frame.c \
30 gdb-events.c gdbarch.c gdbtypes.c gnu-v2-abi.c gnu-v3-abi.c \
31 hpacc-abi.c \
32 inf-loop.c infcall.c infcmd.c inflow.c ${_infptrace} infrun.c \
33 ${_inftarg} init.c interps.c \
34 jv-exp.y jv-lang.c jv-typeprint.c jv-valprint.c \
35 kod-cisco.c kod.c \
36 language.c linespec.c \
37 m2-exp.y m2-lang.c m2-typeprint.c m2-valprint.c macrocmd.c \
38 macroexp.c macroscope.c macrotab.c main.c maint.c mdebugread.c \
39 mem-break.c memattr.c mi-cmd-break.c mi-cmd-disas.c \
40 mi-cmd-env.c mi-cmd-file.c mi-cmd-stack.c mi-cmd-var.c \
41 mi-cmds.c mi-console.c mi-getopt.c mi-interp.c mi-main.c \
42 mi-out.c mi-parse.c mi-symbol-cmds.c minsyms.c mipsread.c \
43 nlmread.c \
44 objc-exp.y objc-lang.c objfiles.c observer.c osabi.c \
45 p-exp.y p-lang.c p-typeprint.c p-valprint.c parse.c printcmd.c \
46 regcache.c reggroups.c remote-fileio.c remote-utils.c remote.c \
47 scm-exp.c scm-lang.c scm-valprint.c sentinel-frame.c ser-pipe.c \
48 ser-tcp.c ser-unix.c serial.c signals.c source.c stabsread.c \
49 stack.c std-regs.c symfile.c symmisc.c symtab.c \
50 target.c thread.c top.c tracepoint.c trad-frame.c tui-command.c \
51 tui-data.c tui-disasm.c tui-file.c tui-hooks.c tui-interp.c \
52 tui-io.c tui-layout.c tui-out.c tui-regs.c tui-source.c \
53 tui-stack.c tui-win.c tui-windata.c tui-wingeneral.c \
54 tui-winsource.c tui.c typeprint.c \
55 ui-file.c ui-out.c user-regs.c utils.c \
56 valarith.c valops.c valprint.c values.c varobj.c \
57 wrapper.c ${LIBSRCS}
58
59.for stupid_gnu in \
60xregcomp xre_exec xregexec xre_search xre_compile_fastmap xregerror xre_comp xre_set_syntax
61CFLAGS+= -D${stupid_gnu}=${stupid_gnu:S/^x//}
62.endfor
63
64.if ${TARGET_ARCH} == ${MACHINE_ARCH}
65_fork_child= fork-child.c
66_infptrace= infptrace.c
67_inftarg= inftarg.c
68.endif
69
70GENSRCS= version.c
71
72version.c:
73 echo '#include "version.h"' > ${.TARGET}
74 echo 'const char version[] = ${VERSION};' >> ${.TARGET}
75 echo 'const char host_name[] = "${MACHINE_ARCH}-${VENDOR}-freebsd";' \
76 >> ${.TARGET}
77 echo 'const char target_name[] = "${TARGET_ARCH}-${VENDOR}-freebsd";' \
78 >> ${.TARGET}
79
80.include <bsd.lib.mk>