]> CyberLeo.Net >> Repos - FreeBSD/stable/8.git/blob - gnu/usr.bin/cc/cc_tools/Makefile
MFC r362623:
[FreeBSD/stable/8.git] / gnu / usr.bin / cc / cc_tools / Makefile
1 # $FreeBSD$
2
3 .include <bsd.own.mk>
4
5 CFLAGS+=        -I.
6
7 .include "../Makefile.inc"
8
9 CFLAGS+=        -g
10 CFLAGS+=        -DGENERATOR_FILE -DHAVE_CONFIG_H
11
12 # Override LIBIBERTY set by Makefile.inc, We use our own for
13 # build tools.
14 LIBIBERTY=      libiberty.a
15
16 .PATH:  ${GCCDIR} ${GCCLIB}/libiberty
17
18 #-----------------------------------------------------------------------
19 # Determine content of variables used by the target/host config files
20
21 #
22 # The list of headers to go into tm.h
23 #
24 TARGET_INC+=    options.h
25 .if ${TARGET_ARCH} == "amd64"
26 TARGET_INC+=    i386/biarch64.h
27 .endif
28 .if ${TARGET_ARCH} != "arm"
29 TARGET_INC+=    ${GCC_CPU}/${GCC_CPU}.h
30 .endif
31 .if ${TARGET_ARCH} == "i386" || ${TARGET_ARCH} == "amd64"
32 TARGET_INC+=    ${GCC_CPU}/unix.h
33 TARGET_INC+=    ${GCC_CPU}/att.h
34 .endif
35 TARGET_INC+=    dbxelf.h
36 TARGET_INC+=    elfos-undef.h
37 TARGET_INC+=    elfos.h
38 TARGET_INC+=    freebsd-native.h
39 TARGET_INC+=    freebsd-spec.h
40 TARGET_INC+=    freebsd.h
41 .if ${TARGET_ARCH} != "i386" && ${TARGET_ARCH} != "amd64"
42 . if exists(${GCCDIR}/config/${GCC_CPU}/sysv4.h)
43 TARGET_INC+=    ${GCC_CPU}/sysv4.h
44 . endif
45 .endif
46 .if ${TARGET_ARCH} == "amd64"
47 TARGET_INC+=    ${GCC_CPU}/x86-64.h
48 .endif
49 .if ${TARGET_ARCH} == "arm" || ${TARGET_ARCH} == "mips"
50 TARGET_INC+=    ${GCC_CPU}/elf.h
51 .endif
52 .if ${TARGET_ARCH} == "arm"
53 TARGET_INC+=    ${GCC_CPU}/aout.h
54 .endif
55 TARGET_INC+=    ${GCC_CPU}/freebsd.h
56 .if ${TARGET_ARCH} == "amd64"
57 TARGET_INC+=    ${GCC_CPU}/freebsd64.h
58 .endif
59 .if ${TARGET_ARCH} == "arm"
60 TARGET_INC+=    ${GCC_CPU}/arm.h
61 .endif
62 TARGET_INC+=    defaults.h
63
64 .for H in ${TARGET_INC}
65 .for D in ${GCCDIR}/config ${GCCDIR} ${.CURDIR}
66 .if exists($D/$H)
67 TARGET_INC_FILES+=     $D/$H
68 .endif
69 .endfor
70 .endfor
71
72 #
73 # gtyp includes.
74 #
75 srcdir=         ${GCCDIR}
76 CPPLIB_H=       ${GCCLIB}/libcpp/include/line-map.h \
77                 ${GCCLIB}/libcpp/include/cpplib.h
78 SYMTAB_H=       ${GCCLIB}/libcpp/include/symtab.h
79 CPP_ID_DATA_H=  ${CPPLIB_H} ${GCCLIB}/libcpp/include/cpp-id-data.h
80 HASHTAB_H=      ${GCCLIB}/include/hashtab.h
81 SPLAY_TREE_H=   ${GCCLIB}/include/splay-tree.h
82 out_file=       ${srcdir}/config/${GCC_CPU}/${GCC_CPU}.c
83 tm_file_list=   ${TARGET_INC_FILES}
84 host_xm_file_list= ${.CURDIR}/auto-host.h ${GCCLIB}/include/ansidecl.h
85 GTFILES_SRCDIR= ${srcdir}
86
87 # Copied unchanged from gcc/Makefile.in
88 GTFILES = $(srcdir)/input.h $(srcdir)/coretypes.h \
89   $(CPP_ID_DATA_H) $(host_xm_file_list) \
90   $(tm_file_list) $(HASHTAB_H) $(SPLAY_TREE_H) $(srcdir)/bitmap.h \
91   $(srcdir)/coverage.c $(srcdir)/rtl.h \
92   $(srcdir)/optabs.h $(srcdir)/tree.h $(srcdir)/function.h $(srcdir)/libfuncs.h $(SYMTAB_H) \
93   $(srcdir)/real.h $(srcdir)/varray.h $(srcdir)/insn-addr.h $(srcdir)/hwint.h \
94   $(srcdir)/ipa-reference.h $(srcdir)/output.h \
95   $(srcdir)/cselib.h $(srcdir)/basic-block.h  $(srcdir)/cgraph.h \
96   $(srcdir)/c-common.h $(srcdir)/c-tree.h $(srcdir)/reload.h \
97   $(srcdir)/alias.c $(srcdir)/bitmap.c $(srcdir)/cselib.c $(srcdir)/cgraph.c \
98   $(srcdir)/ipa-prop.c $(srcdir)/ipa-cp.c $(srcdir)/ipa-inline.c \
99   $(srcdir)/dbxout.c $(srcdir)/dwarf2out.c $(srcdir)/dwarf2asm.c \
100   $(srcdir)/dojump.c $(srcdir)/tree-profile.c \
101   $(srcdir)/emit-rtl.c $(srcdir)/except.c $(srcdir)/explow.c $(srcdir)/expr.c \
102   $(srcdir)/function.c $(srcdir)/except.h \
103   $(srcdir)/gcse.c $(srcdir)/integrate.c $(srcdir)/lists.c $(srcdir)/optabs.c \
104   $(srcdir)/profile.c $(srcdir)/regclass.c \
105   $(srcdir)/reg-stack.c $(srcdir)/cfglayout.c \
106   $(srcdir)/sdbout.c $(srcdir)/stor-layout.c \
107   $(srcdir)/stringpool.c $(srcdir)/tree.c $(srcdir)/varasm.c \
108   $(srcdir)/tree-mudflap.c $(srcdir)/tree-flow.h \
109   $(srcdir)/c-objc-common.c $(srcdir)/c-common.c $(srcdir)/c-parser.c \
110   $(srcdir)/tree-ssanames.c $(srcdir)/tree-eh.c $(srcdir)/tree-ssa-address.c \
111   $(srcdir)/tree-phinodes.c $(srcdir)/tree-cfg.c \
112   $(srcdir)/tree-dfa.c $(srcdir)/tree-ssa-propagate.c \
113   $(srcdir)/tree-iterator.c $(srcdir)/gimplify.c \
114   $(srcdir)/tree-chrec.h $(srcdir)/tree-vect-generic.c \
115   $(srcdir)/tree-ssa-operands.h $(srcdir)/tree-ssa-operands.c \
116   $(srcdir)/tree-profile.c $(srcdir)/tree-nested.c \
117   $(srcdir)/ipa-reference.c $(srcdir)/tree-ssa-structalias.h \
118   $(srcdir)/tree-ssa-structalias.c \
119   $(srcdir)/c-pragma.h $(srcdir)/omp-low.c \
120   $(srcdir)/targhooks.c $(srcdir)/cgraphunit.c $(out_file) \
121
122 # The list of frontend directories to look into
123 GTFILES_LANG_DIR_NAMES=
124
125 .if ${MK_CXX} != "no"
126 GTFILES_LANG_DIR_NAMES+=        cp
127 .endif
128
129 .if ${MK_OBJC} != "no"
130 GTFILES_LANG_DIR_NAMES+=        objc
131 .endif
132
133 # The list of language specific files for gengtype
134 .for L in ${GTFILES_LANG_DIR_NAMES} c
135 .if exists(${GCCDIR}/$L-config-lang.in)
136 # Source the language config file
137 L_GTFILES!=     sh -c '. ${GCCDIR}/$L-config-lang.in; echo $$gtfiles'
138 .else
139 L_GTFILES!=     sh -c '. ${GCCDIR}/$L/config-lang.in; echo $$gtfiles'
140 .endif
141 .for F in ${L_GTFILES}
142 GTFILES_FILES+= $F
143 GTFILES_LANGS+= $L
144 .endfor
145 .endfor
146 GTFILES+=       ${GTFILES_FILES}
147
148 #
149 # Tree definition files.
150 #
151 TREE_DEF_FILES=
152
153 .if ${MK_CXX} != "no"
154 TREE_DEF_FILES+=        cp/cp-tree.def
155 .endif
156
157 .if ${MK_OBJC} != "no"
158 TREE_DEF_FILES+=        objc/objc-tree.def
159 .endif
160
161 #
162 # Option files.
163 #
164 OPT_FILES=      c.opt common.opt
165
166 .if exists(${GCCDIR}/config/${GCC_CPU}/${GCC_CPU}.opt)
167 OPT_FILES+=     ${GCCDIR}/config/${GCC_CPU}/${GCC_CPU}.opt
168 .endif
169
170 .if exists(${.CURDIR}/${GCC_CPU}-freebsd.opt)
171 OPT_FILES+=     ${.CURDIR}/${GCC_CPU}-freebsd.opt
172 .endif
173
174 .if ${TARGET_ARCH} == "powerpc"
175 OPT_FILES+=     ${GCCDIR}/config/${GCC_CPU}/sysv4.opt
176 .endif
177
178 .if ${TARGET_ARCH} == "sparc64"
179 OPT_FILES+=     ${GCCDIR}/config/${GCC_CPU}/long-double-switch.opt
180 .endif
181
182 .if exists(${.CURDIR}/freebsd.opt)
183 OPT_FILES+=     ${.CURDIR}/freebsd.opt
184 .endif
185
186 #-----------------------------------------------------------------------
187 # Build rules for header files and generator tools
188
189 # Host config
190 config.h:
191         TARGET_CPU_DEFAULT="${TARGET_CPU_DEFAULT}" \
192         HEADERS="auto-host.h ansidecl.h" \
193         DEFINES="" \
194         /bin/sh ${GCCDIR}/mkconfig.sh ${.TARGET}
195
196 GENSRCS+=       config.h
197 CLEANFILES+=    cs-config.h
198
199 # Build config
200 bconfig.h:
201         TARGET_CPU_DEFAULT="${TARGET_CPU_DEFAULT}" \
202         HEADERS="auto-host.h ansidecl.h" \
203         DEFINES="" \
204         /bin/sh ${GCCDIR}/mkconfig.sh ${.TARGET}
205 .if exists(${GCCDIR}/config/${GCC_CPU}/${GCC_CPU}-modes.def)
206         echo '#define EXTRA_MODES_FILE "${GCC_CPU}/${GCC_CPU}-modes.def"' >> ${.TARGET}
207 .endif
208
209 GENSRCS+=       bconfig.h
210 CLEANFILES+=    cs-bconfig.h
211
212 # tconfig.h
213 tconfig.h:
214         TARGET_CPU_DEFAULT="${TARGET_CPU_DEFAULT}" \
215         HEADERS="auto-host.h ansidecl.h" \
216         DEFINES="USED_FOR_TARGET" \
217         /bin/sh ${GCCDIR}/mkconfig.sh ${.TARGET}
218
219 GENSRCS+=       tconfig.h
220 CLEANFILES+=    cs-tconfig.h
221 # Options
222 optionlist: ${OPT_FILES}
223         LC_ALL=C awk -f ${GCCDIR}/opt-gather.awk ${.ALLSRC} > ${.TARGET}
224
225 options.h:      optionlist
226         LC_ALL=C awk -f ${GCCDIR}/opt-functions.awk \
227             -f ${GCCDIR}/opth-gen.awk \
228                 < ${.ALLSRC} > ${.TARGET}
229
230 options.c:      optionlist
231         LC_ALL=C awk -f ${GCCDIR}/opt-functions.awk \
232             -f ${GCCDIR}/optc-gen.awk \
233                 -v header_name="config.h system.h coretypes.h tm.h" \
234                 < ${.ALLSRC} > ${.TARGET}
235 GENONLY+=       optionlist options.h options.c
236
237 # Target machine config
238 tm.h:
239         TARGET_CPU_DEFAULT="${TARGET_CPU_DEFAULT}" \
240         HEADERS="${TARGET_INC}" \
241         DEFINES="" \
242         /bin/sh ${GCCDIR}/mkconfig.sh ${.TARGET}
243 .if exists(${GCCDIR}/config/${GCC_CPU}/${GCC_CPU}-modes.def)
244         echo '#define EXTRA_MODES_FILE "${GCC_CPU}/${GCC_CPU}-modes.def"' >> ${.TARGET}
245 .endif
246
247 GENSRCS+=       tm.h
248 CLEANFILES+=    cs-tm.h
249
250 # Target machine protos/preds.
251 tm_p.h:
252         TARGET_CPU_DEFAULT="${TARGET_CPU_DEFAULT}" \
253         HEADERS="${GCC_CPU}/${GCC_CPU}-protos.h tm-preds.h" \
254         DEFINES="" \
255         /bin/sh ${GCCDIR}/mkconfig.sh tm_p.h
256
257 GENSRCS+=       tm_p.h
258 CLEANFILES+=    cs-tm_p.h
259
260 # gencheck
261 gencheck.h: ${TREE_DEF_FILES}
262 .for F in ${TREE_DEF_FILES}
263         echo "#include \"$F\""                                  >> ${.TARGET}
264 .endfor
265         touch ${.TARGET}
266
267 GENSRCS+=       gencheck.h
268
269
270 # Source header for gtyp generator.
271 gtyp-gen.h:     ${GTFILES}
272         echo "/* This file is machine generated.  Do not edit.  */" > ${.TARGET}
273         echo "static const char * const srcdir = "              >> ${.TARGET}
274         echo "\"$(GTFILES_SRCDIR)\";"                           >> ${.TARGET}
275         echo "static const char * const lang_files[] = {"       >> ${.TARGET}
276 .for F in ${GTFILES_FILES}
277         echo "\"$F\", "                                         >> ${.TARGET}
278 .endfor
279         echo "NULL};"                                           >> ${.TARGET}
280         echo "static const char * const langs_for_lang_files[] = {">> ${.TARGET}
281 .for F in ${GTFILES_LANGS}
282         echo "\"$F\", "                                         >> ${.TARGET}
283 .endfor
284         echo "NULL};"                                           >> ${.TARGET}
285         echo "static const char * const all_files[] = {"        >> ${.TARGET}
286 .for F in ${GTFILES}
287         echo "\"$F\", "                                         >> ${.TARGET}
288 .endfor
289         echo "NULL};"                                           >> ${.TARGET}
290         echo "static const char * const lang_dir_names[] = {"   >> ${.TARGET}
291 .for F in c ${GTFILES_LANG_DIR_NAMES}
292         echo "\"$F\", "                                         >> ${.TARGET}
293 .endfor
294         echo "NULL};"                                           >> ${.TARGET}
295
296 GENSRCS+=       gtyp-gen.h
297
298 # Version header for gcov
299 gcov-iov.h:
300         echo "#define GCOV_VERSION ((gcov_unsigned_t)0x34303270)" >> ${.TARGET}
301
302 GENSRCS+=       gcov-iov.h
303
304 # Multilib config file
305 multilib.h:
306 .if ${TARGET_ARCH} == "amd64"
307         echo 'static const char *const multilib_raw[] = { \
308             ". !m64 !m32;", \
309             "64:../lib m64 !m32;", \
310             "32:../lib32 !m64 m32;", NULL };'                   > ${.TARGET}
311         echo 'static const char *const multilib_matches_raw[] = { \
312             "m64 m64;", "m32 m32;", NULL };'                    >> ${.TARGET}
313         echo 'static const char *multilib_options = "m64/m32";' >> ${.TARGET}
314 .else
315         echo 'static const char *const multilib_raw[] = { \
316             ". ;", NULL };'                                     > ${.TARGET}
317         echo 'static const char *const multilib_matches_raw[] = { \
318             NULL };'                                            >> ${.TARGET}
319         echo 'static const char *multilib_options = "";'        >> ${.TARGET}
320 .endif
321         echo 'static const char *multilib_extra = "";'          >> ${.TARGET}
322         echo 'static const char *const multilib_exclusions_raw[] = { \
323             NULL };'                                            >> ${.TARGET}
324
325 GENSRCS+=       multilib.h
326
327 configargs.h:
328         echo 'static const char configuration_arguments[] ='    > ${.TARGET}
329         echo '  "FreeBSD/${TARGET_ARCH} system compiler";'      >> ${.TARGET}
330         echo 'static const char thread_model[] = "posix";'      >> ${.TARGET}
331         echo 'static const struct {'                            >> ${.TARGET}
332         echo '  const char *name, *value;'                      >> ${.TARGET}
333         echo '} configure_default_options[] = {'                >> ${.TARGET}
334         echo '  { "NULL", "NULL" } };'                          >> ${.TARGET}
335
336 GENSRCS+=       configargs.h
337
338 # Language spec files
339 specs.h:
340         echo '#include "cp/lang-specs.h"'                       > ${.TARGET}
341         echo '#include "objc/lang-specs.h"'                     >> ${.TARGET}
342
343 GENSRCS+=       specs.h
344
345 gstdint.h:
346         echo '#include "sys/types.h"'                           > ${.TARGET}
347         echo '#include "sys/stdint.h"'                          >> ${.TARGET}
348
349 GENSRCS+=       gstdint.h
350
351 # Linked headers
352 gthr-default.h: ${GCCDIR}/gthr-posix.h
353         ln -sf ${.ALLSRC} ${.TARGET}
354
355 GENSRCS+=       gthr-default.h
356
357 unwind.h: ${GCCDIR}/unwind-generic.h
358         ln -sf ${.ALLSRC} ${.TARGET}
359
360 GENSRCS+=       unwind.h
361
362 #
363 # gtype gunk
364 #
365 gengtype-lex.c: gengtype-lex.l
366         flex -ogengtype-lex.c ${.ALLSRC}
367
368 gengtype-yacc.h: gengtype-yacc.y
369         yacc -d -o gengtype-yacc.c ${.ALLSRC}
370
371 gengtype-yacc.c: gengtype-yacc.h
372
373 gengtype-yacc+%DIKED.c: gengtype-yacc.c
374         cat    ${.ALLSRC} > ${.TARGET}
375         sed -e "s/xmalloc/malloc/g" \
376             -e "s/xrealloc/realloc/g" \
377             -e "s/malloc/xmalloc/g" \
378             -e "s/realloc/xrealloc/g" \
379             ${.ALLSRC} > ${.TARGET}
380
381 GENSRCS+= gengtype-lex.c gengtype-yacc.h gengtype-yacc+%DIKED.c
382 CLEANFILES+= gengtype-yacc.c
383
384 gengtype: gengtype.o gengtype-yacc+%DIKED.o gengtype-lex.o errors.o \
385           ${LIBIBERTY}
386         ${CC} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${.ALLSRC}
387
388 gtype-desc.h:   gengtype
389         ./gengtype
390         touch ${.TARGET}
391
392 gtype-desc.c:   gtype-desc.h
393
394 GENONLY+=       gtype-desc.c gtype-desc.h
395 CLEANFILES+=    gt-*.h gtype-*.h
396
397 #
398 # Generator tools.
399 #
400 .for F in check checksum genrtl modes
401 gen$F:  gen$F.o errors.o ${LIBIBERTY}
402         ${CC} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${.ALLSRC}
403 .endfor
404
405 .for F in attr attrtab automata codes conditions config constants emit \
406         extract flags  opinit output peep preds recog
407 gen$F:  gen$F.o rtl.o read-rtl.o ggc-none.o vec.o min-insn-modes.o \
408         gensupport.o print-rtl.o errors.o ${LIBIBERTY}
409         ${CC} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${.ALLSRC} -lm
410 .endfor
411
412 gencondmd:      gencondmd.o
413         ${CC} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${.ALLSRC}
414
415 #
416 # Generated .md files.
417 #
418 insn-conditions.md:     gencondmd
419         ./gencondmd > ${.TARGET}
420 GENSRCS+=       insn-conditions.md
421
422 #
423 # Generated header files.
424 #
425
426 .for F in constants
427 insn-$F.h:      gen$F ${MD_FILE}
428         ./gen$F ${MD_FILE} > ${.TARGET}
429 GENSRCS+=       insn-$F.h
430 .endfor
431
432 .for F in attr codes config flags
433 insn-$F.h:      gen$F ${MD_FILE} insn-conditions.md
434         ./gen$F ${MD_FILE} insn-conditions.md > ${.TARGET}
435 GENSRCS+=       insn-$F.h
436 .endfor
437
438 # Header files with irregular names.
439 genrtl.h:       gengenrtl
440         ./gengenrtl -h > ${.TARGET}
441 GENSRCS+=       genrtl.h
442
443 tm-preds.h:     genpreds
444         ./genpreds -h ${MD_FILE} > ${.TARGET}
445 GENSRCS+=       tm-preds.h
446
447 tm-constrs.h:   genpreds
448         ./genpreds -c ${MD_FILE} > ${.TARGET}
449 GENSRCS+=       tm-constrs.h
450
451 tree-check.h:   gencheck
452         ./gencheck > ${.TARGET}
453 GENSRCS+=       tree-check.h
454
455 insn-modes.h:   genmodes
456         ./genmodes -h > ${.TARGET}
457 GENSRCS+=       insn-modes.h
458
459 #
460 # Generated source files.
461 #
462 .for F in attrtab automata emit extract opinit output peep preds recog
463 insn-$F.c:      gen$F ${MD_FILE} insn-conditions.md
464         ./gen$F ${MD_FILE} insn-conditions.md > ${.TARGET}
465 GENONLY+=       insn-$F.c
466 .endfor
467
468 .for F in conditions
469 insn-$F.c:      gen$F ${MD_FILE}
470         ./gen$F ${MD_FILE} > ${.TARGET}
471 GENSRCS+=       insn-$F.c
472 .endfor
473
474 # Source files with irregular names.
475 insn-modes.c:   genmodes
476         ./genmodes > ${.TARGET}
477 GENONLY+=       insn-modes.c
478
479 min-insn-modes.c:       genmodes
480         ./genmodes -m > ${.TARGET}
481 GENSRCS+=       min-insn-modes.c
482
483 genrtl.c:       gengenrtl
484         ./gengenrtl > ${.TARGET}
485 GENONLY+=       genrtl.c
486
487 gencondmd.c:    genconditions ${MD_FILE}
488         ./genconditions ${MD_FILE} > ${.TARGET}
489 GENSRCS+=       gencondmd.c
490
491 #-----------------------------------------------------------------------
492 # Build tools.
493
494 GNTOOLS+=       genattr genattrtab genautomata gencodes gencheck genchecksum \
495                 genconditions gencondmd genconfig genconstants genemit \
496                 genextract genflags gengenrtl gengtype genmodes genopinit \
497                 genoutput genpeep genpreds genrecog
498
499 all: ${GNTOOLS} ${GENSRCS} ${GENONLY}
500 beforedepend: ${GENONLY}
501
502 #
503 #-----------------------------------------------------------------------
504 # Build 'pocket' libiberty exclusively for build tools use.
505
506 LIBIBERTY_SRCS= choose-temp.c concat.c cp-demangle.c cp-demint.c cplus-dem.c \
507         dyn-string.c fibheap.c fopen_unlocked.c getpwd.c getruntime.c \
508         hashtab.c hex.c lbasename.c make-temp-file.c md5.c obstack.c \
509         partition.c pex-unix.c physmem.c safe-ctype.c splay-tree.c xexit.c \
510         xmalloc.c xmemdup.c xstrdup.c xstrerror.c
511 LIBIBERTY_OBJS= ${LIBIBERTY_SRCS:R:S/$/.o/g}
512
513 .for _src in ${LIBIBERTY_SRCS}
514 ${_src:R:S/$/.o/}: ${_src}
515         ${CC} -c -I ${.CURDIR}/../libiberty ${CFLAGS} -o ${.TARGET} ${.IMPSRC}
516 .endfor
517
518 ${LIBIBERTY}: ${LIBIBERTY_OBJS}
519         @rm -f ${.TARGET}
520         @${AR} cq ${.TARGET} `lorder ${LIBIBERTY_OBJS} | tsort -q`
521         ${RANLIB} ${.TARGET}
522 CLEANFILES+=    ${LIBIBERTY} ${LIBIBERTY_OBJS}
523
524
525 #-----------------------------------------------------------------------
526 # Fixups.
527
528 # Set OBJS the same as bsd.prog.mk would do if we defined PROG.  We can't
529 # define PROG because we have multiple programs.
530 #
531 SRCS=           errors.c genattr.c genattrtab.c \
532                 genautomata.c gencheck.c genchecksum.c gencodes.c \
533                 genconditions.c genconfig.c genconstants.c genemit.c \
534                 genextract.c genflags.c gengenrtl.c gengtype.c genmodes.c \
535                 genopinit.c genoutput.c genpeep.c genpreds.c genrecog.c \
536                 gensupport.c ggc-none.c print-rtl.c read-rtl.c rtl.c \
537                 vec.c
538
539 SRCS+=          ${GENSRCS}
540 OBJS+=          ${SRCS:N*.h:R:S/$/.o/g}
541 GENOBJS+=       ${GENSRCS:N*.h:R:S/$/.o/g}
542 CLEANFILES+=    ${GENSRCS} ${GENONLY} ${GENOBJS} ${GNTOOLS}
543
544 #-----------------------------------------------------------------------
545 # Manual dependencies.
546 .if !exists(${DEPENDFILE})
547 .include  "Makefile.dep"
548 .endif
549
550 .include <bsd.prog.mk>
551 # DO NOT DELETE