1999-08-27 23:37:10 +00:00
|
|
|
# $FreeBSD$
|
1996-09-19 15:53:53 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# This could probably be merged with ../cc_int/Makefile, but bsd.lib.mk
|
1998-03-06 13:34:36 +00:00
|
|
|
# is such a !@#!*#% nightmare because of how it reprograms the dependencies,
|
1996-09-19 15:53:53 +00:00
|
|
|
# suffix rules, SRCS, etc. It's easiest to cheat by using bsd.prog.mk and
|
|
|
|
# SRCS to get dependencies.
|
|
|
|
#
|
|
|
|
|
1998-04-23 16:30:51 +00:00
|
|
|
# ../Makefile.inc will put an absolute path to our objdir in CFLAGS.
|
|
|
|
# Prevent mkdep from using it, so that we don't have to give rules for
|
|
|
|
# aliases of generated headers.
|
1999-08-16 04:10:48 +00:00
|
|
|
|
1999-04-11 04:11:27 +00:00
|
|
|
CFLAGS+= -I.
|
1998-04-23 16:30:51 +00:00
|
|
|
|
1996-09-19 15:53:53 +00:00
|
|
|
.include "../Makefile.inc"
|
|
|
|
|
2002-05-10 08:54:50 +00:00
|
|
|
.PATH: ${GCCDIR} ${GCCDIR}/cp ${GCCDIR}/../libiberty
|
|
|
|
|
|
|
|
CFLAGS+= -static -DGENERATOR_FILE
|
1996-09-19 15:53:53 +00:00
|
|
|
|
|
|
|
#-----------------------------------------------------------------------
|
|
|
|
# insn-* gunk
|
|
|
|
|
2000-01-23 22:46:00 +00:00
|
|
|
.for F in attr codes config flags
|
|
|
|
insn-$F.h: gen$F ${MD_FILE}
|
|
|
|
./gen$F ${MD_FILE} > insn-$F.h
|
|
|
|
GENSRCS+= insn-$F.h
|
1996-09-19 15:53:53 +00:00
|
|
|
.endfor
|
|
|
|
|
2002-03-02 08:53:36 +00:00
|
|
|
GENSRCS+= gen-time-stamp
|
|
|
|
gen-time-stamp: genattrtab genemit genextract genopinit genoutput genpeep genrecog
|
|
|
|
touch ${.TARGET}
|
1996-09-19 15:53:53 +00:00
|
|
|
|
2000-01-23 22:46:00 +00:00
|
|
|
.for F in attr codes config emit extract flags opinit output peep recog
|
|
|
|
build-tools: gen$F
|
1998-07-07 01:51:18 +00:00
|
|
|
|
2002-05-10 08:54:50 +00:00
|
|
|
gen$F: gen$F.o rtl.o obstack.o print-rtl.o bitmap.o errors.o gensupport.o ggc-none.o hashtab.o read-rtl.o
|
2002-04-05 10:23:19 +00:00
|
|
|
${CC} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${.ALLSRC}
|
1996-09-19 15:53:53 +00:00
|
|
|
|
2000-01-23 22:46:00 +00:00
|
|
|
GENSRCS+= gen$F.c
|
|
|
|
CLEANFILES+= gen$F
|
1996-09-19 15:53:53 +00:00
|
|
|
.endfor
|
|
|
|
|
2000-01-23 22:46:00 +00:00
|
|
|
.for F in attrtab
|
|
|
|
build-tools: gen$F
|
1998-07-07 01:51:18 +00:00
|
|
|
|
2002-05-10 08:54:50 +00:00
|
|
|
gen$F: gen$F.o rtl.o print-rtl.o obstack.o bitmap.o errors.o gensupport.o ggc-none.o hashtab.o read-rtl.o
|
2002-04-05 10:23:19 +00:00
|
|
|
${CC} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${.ALLSRC}
|
1996-09-19 15:53:53 +00:00
|
|
|
|
2000-01-23 22:46:00 +00:00
|
|
|
GENSRCS+= gen$F.c
|
|
|
|
CLEANFILES+= gen$F
|
1996-09-19 15:53:53 +00:00
|
|
|
.endfor
|
|
|
|
|
2002-05-10 08:54:50 +00:00
|
|
|
SRCS+= bitmap.c errors.c gensupport.c ggc-none.c hashtab.c obstack.c print-rtl.c regclass.c rtl.c rtlanal.c read-rtl.c
|
1999-04-04 16:36:35 +00:00
|
|
|
|
2002-05-10 08:54:50 +00:00
|
|
|
.for F in check genrtl preds
|
2000-01-23 22:46:00 +00:00
|
|
|
build-tools: gen$F
|
1999-04-04 16:36:35 +00:00
|
|
|
|
2000-01-23 22:46:00 +00:00
|
|
|
gen$F: gen$F.o
|
2002-04-05 10:23:19 +00:00
|
|
|
${CC} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${.ALLSRC}
|
1999-04-04 16:36:35 +00:00
|
|
|
|
2000-01-23 22:46:00 +00:00
|
|
|
GENSRCS+= gen$F.c
|
|
|
|
CLEANFILES+= gen$F
|
1999-04-04 16:36:35 +00:00
|
|
|
.endfor
|
1996-09-19 15:53:53 +00:00
|
|
|
|
2000-01-29 12:38:21 +00:00
|
|
|
.ORDER: genrtl.c genrtl.h
|
1999-04-11 04:32:42 +00:00
|
|
|
genrtl.c genrtl.h: gengenrtl
|
2002-05-10 08:54:50 +00:00
|
|
|
./gengenrtl > genrtl.c
|
|
|
|
./gengenrtl -h > genrtl.h
|
1999-04-11 04:32:42 +00:00
|
|
|
|
|
|
|
GENSRCS+= genrtl.c genrtl.h
|
|
|
|
|
1999-04-04 16:36:35 +00:00
|
|
|
#-----------------------------------------------------------------------
|
1999-04-11 04:32:42 +00:00
|
|
|
# Common parser stuff.
|
1999-04-04 16:36:35 +00:00
|
|
|
|
|
|
|
tree-check.h: gencheck
|
|
|
|
./gencheck > ${.TARGET}
|
1999-04-09 18:46:48 +00:00
|
|
|
GENSRCS+= tree-check.h
|
1999-04-04 16:36:35 +00:00
|
|
|
|
2002-05-10 08:54:50 +00:00
|
|
|
#-----------------------------------------------------------------------
|
|
|
|
# Predicates stuff.
|
|
|
|
|
|
|
|
tm-preds.h: genpreds
|
|
|
|
./genpreds > ${.TARGET}
|
|
|
|
GENSRCS+= tm-preds.h
|
|
|
|
|
1996-09-19 15:53:53 +00:00
|
|
|
#-----------------------------------------------------------------------
|
|
|
|
# the host/target compiler config.
|
|
|
|
|
2002-05-10 08:54:50 +00:00
|
|
|
COMMONHDRS= config.h hconfig.h multilib.h options.h specs.h tconfig.h \
|
|
|
|
tm_p.h configargs.h safe-ctype.h
|
1999-11-15 04:16:19 +00:00
|
|
|
GENSRCS+= ${COMMONHDRS} gencheck.h
|
1998-03-06 13:34:36 +00:00
|
|
|
|
2002-05-10 08:54:50 +00:00
|
|
|
MFILE?= ${.CURDIR}/Makefile
|
|
|
|
${COMMONHDRS}: ${MFILE}
|
|
|
|
|
|
|
|
configargs.h:
|
|
|
|
echo 'static const char configuration_arguments[] =' > ${.TARGET}
|
|
|
|
echo ' "FreeBSD/${TARGET_ARCH} system compiler";' >> ${.TARGET}
|
|
|
|
echo 'static const char thread_model[] = "posix";' >> ${.TARGET}
|
|
|
|
|
|
|
|
hconfig.h:
|
|
|
|
echo '#include "auto-host.h"' > ${.TARGET}
|
|
|
|
echo '#include <tconfig.h>' >> ${.TARGET}
|
1999-11-15 04:16:19 +00:00
|
|
|
|
|
|
|
gencheck.h:
|
|
|
|
echo '#include "cp/cp-tree.def"' > ${.TARGET}
|
|
|
|
echo '#include "objc/objc-tree.def"' >> ${.TARGET}
|
1999-04-04 16:36:35 +00:00
|
|
|
|
1999-04-11 04:32:42 +00:00
|
|
|
multilib.h:
|
2002-05-10 08:54:50 +00:00
|
|
|
echo 'static const char *const multilib_raw[] = { \
|
1999-11-15 00:29:00 +00:00
|
|
|
"aout maout;", "elf !maout;", NULL };' > ${.TARGET}
|
2002-05-10 08:54:50 +00:00
|
|
|
echo 'static const char *const multilib_matches_raw[] = { \
|
1999-11-15 00:29:00 +00:00
|
|
|
"maout maout;", "melf melf;", NULL };' >> ${.TARGET}
|
2002-05-10 08:54:50 +00:00
|
|
|
echo 'static const char *multilib_extra = "";' >> ${.TARGET}
|
2002-10-10 04:56:35 +00:00
|
|
|
echo 'static const char *multilib_options = "";'>> ${.TARGET}
|
2002-05-10 08:54:50 +00:00
|
|
|
echo 'static const char *const multilib_exclusions_raw[] = { \
|
|
|
|
NULL };' >> ${.TARGET}
|
1999-04-04 16:36:35 +00:00
|
|
|
|
1998-10-16 16:53:15 +00:00
|
|
|
options.h:
|
1999-11-15 00:29:00 +00:00
|
|
|
echo '#include "cp/lang-options.h"' > ${.TARGET}
|
|
|
|
echo '#include "f/lang-options.h"' >> ${.TARGET}
|
2002-05-10 08:54:50 +00:00
|
|
|
echo '#include "objc/lang-options.h"' >> ${.TARGET}
|
1999-04-04 16:36:35 +00:00
|
|
|
|
1998-10-16 16:53:15 +00:00
|
|
|
specs.h:
|
1999-11-15 00:29:00 +00:00
|
|
|
echo '#include "cp/lang-specs.h"' > ${.TARGET}
|
|
|
|
echo '#include "f/lang-specs.h"' >> ${.TARGET}
|
1999-11-15 04:16:19 +00:00
|
|
|
echo '#include "objc/lang-specs.h"' >> ${.TARGET}
|
1999-04-04 16:36:35 +00:00
|
|
|
|
2002-05-10 08:54:50 +00:00
|
|
|
config.h:
|
|
|
|
echo '#include <hconfig.h>' > ${.TARGET}
|
|
|
|
echo '#ifndef GENERATOR_FILE' >> ${.TARGET}
|
|
|
|
echo '#include "insn-codes.h"' >> ${.TARGET}
|
|
|
|
echo '#include "insn-flags.h"' >> ${.TARGET}
|
|
|
|
echo '#endif' >> ${.TARGET}
|
1999-04-11 04:32:42 +00:00
|
|
|
|
2002-05-10 08:54:50 +00:00
|
|
|
tconfig.h:
|
|
|
|
echo 'struct rtx_def;' > ${.TARGET}
|
|
|
|
echo 'typedef struct rtx_def *rtx;' >> ${.TARGET}
|
|
|
|
echo 'struct rtvec_def;' >> ${.TARGET}
|
|
|
|
echo 'typedef struct rtvec_def *rtvec;' >> ${.TARGET}
|
|
|
|
echo 'union tree_node;' >> ${.TARGET}
|
|
|
|
echo 'typedef union tree_node *tree;' >> ${.TARGET}
|
|
|
|
echo '' >> ${.TARGET}
|
2002-05-15 21:59:46 +00:00
|
|
|
.if ${TARGET_ARCH} == "ia64"
|
|
|
|
echo '#define TARGET_CPU_DEFAULT (MASK_GNU_AS|MASK_GNU_LD)' >>${.TARGET}
|
|
|
|
.endif
|
2002-05-10 08:54:50 +00:00
|
|
|
echo '#include "ansidecl.h"' >> ${.TARGET}
|
|
|
|
echo '#include "${GCC_CPU}/${GCC_CPU}.h"' >> ${.TARGET}
|
2002-09-12 15:56:21 +00:00
|
|
|
.if ${TARGET_ARCH} == "i386" || ${TARGET_ARCH} == "x86_64"
|
2002-05-10 08:54:50 +00:00
|
|
|
echo '#include "${GCC_CPU}/att.h"' >> ${.TARGET}
|
1999-08-19 21:19:36 +00:00
|
|
|
.endif
|
2002-05-10 08:54:50 +00:00
|
|
|
.if ${TARGET_ARCH} != "alpha"
|
|
|
|
echo '#include "dbxelf.h"' >> ${.TARGET}
|
|
|
|
echo '#include "elfos.h"' >> ${.TARGET}
|
2000-12-03 00:11:19 +00:00
|
|
|
.endif
|
2002-05-10 08:54:50 +00:00
|
|
|
echo '#include <freebsd-native.h>' >> ${.TARGET}
|
|
|
|
echo '#include "freebsd-spec.h"' >> ${.TARGET}
|
|
|
|
echo '#include "freebsd.h"' >> ${.TARGET}
|
|
|
|
.if ${TARGET_ARCH} == "alpha"
|
|
|
|
echo '#include "${GCC_CPU}/elf.h"' >> ${.TARGET}
|
1999-04-04 20:40:45 +00:00
|
|
|
.endif
|
2002-09-12 15:56:21 +00:00
|
|
|
.if ${TARGET_ARCH} != "i386" && ${TARGET_ARCH} != "x86_64"
|
2002-05-10 08:54:50 +00:00
|
|
|
.if exists(${GCCDIR}/config/${GCC_CPU}/sysv4.h)
|
|
|
|
echo '#include "${GCC_CPU}/sysv4.h"' >> ${.TARGET}
|
|
|
|
.endif
|
|
|
|
.endif
|
|
|
|
echo '#include "${GCC_CPU}/freebsd.h"' >> ${.TARGET}
|
2002-09-12 15:56:21 +00:00
|
|
|
.if ${TARGET_ARCH} == "x86_64"
|
|
|
|
echo '#include "${GCC_CPU}/${TARGET_ARCH:S/_/-/}.h"' >> ${.TARGET}
|
2002-05-15 22:40:50 +00:00
|
|
|
echo '#include "${GCC_CPU}/freebsd64.h"' >> ${.TARGET}
|
|
|
|
.endif
|
2002-05-10 08:54:50 +00:00
|
|
|
echo '#include "defaults.h"' >> ${.TARGET}
|
|
|
|
echo '#ifndef POSIX' >> ${.TARGET}
|
|
|
|
echo '# define POSIX' >> ${.TARGET}
|
|
|
|
echo '#endif' >> ${.TARGET}
|
2002-05-10 17:42:19 +00:00
|
|
|
.if ${TARGET_ARCH} != "ia64"
|
2002-05-10 08:54:50 +00:00
|
|
|
echo '#define CONFIG_SJLJ_EXCEPTIONS 0' >> ${.TARGET}
|
2002-05-10 17:42:19 +00:00
|
|
|
.endif
|
2002-05-10 08:54:50 +00:00
|
|
|
|
|
|
|
tm_p.h:
|
|
|
|
echo '#include "${GCC_CPU}/${GCC_CPU}-protos.h"' >> ${.TARGET}
|
|
|
|
echo '#include "tm-preds.h"' >> ${.TARGET}
|
|
|
|
|
|
|
|
safe-ctype.h: Makefile
|
|
|
|
echo '#include <ctype.h>' > ${.TARGET}
|
|
|
|
.for Z in TOUPPER TOLOWER ISDIGIT ISXDIGIT ISUPPER ISLOWER ISALPHA ISALNUM \
|
|
|
|
ISSPACE ISPUNCT ISGRAPH ISBLANK ISPRINT ISCNTRL
|
|
|
|
echo '#define ${Z} ${Z:L}' >> ${.TARGET}
|
|
|
|
.endfor
|
|
|
|
echo "#define ISIDST(x) \
|
|
|
|
((x) == '_' || isalpha(x))" >> ${.TARGET}
|
|
|
|
echo "#define ISIDNUM(x) \
|
|
|
|
(isdigit(x) || ISIDST(x))" >> ${.TARGET}
|
|
|
|
echo "#define IS_VSPACE(x) \
|
|
|
|
((x) == '\n' || (x) == '\r')" >> ${.TARGET}
|
|
|
|
echo "#define IS_NVSPACE(x) \
|
|
|
|
(!IS_VSPACE(x) && (isspace(x) || (x) == '\0'))" >> ${.TARGET}
|
|
|
|
echo "#define IS_SPACE_OR_NUL(x) \
|
|
|
|
(isspace(x) || (x) == '\0')" >> ${.TARGET}
|
1999-04-04 16:36:35 +00:00
|
|
|
|
First round of changes to support generation of assembler for the old
a.out gas and the binutils gas (elf or a.out) with a single compiler.
This uses other infrastructure not yet committed, in order to support
both a.out and elf it needs to be able to get to both a.out and elf
gas, ld, libs, crt* etc. So for now, the support is pretty much dormant.
The new freebsd.h file is based on the old freebsd-elf.h file (which has a
long lineage, right back through linux and svr4 files). The change is
pretty dramatic from a gcc internals standpoint as it overrides a lot of
definitions in order to generate different output based on target mode.
There is potential for screw-ups, so please be on the lookout - gcc's
configuration mechanism wasn't really meant for this kind of thing.
It's believed to compile world etc just fine under both a.out and elf, can
handle global constructors and destructors, handles the differences in
a.out and elf stabs, and what sections things like exceptions go in.
The initial idea came from i386/osfrose.h which is a dual rose/elf format
target. These two are not as diverse as a.out and elf it would seem.
The cc front-end uses external configuration to determine default object
format (still being thrashed out, so read the source if you want to see
it so far), and has a '-aout' and '-elf' override command line switch.
There are some other internal switches that can be accessed, namely -maout,
-mno-aout, -munderscores and -mnounderscores. The underscore and local
symbol prefixing rules are controllable seperately to the output format.
(ie: it's possible to generate a.out without the _ prefixes on symbols and
also to generate elf with the _ prefixes. This isn't quite optimal, but
does seem to work pretty well, except the linkers don't always recognise
the local symbols without their normal names)
The default format is a.out (still), nobody should see any major changes.
With both elf and a.out tools and libraries installed:
[1:26pm]/tmp-223> cc -elf -o hello hello.c
peter@beast[1:27pm]/tmp-224> file hello
hello: ELF 32-bit LSB executable, Intel 80386, version 1 (FreeBSD), dynamically linked, not stripped
[1:27pm]/tmp-225> ./hello
hello world!
[1:27pm]/tmp-226> cc -aout -o hello hello.c
[1:27pm]/tmp-227> file hello
hello: FreeBSD/i386 compact demand paged dynamically linked executable not stripped
1:27pm]/tmp-228> ./hello
hello world!
Since my co-conspirators put a lot of effort into this too, I'll add them
so they can share the blame^H^H^H^H^Hglory. :-)
Reviewed by: sos, jdp
1998-03-08 05:29:49 +00:00
|
|
|
#-----------------------------------------------------------------------
|
1998-04-23 16:30:51 +00:00
|
|
|
# General things.
|
First round of changes to support generation of assembler for the old
a.out gas and the binutils gas (elf or a.out) with a single compiler.
This uses other infrastructure not yet committed, in order to support
both a.out and elf it needs to be able to get to both a.out and elf
gas, ld, libs, crt* etc. So for now, the support is pretty much dormant.
The new freebsd.h file is based on the old freebsd-elf.h file (which has a
long lineage, right back through linux and svr4 files). The change is
pretty dramatic from a gcc internals standpoint as it overrides a lot of
definitions in order to generate different output based on target mode.
There is potential for screw-ups, so please be on the lookout - gcc's
configuration mechanism wasn't really meant for this kind of thing.
It's believed to compile world etc just fine under both a.out and elf, can
handle global constructors and destructors, handles the differences in
a.out and elf stabs, and what sections things like exceptions go in.
The initial idea came from i386/osfrose.h which is a dual rose/elf format
target. These two are not as diverse as a.out and elf it would seem.
The cc front-end uses external configuration to determine default object
format (still being thrashed out, so read the source if you want to see
it so far), and has a '-aout' and '-elf' override command line switch.
There are some other internal switches that can be accessed, namely -maout,
-mno-aout, -munderscores and -mnounderscores. The underscore and local
symbol prefixing rules are controllable seperately to the output format.
(ie: it's possible to generate a.out without the _ prefixes on symbols and
also to generate elf with the _ prefixes. This isn't quite optimal, but
does seem to work pretty well, except the linkers don't always recognise
the local symbols without their normal names)
The default format is a.out (still), nobody should see any major changes.
With both elf and a.out tools and libraries installed:
[1:26pm]/tmp-223> cc -elf -o hello hello.c
peter@beast[1:27pm]/tmp-224> file hello
hello: ELF 32-bit LSB executable, Intel 80386, version 1 (FreeBSD), dynamically linked, not stripped
[1:27pm]/tmp-225> ./hello
hello world!
[1:27pm]/tmp-226> cc -aout -o hello hello.c
[1:27pm]/tmp-227> file hello
hello: FreeBSD/i386 compact demand paged dynamically linked executable not stripped
1:27pm]/tmp-228> ./hello
hello world!
Since my co-conspirators put a lot of effort into this too, I'll add them
so they can share the blame^H^H^H^H^Hglory. :-)
Reviewed by: sos, jdp
1998-03-08 05:29:49 +00:00
|
|
|
|
1998-04-23 16:30:51 +00:00
|
|
|
SRCS+= ${GENSRCS}
|
|
|
|
CLEANFILES+= ${GENSRCS}
|
First round of changes to support generation of assembler for the old
a.out gas and the binutils gas (elf or a.out) with a single compiler.
This uses other infrastructure not yet committed, in order to support
both a.out and elf it needs to be able to get to both a.out and elf
gas, ld, libs, crt* etc. So for now, the support is pretty much dormant.
The new freebsd.h file is based on the old freebsd-elf.h file (which has a
long lineage, right back through linux and svr4 files). The change is
pretty dramatic from a gcc internals standpoint as it overrides a lot of
definitions in order to generate different output based on target mode.
There is potential for screw-ups, so please be on the lookout - gcc's
configuration mechanism wasn't really meant for this kind of thing.
It's believed to compile world etc just fine under both a.out and elf, can
handle global constructors and destructors, handles the differences in
a.out and elf stabs, and what sections things like exceptions go in.
The initial idea came from i386/osfrose.h which is a dual rose/elf format
target. These two are not as diverse as a.out and elf it would seem.
The cc front-end uses external configuration to determine default object
format (still being thrashed out, so read the source if you want to see
it so far), and has a '-aout' and '-elf' override command line switch.
There are some other internal switches that can be accessed, namely -maout,
-mno-aout, -munderscores and -mnounderscores. The underscore and local
symbol prefixing rules are controllable seperately to the output format.
(ie: it's possible to generate a.out without the _ prefixes on symbols and
also to generate elf with the _ prefixes. This isn't quite optimal, but
does seem to work pretty well, except the linkers don't always recognise
the local symbols without their normal names)
The default format is a.out (still), nobody should see any major changes.
With both elf and a.out tools and libraries installed:
[1:26pm]/tmp-223> cc -elf -o hello hello.c
peter@beast[1:27pm]/tmp-224> file hello
hello: ELF 32-bit LSB executable, Intel 80386, version 1 (FreeBSD), dynamically linked, not stripped
[1:27pm]/tmp-225> ./hello
hello world!
[1:27pm]/tmp-226> cc -aout -o hello hello.c
[1:27pm]/tmp-227> file hello
hello: FreeBSD/i386 compact demand paged dynamically linked executable not stripped
1:27pm]/tmp-228> ./hello
hello world!
Since my co-conspirators put a lot of effort into this too, I'll add them
so they can share the blame^H^H^H^H^Hglory. :-)
Reviewed by: sos, jdp
1998-03-08 05:29:49 +00:00
|
|
|
|
1998-04-23 16:30:51 +00:00
|
|
|
all: ${SRCS}
|
1996-09-19 15:53:53 +00:00
|
|
|
|
|
|
|
.include <bsd.prog.mk>
|
1998-04-23 16:30:51 +00:00
|
|
|
|
|
|
|
#-----------------------------------------------------------------------
|
|
|
|
# Fixups.
|
|
|
|
|
|
|
|
# Set OBJS the same as bsd.prog.mk would do if we defined PROG. We can't
|
|
|
|
# define PROG because we have multiple programs.
|
|
|
|
#
|
|
|
|
OBJS+= ${SRCS:N*.h:R:S/$/.o/g}
|
|
|
|
|
|
|
|
.if !exists(${DEPENDFILE})
|
1999-04-09 18:46:48 +00:00
|
|
|
# Fudge pre-dependfile dependencies of objects in much the same way as
|
|
|
|
# bsd.prog.mk would do if we defined PROG. There are complications to
|
|
|
|
# avoid circular dependencies. First, only make most objects depend on
|
|
|
|
# all headers. Filter out the objects that would cause problems (i.e.,
|
|
|
|
# objects that will be used to create programs that will generate headers).
|
1998-04-23 16:30:51 +00:00
|
|
|
#
|
2002-05-10 08:54:50 +00:00
|
|
|
${OBJS:Nbitmap.o:Nerrors.o:Ngenattr.o:Ngencheck.o:Ngencodes.o:Ngenconfig.o:Ngenflags.o:Ngengenrtl.o:Ngenpreds.o:Ngensupport.o:Nggc-none.o:Nhashtab.o:Nobstack.o:Nprint-rtl.o:Nread-rtl.o:Nrtl.o}: ${SRCS:M*.h}
|
1998-04-23 16:30:51 +00:00
|
|
|
|
2002-05-10 10:14:53 +00:00
|
|
|
# Force these to be made absolustly first w/-j
|
|
|
|
${OBJS}: ${COMMONHDRS}
|
|
|
|
|
1999-04-09 18:46:48 +00:00
|
|
|
# Next, make each of the problematic objects depend on only most headers.
|
|
|
|
# Filter out the headers that would cause problems (and a few more when it
|
|
|
|
# is inconvenient to filter precisely).
|
1998-04-23 16:30:51 +00:00
|
|
|
#
|
2002-05-10 10:21:19 +00:00
|
|
|
bitmap.o genattr.o gencodes.o genconfig.o genflags.o gensupport.o obstack.o print-rtl.o \
|
|
|
|
read-rtl.o rtl.o: ${SRCS:M*.h:Ninsn-*.h}
|
1999-11-15 04:16:19 +00:00
|
|
|
gencheck.o: gencheck.h ${SRCS:M*.h:Ngenrtl.h:Ntree-check.h:Ninsn-*.h}
|
1999-04-09 18:46:48 +00:00
|
|
|
gengenrtl.o: ${SRCS:M*.h:Ngenrtl.h:Ninsn-*.h}
|
2002-05-10 08:54:50 +00:00
|
|
|
genpreds.o: ${COMMONHDRS}
|
1998-04-23 16:30:51 +00:00
|
|
|
.endif
|