645c4be38a
into libc. This reduces the size of every dynamically linked executable by 248 bytes, and it reduces the size of static executables by a lesser amount. It also eliminates some global namespace pollution. With this change in place, the source for dlfcn.h should probably be moved to "/usr/src/include". I'll save that for another day. Compatibility note: Programs which use dlopen, if compiled on systems with this change, will not run on systems with a libc from prior to this change. Very few programs use dlopen, so I think that is OK.
54 lines
1.4 KiB
Makefile
54 lines
1.4 KiB
Makefile
# from: @(#)Makefile 5.6 (Berkeley) 5/22/91
|
|
# $Id: Makefile,v 1.34 1998/02/06 16:46:31 jdp Exp $
|
|
|
|
CFLAGS+= -DLIBC_SCCS -fno-omit-frame-pointer -I${.CURDIR}
|
|
OBJS= crt0.o c++rt0.o gcrt0.o scrt0.o sgcrt0.o
|
|
CLEANFILES+= a.out
|
|
|
|
all: ${OBJS}
|
|
|
|
crt0.o: crt0.c
|
|
${CC} ${CFLAGS} -c -DCRT0 -DDYNAMIC ${.CURDIR}/crt0.c -o ${.TARGET}
|
|
${LD} -O ${.TARGET} -x -r ${.TARGET}
|
|
|
|
c++rt0.o: c++rt0.c
|
|
${CC} ${CFLAGS} -fpic -c ${.CURDIR}/c++rt0.c
|
|
@${LD} -O ${.TARGET} -x -r ${.TARGET}
|
|
|
|
#
|
|
# gcrt0.o doesn't really depend on crt0.o, but this is the easiest way
|
|
# to get the dependencies mostly correct.
|
|
#
|
|
gcrt0.o: crt0.o
|
|
${CC} ${CFLAGS} -c -DMCRT0 -DDYNAMIC ${.CURDIR}/crt0.c -o ${.TARGET}
|
|
${LD} -O ${.TARGET} -x -r ${.TARGET}
|
|
|
|
# dependencies fudged as for gcrt0.o
|
|
scrt0.o: crt0.o
|
|
${CC} ${CFLAGS} -c -DCRT0 ${.CURDIR}/crt0.c -o ${.TARGET}
|
|
${LD} -O ${.TARGET} -x -r ${.TARGET}
|
|
|
|
# dependencies fudged as for gcrt0.o
|
|
sgcrt0.o: scrt0.o
|
|
${CC} ${CFLAGS} -c -DMCRT0 ${.CURDIR}/crt0.c -o ${.TARGET}
|
|
${LD} -O ${.TARGET} -x -r ${.TARGET}
|
|
|
|
beforeinstall:
|
|
${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 ${.CURDIR}/dlfcn.h \
|
|
${DESTDIR}/usr/include
|
|
|
|
realinstall:
|
|
${INSTALL} ${COPY} -o ${BINOWN} -g ${BINGRP} -m 444 ${OBJS} \
|
|
${DESTDIR}/usr/lib
|
|
|
|
depend: .depend
|
|
|
|
.depend: crt0.c c++rt0.c
|
|
rm -f .depend
|
|
mkdep ${CFLAGS} -DCRT0 -DDYNAMIC ${.CURDIR}/crt0.c
|
|
mkdep -a ${CFLAGS} ${.CURDIR}/c++rt0.c
|
|
|
|
lint tags:
|
|
|
|
.include <bsd.prog.mk>
|