head	1.2;
access;
symbols;
locks; strict;
comment	@# @;


1.2
date	94.05.18.18.13.51;	author md;	state Exp;
branches;
next	1.1;

1.1
date	93.12.15.17.57.39;	author md;	state Exp;
branches;
next	;


desc
@@


1.2
log
@Compile and bring in some additional routines when compiling for the RT
@
text
@#	BSDI $Id: Makefile,v 1.1 1993/12/15 17:57:39 md Exp md $

# pared-down GCC2 library.
.include "../Makefile.symlinks"

# The functions we want.  These are extracted from libgcc2.c individually,
# and the code is left in a separate file.  It would be nice to have all
# of libgcc2.c split into separate files already, but...

NEED=	__gcc_bcmp __main _bb _new_handler _op_new _op_delete

.if	${MACHINE} == "hp300"
NEED+=	_clear_cache _ctor_list _dtor_list
.elif	${MACHINE} == "i386"
NEED+=	_clear_cache _ctor_list _dtor_list
.elif	${MACHINE} == "sparc"
NEED+=	_clear_cache _ctor_list _dtor_list
.elif	${MACHINE} == "tahoe"
NEED+=	_clear_cache _shtab _ctor_list _dtor_list
.elif	${MACHINE} == "rt"
NEED+=	_clear_cache
NEED+=	_muldi3 _divdi3 _moddi3 _udivdi3 _umoddi3 _negdi2 _lshrdi3 _lshldi3 \
	_ashldi3 _ashrdi3 _ffsdi2 _udiv_w_sdiv _udivmoddi4 _cmpdi2 _ucmpdi2 \
	_floatdidf _floatdisf _fixunsdfsi _fixunssfsi _fixunsdfdi _fixdfdi \
	_fixunssfdi _fixsfdi _fixxfdi _fixunsxfdi _floatdixf _fixunsxfsi \
	_fixtfdi _fixunstfdi _floatditf _varargs _eprintf _shtab _trampoline \
	_exit _ctors
.endif

LIB=	gcc
SRCS=	${NEED:S/$/.c/g}
CFLAGS+=-I. -I${.CURDIR} -I${CFG} -I${.CURDIR}/../common
CFLAGS+=-Dbsd4_4

${SRCS}: libgcc2.c tconfig.h
	${CC} ${CFLAGS} -E -P -DL${.TARGET:R} ${.ALLSRC:M*.c} > ${.TARGET}

all .depend: tm.h ${SRCS}

CLEANFILES+=${SRCS} tconfig.h tm.h

.if	${MACHINE} == "rt"
beforeinstall:
	@@echo "Importing objects from standard libgcc1"
	-@@rm -rf from_gcc1 > /dev/null 2>&1
	@@mkdir from_gcc1
	@@(cd from_gcc1; ar x ../../libgcc1/libgcc1.a)
	@@ar ruv lib${LIB}.a from_gcc1/*.o > /dev/null
	@@rm -rf from_gcc1 > /dev/null 2>&1
	@@echo "Importing objects from profiled libgcc1"
	-@@rm -rf from_gcc1_p > /dev/null 2>&1
	@@mkdir from_gcc1_p
	@@(cd from_gcc1_p; ar x ../../libgcc1/libgcc1_p.a)
	@@ar ruv lib${LIB}_p.a from_gcc1_p/*.po > /dev/null
	@@rm -rf from_gcc1_p > /dev/null 2>&1
.endif

.include <bsd.lib.mk>
@


1.1
log
@Initial revision
@
text
@d1 1
a1 1
#	BSDI $Id: Makefile,v 1.1 1993/12/16 00:57:56 torek Exp $
d10 1
a10 2
NEED=	__gcc_bcmp __main _bb _ctor_list _dtor_list _new_handler \
	_op_new _op_delete
d13 1
a13 1
NEED+=	_clear_cache
d15 1
a15 1
NEED+=	_clear_cache
d17 4
d22 6
a27 2
.elif	${MACHINE} == "tahoe"
NEED+=	_clear_cache _shtab
d33 1
d36 1
a36 1
	${CC} ${CFLAGS} -E -DL${.TARGET:R} ${.ALLSRC:M*.c} > ${.TARGET}
d41 16
@
