Fix target machine define in compiler.
[dragonfly.git] / gnu / usr.bin / cc41 / Makefile.tgt
1 # $DragonFly: src/gnu/usr.bin/cc41/Makefile.tgt,v 1.2 2008/06/30 19:04:49 hasso Exp $
2
3 TARGET_ARCH?=   ${MACHINE_ARCH}
4
5 version=        4.1.2
6 target_machine= ${TARGET_ARCH}-pc-dragonflybsd
7
8 GCC_CPU?=       ${TARGET_ARCH}
9 .if ${TARGET_ARCH} == "amd64"
10 GCC_CPU=        i386
11 .endif
12
13 CFLAGS+=        -DLOLL
14
15 # from gcc/Makefile
16 srcdir= ${GCCDIR}/gcc
17
18 host_xm_file_list=      ${STOPDIR}/cc_prep/dragonfly-native.h
19 host_xm_file_list+=     ${GCCDIR}/include/ansidecl.h
20 HASHTAB_H   = ${GCCDIR}/include/hashtab.h
21 SPLAY_TREE_H= ${GCCDIR}/include/splay-tree.h
22 SYMTAB_H    = ${GCCDIR}/libcpp/include/symtab.h
23 CPP_ID_DATA_H=  ${GCCDIR}/libcpp/include/line-map.h \
24                 ${GCCDIR}/libcpp/include/cpplib.h \
25                 ${GCCDIR}/libcpp/include/cpp-id-data.h
26
27 out_file=       $(srcdir)/config/${GCC_CPU}/${GCC_CPU}.c
28
29 GTFILES_SRCDIR = $(srcdir)
30
31 # This is ordered to avoid build warnings/errors
32
33 TARGET_INC=     options.h
34 .if ${TARGET_ARCH} == "amd64"
35 TARGET_INC+=    i386/biarch64.h
36 .endif
37 TARGET_INC+=    ${GCC_CPU}/${GCC_CPU}.h
38 .if ${TARGET_ARCH} == "i386" || ${TARGET_ARCH} == "amd64"
39 TARGET_INC+=    ${GCC_CPU}/unix.h
40 TARGET_INC+=    ${GCC_CPU}/att.h
41 .endif
42 TARGET_INC+=    dbxelf.h
43 TARGET_INC+=    elfos.h
44 TARGET_INC+=    dragonfly-spec.h
45 TARGET_INC+=    dragonfly.h
46 .if ${TARGET_ARCH} == "amd64"
47 TARGET_INC+=   ${GCC_CPU}/x86-64.h
48 .endif
49 TARGET_INC+=    ${GCC_CPU}/dragonfly.h
50 .if ${TARGET_ARCH} == "amd64"
51 TARGET_INC+=   ${GCC_CPU}/dragonfly64.h
52 .endif
53 TARGET_INC+=    defaults.h
54
55 #
56 # Use TARGET_INC as a template and build a list of target specific
57 # include files for gengtype to scan
58 #
59 tm_file_list=   ${STOPDIR}/cc_prep/dragonfly-native.h
60
61 .for H in ${TARGET_INC}
62 .for D in ${GCCDIR}/gcc/config ${GCCDIR}/gcc ${STOPDIR}/cc_prep/config ${STOPDIR}/cc_prep
63 .if exists($D/$H)
64 tm_file_list+=  $D/$H
65 .endif
66 .endfor
67 .endfor