opnsense-src/gnu/usr.bin/cc/f771/Makefile
David E. O'Brien b243983f32 This patch solves the a cross-build problem where proj.c is both used by a
build-tools target and by the actual target.  In a cross-building situation
proj.o is both a native object and a cross-object (i.e., for the target
arch) and thus doesn't work.  Creating seperate opjects from the same
source file solves this...

This patch may also fix the following issue:

> it looks like -DNOCLEAN doesn't work too well.
> cd /usr/src/gnu/usr.bin/cc/f771; make build-tools
> make: don't know how to make /usr/obj/usr/src/i386/usr/include/stdarg.h. Stop

	This seems caused by wrong dependency information.  Dependency
	information shouldn't be created for build-tools sources.

Submitted by:	marcel
2000-01-14 09:28:25 +00:00

52 lines
1.2 KiB
Makefile

# $FreeBSD$
.include "${.CURDIR}/../Makefile.inc"
.PATH: ${GCCDIR}/f
PROG= f771
SRCS= bad.c bit.c bld.c com.c data.c equiv.c expr.c global.c implic.c info.c \
intrin.c lab.c lex.c malloc.c name.c parse.c proj.c src.c st.c sta.c \
stb.c stc.c std.c ste.c storag.c stp.c str.c sts.c stt.c stu.c stv.c \
stw.c symbol.c target.c top.c type.c version.c where.c
BINDIR= /usr/libexec
NOMAN=
CFLAGS+= -I${GCCDIR}/f -I.
DPADD= ${LIBCC_INT}
LDADD= ${LIBCC_INT}
build-tools: fini
# The use of ``proj-BT.o'' is to get around bogus dependacy information
# created for build-tools sources.
fini: fini.o proj-BT.o
${CC} -static ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${.ALLSRC}
proj-BT.o: proj.c
${CC} ${CFLAGS} -o ${.TARGET} -c ${.ALLSRC}
CLEANFILES+= fini fini.o proj-BT.o
#-----------------------------------------------------------------------
# str-* gunk
.for i in 1t 2t fo io nq op ot
.ORDER: str-$i.h str-$i.j
str-$i.j str-$i.h: str-$i.fin fini
./fini ${GCCDIR}/f/str-$i.fin str-$i.j str-$i.h
FINIHDRS+= str-$i.j str-$i.h
.endfor
CLEANFILES+= ${FINIHDRS}
.include <bsd.prog.mk>
#-----------------------------------------------------------------------
# Fixups.
.if !exists(${DEPENDFILE})
${OBJS:Nproj.o} ${DEPENDFILE}: ${FINIHDRS}
.endif