2000-03-05 08:41:03 +03:00
|
|
|
# $NetBSD: Makefile,v 1.10 2000/03/05 05:41:04 shin Exp $
|
1998-08-17 21:06:59 +04:00
|
|
|
|
1998-09-27 22:05:10 +04:00
|
|
|
HAVE_GCC28!= ${CXX} --version | egrep "^(2\.8|egcs)" ; echo
|
1998-08-17 21:06:59 +04:00
|
|
|
|
|
|
|
LIB= gcc
|
1999-02-13 05:54:17 +03:00
|
|
|
MKLINT= no
|
|
|
|
MKPROFILE= no
|
|
|
|
MKPIC= no
|
1998-08-17 21:06:59 +04:00
|
|
|
DIST= ${.CURDIR}/../../dist/gcc
|
|
|
|
ARCH= ${.CURDIR}/../../usr.bin/egcs/arch
|
|
|
|
|
1999-02-24 20:18:26 +03:00
|
|
|
.if (${MACHINE_ARCH} == "mipsel") || (${MACHINE_ARCH} == "mipseb")
|
|
|
|
ARCHSUBDIR= mips
|
|
|
|
.else
|
|
|
|
ARCHSUBDIR= ${MACHINE_ARCH}
|
|
|
|
.endif
|
|
|
|
|
|
|
|
CPPFLAGS+= -I${ARCH}/${ARCHSUBDIR} -I${ARCH} \
|
1998-08-17 21:06:59 +04:00
|
|
|
-I${DIST}/config -I${DIST}/cp -I${DIST}
|
|
|
|
|
|
|
|
LIB2OBJS= __gcc_bcmp.o _varargs.o __dummy.o _eprintf.o _bb.o _shtab.o \
|
|
|
|
_clear_cache.o _trampoline.o __main.o _exit.o _ctors.o \
|
|
|
|
_pure.o
|
1998-11-23 12:29:56 +03:00
|
|
|
.if (${MACHINE_ARCH} == "m68k") || (${MACHINE_ARCH} == "i386") || \
|
|
|
|
(${MACHINE_ARCH} == "sparc64")
|
1998-08-17 21:06:59 +04:00
|
|
|
LIB2OBJS+= _fixxfdi.o _fixunsxfdi.o _floatdixf.o _fixunsxfsi.o
|
|
|
|
.endif
|
1998-08-28 23:05:54 +04:00
|
|
|
OBJS+= ${LIB2OBJS}
|
1998-08-17 21:06:59 +04:00
|
|
|
|
|
|
|
# Extra code to include in libgcc2 for C++ support.
|
1998-09-27 22:48:10 +04:00
|
|
|
.if !empty(HAVE_GCC28)
|
1998-08-28 23:05:54 +04:00
|
|
|
SRCS+= tinfo.cc tinfo2.cc new.cc exception.cc frame.c
|
|
|
|
OBJS+= ${NEW1OBJS} ${NEW2OBJS}
|
1998-08-17 21:06:59 +04:00
|
|
|
CXXFLAGS+= -I${DIST}/cp/inc
|
|
|
|
LIB2OBJS+= _eh.o
|
|
|
|
NEW1OBJS= _op_new.o _op_newnt.o
|
|
|
|
NEW2OBJS= _op_vnew.o _op_vnewnt.o _op_delete.o _op_delnt.o \
|
|
|
|
_op_vdel.o _op_vdelnt.o
|
|
|
|
|
|
|
|
INCS= exception new new.h typeinfo
|
|
|
|
INCSDIR= /usr/include/g++
|
|
|
|
|
|
|
|
.cc:
|
|
|
|
@true
|
|
|
|
|
|
|
|
${NEW1OBJS}: new1.cc
|
|
|
|
${COMPILE.cc} -DL$* -o $@ $>
|
|
|
|
${NEW2OBJS}: new2.cc
|
|
|
|
${COMPILE.cc} -DL$* -o $@ $>
|
|
|
|
.endif
|
|
|
|
|
|
|
|
${LIB2OBJS}: libgcc2.c
|
|
|
|
${COMPILE.c} -DL$* -o $@ $>
|
|
|
|
|
|
|
|
afterinstall:
|
|
|
|
@if [ ! -f _eh.o ]; then\
|
|
|
|
echo '***** You should rebuild and reinstall libgcc.a using the new egcs'; \
|
|
|
|
echo '***** compiler in order to include all the necessary C++ support.'; \
|
|
|
|
fi
|
|
|
|
|
|
|
|
.PATH: ${DIST} ${DIST}/cp ${DIST}/cp/inc
|
|
|
|
|
|
|
|
.include <bsd.lib.mk>
|