2003-07-30 09:33:25 +04:00
|
|
|
# $NetBSD: Makefile,v 1.6 2003/07/30 05:33:25 mrg Exp $
|
2003-07-25 20:32:23 +04:00
|
|
|
|
|
|
|
REQUIRETOOLS= yes
|
|
|
|
NOLINT= # defined
|
|
|
|
|
|
|
|
.include <bsd.own.mk>
|
|
|
|
|
|
|
|
LIB= gcc
|
|
|
|
|
|
|
|
.cc: # disable .cc->NULL transform
|
|
|
|
|
|
|
|
.if exists(${.CURDIR}/${MACHINE_ARCH}.mk) && ${MKGCC} != "no"
|
|
|
|
.include "${.CURDIR}/${MACHINE_ARCH}.mk"
|
|
|
|
|
|
|
|
DIST= ${NETBSDSRCDIR}/gnu/dist/gcc
|
|
|
|
GNUHOSTDIST= ${DIST}
|
|
|
|
GCCARCH= ${NETBSDSRCDIR}/gnu/usr.bin/gcc3/arch/${MACHINE_ARCH}
|
2003-07-30 09:33:25 +04:00
|
|
|
GCCARCHXX= ${NETBSDSRCDIR}/gnu/lib/libstdc++-v3/arch/${MACHINE_ARCH}
|
2003-07-25 20:32:23 +04:00
|
|
|
|
|
|
|
GCPPFLAGS= ${G_LIBGCC2_CFLAGS} ${G_MAYBE_USE_COLLECT2} ${G_INCLUDES}
|
|
|
|
CPPFLAGS+= -I${.CURDIR}
|
|
|
|
CPPFLAGS+= -I${GCCARCH} ${GCPPFLAGS:M-D*} ${GCPPFLAGS:M-I*:N-I.*} \
|
2003-07-30 09:33:25 +04:00
|
|
|
-I${DIST}/gcc/cp -I${GCCARCHXX} -I.
|
2003-07-25 20:32:23 +04:00
|
|
|
|
|
|
|
LIB2FUNCS= ${G_LIB2FUNCS_1:=.c} ${G_LIB2FUNCS_2:=.c} ${G_LIB2FUNCS_ST:=.c}
|
|
|
|
LIB2DIVMOD= ${G_LIB2_DIVMOD_FUNCS:=.c}
|
|
|
|
LIB2_EH= ${G_LIB2ADDEH:M*.c:T}
|
|
|
|
|
2003-07-26 18:55:12 +04:00
|
|
|
SRCS+= ${LIB2FUNCS} ${LIB2DIVMOD} ${LIB2_EH} ${G_LIB2ADD:M*.c:T}
|
2003-07-25 20:32:23 +04:00
|
|
|
|
|
|
|
CLEANFILES+= ${LIB2FUNCS} tconfig.h
|
|
|
|
|
|
|
|
${LIB2FUNCS}: ${.CURDIR}/Makefile
|
|
|
|
printf '#define L${.PREFIX}\n#include <libgcc2.c>\n' >${.TARGET}
|
|
|
|
|
|
|
|
${LIB2DIVMOD}: ${.CURDIR}/Makefile
|
|
|
|
printf '#define L${.PREFIX}\n#include <libgcc2.c>\n' >${.TARGET}
|
|
|
|
|
2003-07-27 18:41:32 +04:00
|
|
|
# XXX
|
|
|
|
.if ${MACHINE_ARCH} == "m68000"
|
|
|
|
CPICFLAGS:=
|
|
|
|
.endif
|
|
|
|
|
2003-07-25 20:32:23 +04:00
|
|
|
${G_LIB2ADDEH:=.o}:
|
|
|
|
${COMPILE.c} ${CPICFLAGS} -fexceptions -o ${.TARGET} ${.IMPSRC}
|
|
|
|
|
|
|
|
${G_LIB2_DIVMOD_FUNCS:=.o}:
|
|
|
|
${COMPILE.c} ${CPICFLAGS} -fexceptions -fnon-call-exceptions -o ${.TARGET} ${.IMPSRC}
|
|
|
|
|
|
|
|
dp-bit.c: ${.CURDIR}/Makefile
|
|
|
|
printf '#define FLOAT\n#include <fp-bit.c>\n' >${.TARGET}
|
|
|
|
|
|
|
|
.PATH: ${DIST}/gcc ${DIST}/gcc/cp ${DIST}/gcc/cp/inc ${DIST}/gcc/config \
|
|
|
|
${G_CONFIGDIR}
|
|
|
|
|
|
|
|
.include <bsd.lib.mk>
|
|
|
|
|
2003-07-29 04:13:21 +04:00
|
|
|
${OBJS} ${SOBJS} ${POBJS} ${DEPENDSRCS}: ${.CURDIR}/${MACHINE_ARCH}.mk tconfig.h
|
2003-07-25 20:32:23 +04:00
|
|
|
|
|
|
|
# XXX /bin/sh
|
|
|
|
tconfig.h:
|
|
|
|
TM_DEFINES="$(G_tm_defines)" \
|
|
|
|
HEADERS="$(G_xm_file)" XM_DEFINES="$(G_xm_defines)" \
|
|
|
|
TARGET_CPU_DEFAULT="" \
|
|
|
|
/bin/sh $(GNUHOSTDIST)/gcc/mkconfig.sh tconfig.h
|
|
|
|
|
|
|
|
.else
|
|
|
|
.include <bsd.prog.mk> # do nothing
|
|
|
|
.endif
|