| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | # $NetBSD: Makefile,v 1.2 2011/06/24 05:26:06 mrg Exp $ | | 1 | # $NetBSD: Makefile,v 1.3 2011/06/28 04:23:01 mrg Exp $ |
2 | | | 2 | |
3 | LIBISPRIVATE= yes | | 3 | LIBISPRIVATE= yes |
4 | | | 4 | |
5 | LIB= backend | | 5 | LIB= backend |
6 | | | 6 | |
7 | SRCS= ${G_OBJS:.o=.c} ${G_out_file:T} | | 7 | SRCS= ${G_OBJS:.o=.c} ${G_out_file:T} |
8 | | | 8 | |
9 | CPPFLAGS+= -I. -I${GCCARCH} ${G_ALL_CFLAGS:M-D*} ${G_INCLUDES:M-I*:N-I.*} \ | | 9 | CPPFLAGS+= -I. -I${GCCARCH} ${G_ALL_CFLAGS:M-D*} ${G_INCLUDES:M-I*:N-I.*} \ |
10 | -DTARGET_NAME=\"${MACHINE_GNU_PLATFORM}\" | | 10 | -DTARGET_NAME=\"${MACHINE_GNU_PLATFORM}\" |
11 | HOST_CPPFLAGS+= -I. -I${GCCARCH} ${G_ALL_CFLAGS:M-D*} ${G_INCLUDES:M-I*:N-I.*} | | 11 | HOST_CPPFLAGS+= -I. -I${GCCARCH} ${G_ALL_CFLAGS:M-D*} ${G_INCLUDES:M-I*:N-I.*} |
12 | DPSRCS+= insn-attr.h insn-codes.h insn-config.h insn-flags.h tree-check.h | | 12 | DPSRCS+= insn-attr.h insn-codes.h insn-config.h insn-flags.h tree-check.h |
13 | CPPFLAGS.prefix.c+= -DPREFIX=\"/usr\" | | 13 | CPPFLAGS.prefix.c+= -DPREFIX=\"/usr\" |
14 | | | 14 | |
| @@ -33,27 +33,27 @@ CLEANFILES+= gengenrtl genrtl.c genrtl.h | | | @@ -33,27 +33,27 @@ CLEANFILES+= gengenrtl genrtl.c genrtl.h |
33 | insn-preds.c genpreds tm-preds.h tm_p.h cs-tm_p.h \ | | 33 | insn-preds.c genpreds tm-preds.h tm_p.h cs-tm_p.h \ |
34 | genmodes insn-modes.c insn-modes.h min-insn-modes.c \ | | 34 | genmodes insn-modes.c insn-modes.h min-insn-modes.c \ |
35 | auto-host.h build-print-rtl.c \ | | 35 | auto-host.h build-print-rtl.c \ |
36 | build-rtl.c build-errors.c build-varray.c \ | | 36 | build-rtl.c build-errors.c build-varray.c \ |
37 | build-bitmap.c build-ggc-none.c \ | | 37 | build-bitmap.c build-ggc-none.c \ |
38 | gt-*.h *.o *.lo \ | | 38 | gt-*.h *.o *.lo \ |
39 | cs-config.h \ | | 39 | cs-config.h \ |
40 | gcov-iov gcov-iov.h \ | | 40 | gcov-iov gcov-iov.h \ |
41 | | | 41 | |
42 | # | | 42 | # |
43 | # These files have special needs | | 43 | # These files have special needs |
44 | # | | 44 | # |
45 | .for f in \ | | 45 | .for f in \ |
46 | build-errors build-ggc-none build-print-rtl build-rtl build-varray dummy-conditions gcov-iov genattr genattrtab genautomata gencheck genchecksum gencodes genconditions genconfig genconstants genemit genextract genflags gengenrtl gengtype gengtype-lex gengtype-yacc genmddeps genmodes genopinit genoutput genpeep genpreds genrecog gensupport insn-conditions min-insn-modes read-rtl | | 46 | build-errors build-ggc-none build-print-rtl build-rtl build-varray dummy-conditions gcov-iov genattr genattrtab genautomata gencheck genchecksum gencodes genconditions genconfig genconstants genemit genextract genflags gengenrtl gengtype gengtype-lex genmddeps genmodes genopinit genoutput genpeep genpreds genrecog gensupport insn-conditions min-insn-modes read-rtl |
47 | CPPFLAGS.${f}.c= -DGENERATOR_FILE | | 47 | CPPFLAGS.${f}.c= -DGENERATOR_FILE |
48 | .endfor | | 48 | .endfor |
49 | | | 49 | |
50 | # XXX | | 50 | # XXX |
51 | COPTS.varasm.c= -Wno-error | | 51 | COPTS.varasm.c= -Wno-error |
52 | | | 52 | |
53 | | | 53 | |
54 | # Headers that host objects depend on (except gen*rtl*) | | 54 | # Headers that host objects depend on (except gen*rtl*) |
55 | HH_NORTL= ${G_tm_file_list} ${G_build_xm_include_list} | | 55 | HH_NORTL= ${G_tm_file_list} ${G_build_xm_include_list} |
56 | HH= ${HH_NORTL} genrtl.h insn-modes.h | | 56 | HH= ${HH_NORTL} genrtl.h insn-modes.h |
57 | | | 57 | |
58 | # | | 58 | # |
59 | # Generate the various header files we need. | | 59 | # Generate the various header files we need. |
| @@ -78,35 +78,39 @@ insn-preds.c: genpreds ${G_md_file} | | | @@ -78,35 +78,39 @@ insn-preds.c: genpreds ${G_md_file} |
78 | genpreds.lo: ${HH} | | 78 | genpreds.lo: ${HH} |
79 | genpreds: genpreds.lo ${EXTRADEPENDSEARLY} | | 79 | genpreds: genpreds.lo ${EXTRADEPENDSEARLY} |
80 | ${_MKTARGET_LINK} | | 80 | ${_MKTARGET_LINK} |
81 | ${HOST_LINK.c} -o ${.TARGET} ${.ALLSRC} ${NBCOMPATLIB} ${HOSTLIBIBERTY} | | 81 | ${HOST_LINK.c} -o ${.TARGET} ${.ALLSRC} ${NBCOMPATLIB} ${HOSTLIBIBERTY} |
82 | | | 82 | |
83 | tree-check.h: gencheck | | 83 | tree-check.h: gencheck |
84 | ${_MKTARGET_CREATE} | | 84 | ${_MKTARGET_CREATE} |
85 | ./gencheck >${.TARGET} | | 85 | ./gencheck >${.TARGET} |
86 | gencheck.lo: ${HH} | | 86 | gencheck.lo: ${HH} |
87 | gencheck: gencheck.lo | | 87 | gencheck: gencheck.lo |
88 | ${_MKTARGET_LINK} | | 88 | ${_MKTARGET_LINK} |
89 | ${HOST_LINK.c} -o ${.TARGET} ${.ALLSRC} ${NBCOMPATLIB} ${HOSTLIBIBERTY} | | 89 | ${HOST_LINK.c} -o ${.TARGET} ${.ALLSRC} ${NBCOMPATLIB} ${HOSTLIBIBERTY} |
90 | | | 90 | |
| | | 91 | gtyp-input.list: Makefile |
| | | 92 | for f in ${G_GTFILES}; do echo $f; done > ${.TARGET} |
| | | 93 | CLEANFILES+= gtyp-input.list |
| | | 94 | |
91 | gtype-desc.c: gtype-desc.h | | 95 | gtype-desc.c: gtype-desc.h |
92 | gtype-desc.h: gengtype | | 96 | gtype-desc.h: gengtype |
93 | ${_MKTARGET_CREATE} | | 97 | ${_MKTARGET_CREATE} |
94 | rm -f auto-host.h | | 98 | rm -f auto-host.h |
95 | ln -s ${.CURDIR}/../gcc/arch/${MACHINE_ARCH}/auto-host.h . | | 99 | ln -s ${.CURDIR}/../gcc/arch/${MACHINE_ARCH}/auto-host.h . |
96 | ./gengtype | | 100 | ./gengtype ${DIST} gtyp-input.list |
97 | # gengtype is the real need for options.h | | 101 | # gengtype is the real need for options.h |
98 | gengtype.lo gengtype-lex.lo gengtype-yacc.lo: ${HH} gtyp-gen.h config.h options.h | | 102 | gengtype.lo gengtype-lex.lo gengtype-parse.lo: ${HH} gtyp-gen.h config.h options.h |
99 | gengtype: gengtype.lo gengtype-lex.lo gengtype-yacc.lo build-errors.lo | | 103 | gengtype: gengtype.lo gengtype-lex.lo gengtype-parse.lo build-errors.lo gtyp-input.list |
100 | ${_MKTARGET_LINK} | | 104 | ${_MKTARGET_LINK} |
101 | ${HOST_LINK.c} -o ${.TARGET} ${.ALLSRC} ${NBCOMPATLIB} ${HOSTLIBIBERTY} | | 105 | ${HOST_LINK.c} -o ${.TARGET} ${.ALLSRC} ${NBCOMPATLIB} ${HOSTLIBIBERTY} |
102 | | | 106 | |
103 | gtyp-gen.h: Makefile | | 107 | gtyp-gen.h: Makefile |
104 | ${_MKTARGET_CREATE} | | 108 | ${_MKTARGET_CREATE} |
105 | (\ | | 109 | (\ |
106 | echo "static const char *srcdir = \"$(G_GTFILES_SRCDIR)\";" ; \ | | 110 | echo "static const char *srcdir = \"$(G_GTFILES_SRCDIR)\";" ; \ |
107 | echo "static const char *lang_files[] = {" ; \ | | 111 | echo "static const char *lang_files[] = {" ; \ |
108 | for f in $(G_GTFILES_FILES_FILES); do echo "\"$$f\", "; done ; \ | | 112 | for f in $(G_GTFILES_FILES_FILES); do echo "\"$$f\", "; done ; \ |
109 | echo "NULL };" ; \ | | 113 | echo "NULL };" ; \ |
110 | echo "static const char *langs_for_lang_files[] = {" ; \ | | 114 | echo "static const char *langs_for_lang_files[] = {" ; \ |
111 | for f in $(G_GTFILES_FILES_LANGS); do echo "\"$$f\", "; done ; \ | | 115 | for f in $(G_GTFILES_FILES_LANGS); do echo "\"$$f\", "; done ; \ |
112 | echo "NULL };" ; \ | | 116 | echo "NULL };" ; \ |