1993-11-04 01:09:18 +00:00
|
|
|
# from: @(#)Makefile 5.6 (Berkeley) 5/22/91
|
1995-11-02 12:42:42 +00:00
|
|
|
# $Id: Makefile,v 1.22 1995/10/29 09:49:18 phk Exp $
|
1993-06-12 14:58:17 +00:00
|
|
|
|
1995-11-02 12:42:42 +00:00
|
|
|
CFLAGS+= -DLIBC_SCCS -fno-omit-frame-pointer
|
1995-10-22 18:36:47 +00:00
|
|
|
OBJS= crt0.o c++rt0.o gcrt0.o scrt0.o sgcrt0.o
|
1994-08-22 15:13:41 +00:00
|
|
|
CLEANFILES+= a.out
|
1995-02-07 13:27:29 +00:00
|
|
|
MAN3+= dlopen.3
|
1995-06-30 15:30:35 +00:00
|
|
|
MLINKS+= dlopen.3 dlsym.3 \
|
|
|
|
dlopen.3 dlerror.3 \
|
|
|
|
dlopen.3 dlclose.3
|
1993-06-12 14:58:17 +00:00
|
|
|
|
|
|
|
all: ${OBJS}
|
|
|
|
|
1995-10-18 04:19:00 +00:00
|
|
|
crt0.o: crt0.c
|
|
|
|
${CC} ${CFLAGS} -c -DCRT0 -DDYNAMIC ${.CURDIR}/crt0.c -o ${.TARGET}
|
|
|
|
${LD} -x -r ${.TARGET}
|
|
|
|
mv a.out ${.TARGET}
|
|
|
|
|
1994-03-09 17:12:59 +00:00
|
|
|
c++rt0.o: c++rt0.c
|
1995-06-30 15:30:35 +00:00
|
|
|
${CC} ${CFLAGS} -fpic -c ${.CURDIR}/c++rt0.c
|
1994-03-09 17:12:59 +00:00
|
|
|
@${LD} -x -r ${.TARGET}
|
1993-12-24 02:11:37 +00:00
|
|
|
@mv a.out ${.TARGET}
|
1993-06-12 14:58:17 +00:00
|
|
|
|
1995-06-30 15:30:35 +00:00
|
|
|
#
|
|
|
|
# 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
|
1995-10-18 04:19:00 +00:00
|
|
|
${CC} ${CFLAGS} -c -DMCRT0 -DDYNAMIC ${.CURDIR}/crt0.c -o ${.TARGET}
|
1993-12-24 02:11:37 +00:00
|
|
|
${LD} -x -r ${.TARGET}
|
|
|
|
mv a.out ${.TARGET}
|
1993-06-12 14:58:17 +00:00
|
|
|
|
1995-10-22 18:36:47 +00:00
|
|
|
# dependencies fudged as for gcrt0.o
|
|
|
|
scrt0.o: crt0.o
|
|
|
|
${CC} ${CFLAGS} -c -DCRT0 ${.CURDIR}/crt0.c -o ${.TARGET}
|
|
|
|
${LD} -x -r ${.TARGET}
|
|
|
|
mv a.out ${.TARGET}
|
|
|
|
|
|
|
|
# dependencies fudged as for gcrt0.o
|
|
|
|
sgcrt0.o: scrt0.o
|
|
|
|
${CC} ${CFLAGS} -c -DMCRT0 ${.CURDIR}/crt0.c -o ${.TARGET}
|
|
|
|
${LD} -x -r ${.TARGET}
|
|
|
|
mv a.out ${.TARGET}
|
|
|
|
|
1995-06-30 15:30:35 +00:00
|
|
|
beforeinstall:
|
|
|
|
cmp -s ${.CURDIR}/dlfcn.h ${DESTDIR}/usr/include/dlfcn.h || \
|
1995-08-06 12:37:41 +00:00
|
|
|
${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 \
|
1995-06-30 15:30:35 +00:00
|
|
|
${.CURDIR}/dlfcn.h ${DESTDIR}/usr/include
|
1993-06-12 14:58:17 +00:00
|
|
|
|
1995-06-30 15:30:35 +00:00
|
|
|
realinstall:
|
|
|
|
.for i in ${OBJS}
|
|
|
|
cmp -s $i ${DESTDIR}/usr/lib/$i || \
|
1995-08-06 12:24:38 +00:00
|
|
|
${INSTALL} ${COPY} -o ${BINOWN} -g ${BINGRP} -m 444 \
|
|
|
|
$i ${DESTDIR}/usr/lib
|
1995-06-30 15:30:35 +00:00
|
|
|
.endfor
|
|
|
|
|
|
|
|
depend: .depend
|
|
|
|
|
|
|
|
.depend: crt0.c c++rt0.c
|
|
|
|
rm -f .depend
|
1995-10-18 04:19:00 +00:00
|
|
|
mkdep ${CFLAGS} -DCRT0 -DDYNAMIC ${.CURDIR}/crt0.c
|
1995-06-30 15:30:35 +00:00
|
|
|
mkdep -a ${CFLAGS} ${.CURDIR}/c++rt0.c
|
|
|
|
|
|
|
|
lint tags:
|
1993-06-12 14:58:17 +00:00
|
|
|
|
|
|
|
.include <bsd.prog.mk>
|