]> CyberLeo.Net >> Repos - FreeBSD/releng/10.3.git/blob - gnu/usr.bin/cc/cc_tools/Makefile
- Copy stable/10@296371 to releng/10.3 in preparation for 10.3-RC1
[FreeBSD/releng/10.3.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_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 .if ${MK_ARM_EABI} != "no"
55 TARGET_INC+=    ${GCC_CPU}/bpabi.h
56 .endif
57 .endif
58 .if ${TARGET_ARCH} == "powerpc64"
59 TARGET_INC+=    ${GCC_CPU}/biarch64.h
60 TARGET_INC+=    ${GCC_CPU}/default64.h
61 .endif
62 TARGET_INC+=    ${GCC_CPU}/freebsd.h
63 .if ${TARGET_CPUARCH} == "amd64"
64 TARGET_INC+=    ${GCC_CPU}/freebsd64.h
65 .endif
66 .if ${TARGET_CPUARCH} == "arm"
67 TARGET_INC+=    ${GCC_CPU}/arm.h
68 .endif
69 TARGET_INC+=    defaults.h
70
71 .for H in ${TARGET_INC}
72 .for D in ${GCCDIR}/config ${GCCDIR} ${.CURDIR}
73 .if exists($D/$H)
74 TARGET_INC_FILES+=     $D/$H
75 .endif
76 .endfor
77 .endfor
78
79 #
80 # gtyp includes.
81 #
82 srcdir=         ${GCCDIR}
83 CPPLIB_H=       ${GCCLIB}/libcpp/include/line-map.h \
84                 ${GCCLIB}/libcpp/include/cpplib.h
85 SYMTAB_H=       ${GCCLIB}/libcpp/include/symtab.h
86 CPP_ID_DATA_H=  ${CPPLIB_H} ${GCCLIB}/libcpp/include/cpp-id-data.h
87 HASHTAB_H=      ${GCCLIB}/include/hashtab.h
88 SPLAY_TREE_H=   ${GCCLIB}/include/splay-tree.h
89 out_file=       ${srcdir}/config/${GCC_CPU}/${GCC_CPU}.c
90 tm_file_list=   ${TARGET_INC_FILES}
91 host_xm_file_list= ${.CURDIR}/auto-host.h ${GCCLIB}/include/ansidecl.h
92 GTFILES_SRCDIR= ${srcdir}
93
94 # Copied unchanged from gcc/Makefile.in
95 GTFILES = $(srcdir)/input.h $(srcdir)/coretypes.h \
96   $(CPP_ID_DATA_H) $(host_xm_file_list) \
97   $(tm_file_list) $(HASHTAB_H) $(SPLAY_TREE_H) $(srcdir)/bitmap.h \
98   $(srcdir)/coverage.c $(srcdir)/rtl.h \
99   $(srcdir)/optabs.h $(srcdir)/tree.h $(srcdir)/function.h $(srcdir)/libfuncs.h $(SYMTAB_H) \
100   $(srcdir)/real.h $(srcdir)/varray.h $(srcdir)/insn-addr.h $(srcdir)/hwint.h \
101   $(srcdir)/ipa-reference.h $(srcdir)/output.h \
102   $(srcdir)/cselib.h $(srcdir)/basic-block.h  $(srcdir)/cgraph.h \
103   $(srcdir)/c-common.h $(srcdir)/c-tree.h $(srcdir)/reload.h \
104   $(srcdir)/alias.c $(srcdir)/bitmap.c $(srcdir)/cselib.c $(srcdir)/cgraph.c \
105   $(srcdir)/ipa-prop.c $(srcdir)/ipa-cp.c $(srcdir)/ipa-inline.c \
106   $(srcdir)/dbxout.c $(srcdir)/dwarf2out.c $(srcdir)/dwarf2asm.c \
107   $(srcdir)/dojump.c $(srcdir)/tree-profile.c \
108   $(srcdir)/emit-rtl.c $(srcdir)/except.c $(srcdir)/explow.c $(srcdir)/expr.c \
109   $(srcdir)/function.c $(srcdir)/except.h \
110   $(srcdir)/gcse.c $(srcdir)/integrate.c $(srcdir)/lists.c $(srcdir)/optabs.c \
111   $(srcdir)/profile.c $(srcdir)/regclass.c \
112   $(srcdir)/reg-stack.c $(srcdir)/cfglayout.c \
113   $(srcdir)/sdbout.c $(srcdir)/stor-layout.c \
114   $(srcdir)/stringpool.c $(srcdir)/tree.c $(srcdir)/varasm.c \
115   $(srcdir)/tree-mudflap.c $(srcdir)/tree-flow.h \
116   $(srcdir)/c-objc-common.c $(srcdir)/c-common.c $(srcdir)/c-parser.c \
117   $(srcdir)/tree-ssanames.c $(srcdir)/tree-eh.c $(srcdir)/tree-ssa-address.c \
118   $(srcdir)/tree-phinodes.c $(srcdir)/tree-cfg.c \
119   $(srcdir)/tree-dfa.c $(srcdir)/tree-ssa-propagate.c \
120   $(srcdir)/tree-iterator.c $(srcdir)/gimplify.c \
121   $(srcdir)/tree-chrec.h $(srcdir)/tree-vect-generic.c \
122   $(srcdir)/tree-ssa-operands.h $(srcdir)/tree-ssa-operands.c \
123   $(srcdir)/tree-profile.c $(srcdir)/tree-nested.c \
124   $(srcdir)/ipa-reference.c $(srcdir)/tree-ssa-structalias.h \
125   $(srcdir)/tree-ssa-structalias.c \
126   $(srcdir)/c-pragma.h $(srcdir)/omp-low.c \
127   $(srcdir)/targhooks.c $(srcdir)/cgraphunit.c $(out_file) \
128
129 # The list of frontend directories to look into
130 GTFILES_LANG_DIR_NAMES=
131
132 .if ${MK_CXX} != "no"
133 GTFILES_LANG_DIR_NAMES+=        cp
134 .endif
135
136 # The list of language specific files for gengtype
137 .for L in ${GTFILES_LANG_DIR_NAMES} c
138 .if exists(${GCCDIR}/$L-config-lang.in)
139 # Source the language config file
140 L_GTFILES!=     sh -c '. ${GCCDIR}/$L-config-lang.in; echo $$gtfiles'
141 .else
142 L_GTFILES!=     sh -c '. ${GCCDIR}/$L/config-lang.in; echo $$gtfiles'
143 .endif
144 .for F in ${L_GTFILES}
145 GTFILES_FILES+= $F
146 GTFILES_LANGS+= $L
147 .endfor
148 .endfor
149 GTFILES+=       ${GTFILES_FILES}
150
151 #
152 # Tree definition files.
153 #
154 TREE_DEF_FILES=
155
156 .if ${MK_CXX} != "no"
157 TREE_DEF_FILES+=        cp/cp-tree.def
158 .endif
159
160 #
161 # Option files.
162 #
163 OPT_FILES=      c.opt common.opt
164
165 .if exists(${GCCDIR}/config/${GCC_CPU}/${GCC_CPU}.opt)
166 OPT_FILES+=     ${GCCDIR}/config/${GCC_CPU}/${GCC_CPU}.opt
167 .endif
168
169 .if exists(${.CURDIR}/${GCC_CPU}-freebsd.opt)
170 OPT_FILES+=     ${.CURDIR}/${GCC_CPU}-freebsd.opt
171 .endif
172
173 .if ${TARGET_CPUARCH} == "powerpc"
174 OPT_FILES+=     ${GCCDIR}/config/${GCC_CPU}/sysv4.opt
175 .endif
176
177 .if ${TARGET_CPUARCH} == "sparc64"
178 OPT_FILES+=     ${GCCDIR}/config/${GCC_CPU}/long-double-switch.opt
179 .endif
180
181 .if exists(${.CURDIR}/freebsd.opt)
182 OPT_FILES+=     ${.CURDIR}/freebsd.opt
183 .endif
184
185 #-----------------------------------------------------------------------
186 # Build rules for header files and generator tools
187
188 # Host config
189 config.h:
190         TARGET_CPU_DEFAULT="${TARGET_CPU_DEFAULT}" \
191         HEADERS="auto-host.h ansidecl.h" \
192         DEFINES="" \
193         /bin/sh ${GCCDIR}/mkconfig.sh ${.TARGET}
194
195 GENSRCS+=       config.h
196 CLEANFILES+=    cs-config.h
197
198 # Build config
199 bconfig.h:
200         TARGET_CPU_DEFAULT="${TARGET_CPU_DEFAULT}" \
201         HEADERS="auto-host.h ansidecl.h" \
202         DEFINES="" \
203         /bin/sh ${GCCDIR}/mkconfig.sh ${.TARGET}
204 .if exists(${GCCDIR}/config/${GCC_CPU}/${GCC_CPU}-modes.def)
205         echo '#define EXTRA_MODES_FILE "${GCC_CPU}/${GCC_CPU}-modes.def"' >> ${.TARGET}
206 .endif
207
208 GENSRCS+=       bconfig.h
209 CLEANFILES+=    cs-bconfig.h
210
211 # tconfig.h
212 tconfig.h:
213         TARGET_CPU_DEFAULT="${TARGET_CPU_DEFAULT}" \
214         HEADERS="auto-host.h ansidecl.h" \
215         DEFINES="USED_FOR_TARGET" \
216         /bin/sh ${GCCDIR}/mkconfig.sh ${.TARGET}
217
218 GENSRCS+=       tconfig.h
219 CLEANFILES+=    cs-tconfig.h
220
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} == "powerpc64" || ${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 *multilib_options = "m64/m32";' >> ${.TARGET}
312         echo 'static const char *const multilib_matches_raw[] = { \
313             "m64 m64;", "m32 m32;", NULL };'                    >> ${.TARGET}
314 .else
315         echo 'static const char *const multilib_raw[] = { \
316             ". ;", NULL };'                                     > ${.TARGET}
317         echo 'static const char *multilib_options = "";'        >> ${.TARGET}
318         echo 'static const char *const multilib_matches_raw[] = { \
319             NULL };'                                            >> ${.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
342 GENSRCS+=       specs.h
343
344 gstdint.h:
345         echo '#include "sys/types.h"'                           > ${.TARGET}
346         echo '#include "sys/stdint.h"'                          >> ${.TARGET}
347
348 GENSRCS+=       gstdint.h
349
350 # Linked headers
351 gthr-default.h: ${GCCDIR}/gthr-posix.h
352         ln -sf ${.ALLSRC} ${.TARGET}
353
354 GENSRCS+=       gthr-default.h
355
356 .if ${TARGET_CPUARCH} == "arm" && ${MK_ARM_EABI} != "no"
357 unwind.h: ${GCCDIR}/config/arm/unwind-arm.h
358 .else
359 unwind.h: ${GCCDIR}/unwind-generic.h
360 .endif
361
362 unwind.h:
363         ln -sf ${.ALLSRC} ${.TARGET}
364
365 GENSRCS+=       unwind.h
366
367 #
368 # gtype gunk
369 #
370 gengtype-lex.c: gengtype-lex.l
371         flex -ogengtype-lex.c ${.ALLSRC}
372
373 gengtype-yacc.h: gengtype-yacc.y
374         yacc -d -o gengtype-yacc.c ${.ALLSRC}
375
376 gengtype-yacc.c: gengtype-yacc.h
377
378 gengtype-yacc+%DIKED.c: gengtype-yacc.c
379         cat    ${.ALLSRC} > ${.TARGET}
380         sed -e "s/xmalloc/malloc/g" \
381             -e "s/xrealloc/realloc/g" \
382             -e "s/malloc/xmalloc/g" \
383             -e "s/realloc/xrealloc/g" \
384             ${.ALLSRC} > ${.TARGET}
385
386 GENSRCS+= gengtype-lex.c gengtype-yacc.h gengtype-yacc+%DIKED.c
387 CLEANFILES+= gengtype-yacc.c
388
389 gengtype: gengtype.o gengtype-yacc+%DIKED.o gengtype-lex.o errors.o \
390           ${LIBIBERTY}
391         ${CC} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${.ALLSRC}
392
393 gtype-desc.h:   gengtype
394         ./gengtype
395         touch ${.TARGET}
396
397 gtype-desc.c:   gtype-desc.h
398
399 GENONLY+=       gtype-desc.c gtype-desc.h
400 CLEANFILES+=    gt-*.h gtype-*.h
401
402 #
403 # Generator tools.
404 #
405 .for F in check checksum genrtl modes
406 gen$F:  gen$F.o errors.o ${LIBIBERTY}
407         ${CC} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${.ALLSRC}
408 .endfor
409
410 .for F in attr attrtab automata codes conditions config constants emit \
411         extract flags  opinit output peep preds recog
412 gen$F:  gen$F.o rtl.o read-rtl.o ggc-none.o vec.o min-insn-modes.o \
413         gensupport.o print-rtl.o errors.o ${LIBIBERTY}
414         ${CC} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${.ALLSRC} -lm
415 .endfor
416
417 gencondmd:      gencondmd.o
418         ${CC} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${.ALLSRC}
419
420 #
421 # Generated .md files.
422 #
423 insn-conditions.md:     gencondmd
424         ./gencondmd > ${.TARGET}
425 GENSRCS+=       insn-conditions.md
426
427 #
428 # Generated header files.
429 #
430
431 .for F in constants
432 insn-$F.h:      gen$F ${MD_FILE}
433         ./gen$F ${MD_FILE} > ${.TARGET}
434 GENSRCS+=       insn-$F.h
435 .endfor
436
437 .for F in attr codes config flags
438 insn-$F.h:      gen$F ${MD_FILE} insn-conditions.md
439         ./gen$F ${MD_FILE} insn-conditions.md > ${.TARGET}
440 GENSRCS+=       insn-$F.h
441 .endfor
442
443 # Header files with irregular names.
444 genrtl.h:       gengenrtl
445         ./gengenrtl -h > ${.TARGET}
446 GENSRCS+=       genrtl.h
447
448 tm-preds.h:     genpreds
449         ./genpreds -h ${MD_FILE} > ${.TARGET}
450 GENSRCS+=       tm-preds.h
451
452 tm-constrs.h:   genpreds
453         ./genpreds -c ${MD_FILE} > ${.TARGET}
454 GENSRCS+=       tm-constrs.h
455
456 tree-check.h:   gencheck
457         ./gencheck > ${.TARGET}
458 GENSRCS+=       tree-check.h
459
460 insn-modes.h:   genmodes
461         ./genmodes -h > ${.TARGET}
462 GENSRCS+=       insn-modes.h
463
464 #
465 # Generated source files.
466 #
467 .for F in attrtab automata emit extract opinit output peep preds recog
468 insn-$F.c:      gen$F ${MD_FILE} insn-conditions.md
469         ./gen$F ${MD_FILE} insn-conditions.md > ${.TARGET}
470 GENONLY+=       insn-$F.c
471 .endfor
472
473 .for F in conditions
474 insn-$F.c:      gen$F ${MD_FILE}
475         ./gen$F ${MD_FILE} > ${.TARGET}
476 GENSRCS+=       insn-$F.c
477 .endfor
478
479 # Source files with irregular names.
480 insn-modes.c:   genmodes
481         ./genmodes > ${.TARGET}
482 GENONLY+=       insn-modes.c
483
484 min-insn-modes.c:       genmodes
485         ./genmodes -m > ${.TARGET}
486 GENSRCS+=       min-insn-modes.c
487
488 genrtl.c:       gengenrtl
489         ./gengenrtl > ${.TARGET}
490 GENONLY+=       genrtl.c
491
492 gencondmd.c:    genconditions ${MD_FILE}
493         ./genconditions ${MD_FILE} > ${.TARGET}
494 GENSRCS+=       gencondmd.c
495
496 #-----------------------------------------------------------------------
497 # Build tools.
498
499 GNTOOLS+=       genattr genattrtab genautomata gencodes gencheck genchecksum \
500                 genconditions gencondmd genconfig genconstants genemit \
501                 genextract genflags gengenrtl gengtype genmodes genopinit \
502                 genoutput genpeep genpreds genrecog
503
504 all: ${GNTOOLS} ${GENSRCS} ${GENONLY}
505 beforedepend: ${GENONLY}
506
507 #
508 #-----------------------------------------------------------------------
509 # Build 'pocket' libiberty exclusively for build tools use.
510
511 LIBIBERTY_SRCS= choose-temp.c concat.c cp-demangle.c cp-demint.c cplus-dem.c \
512         dyn-string.c fibheap.c fopen_unlocked.c getpwd.c getruntime.c \
513         hashtab.c hex.c lbasename.c make-temp-file.c md5.c obstack.c \
514         partition.c pex-unix.c physmem.c safe-ctype.c splay-tree.c xexit.c \
515         xmalloc.c xmemdup.c xstrdup.c xstrerror.c
516 LIBIBERTY_OBJS= ${LIBIBERTY_SRCS:R:S/$/.o/g}
517
518 .for _src in ${LIBIBERTY_SRCS}
519 ${_src:R:S/$/.o/}: ${_src}
520         ${CC} -c -I ${.CURDIR}/../libiberty ${CFLAGS} -o ${.TARGET} ${.IMPSRC}
521 .endfor
522
523 ${LIBIBERTY}: ${LIBIBERTY_OBJS}
524         @rm -f ${.TARGET}
525         @${AR} ${ARFLAGS} ${.TARGET} `lorder ${LIBIBERTY_OBJS} | tsort -q`
526         ${RANLIB} ${.TARGET}
527 CLEANFILES+=    ${LIBIBERTY} ${LIBIBERTY_OBJS}
528
529
530 #-----------------------------------------------------------------------
531 # Fixups.
532
533 # Set OBJS the same as bsd.prog.mk would do if we defined PROG.  We can't
534 # define PROG because we have multiple programs.
535 #
536 SRCS=           errors.c genattr.c genattrtab.c \
537                 genautomata.c gencheck.c genchecksum.c gencodes.c \
538                 genconditions.c genconfig.c genconstants.c genemit.c \
539                 genextract.c genflags.c gengenrtl.c gengtype.c genmodes.c \
540                 genopinit.c genoutput.c genpeep.c genpreds.c genrecog.c \
541                 gensupport.c ggc-none.c print-rtl.c read-rtl.c rtl.c \
542                 vec.c
543
544 SRCS+=          ${GENSRCS}
545 OBJS+=          ${SRCS:N*.h:R:S/$/.o/g}
546 GENOBJS+=       ${GENSRCS:N*.h:R:S/$/.o/g}
547 CLEANFILES+=    ${GENSRCS} ${GENONLY} ${GENOBJS} ${GNTOOLS}
548
549 #-----------------------------------------------------------------------
550 # Manual dependencies.
551 .if !exists(${DEPENDFILE})
552 .include  "Makefile.dep"
553 .endif
554
555 .include <bsd.prog.mk>
556 # DO NOT DELETE