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