freebsd-dev/sys/modules/svr4/Makefile
Bruce Evans b36c1562e1 Honor ${LDFLAGS} for building svr4_genassym. This is part of fixing
world breakage (mainly for cross-world cases).  The world Makefile
attempts to build tools static so that nonexistent or wrong shared
libraries and interpreters don't get used.  This is broken anyway
since the world Makefile doesn't know about svr4_genassym.

Force building svr4_genassym static.  This is part of "fixing"
aout-to-elf-build breakage.  aout-to-elf-build abuses NOTOOLS to
avoid rebuilding all the aout tools.  This saves time and avoids
some complications.  However, it breaks all the internal tools --
they get linked to target libraries which might not work.  Cases
where the host can run the target's static libraries are "fixed"
by encrufting all Makefiles that build internal tools to build the
tools static.

Don't add .depend to CLEANFILES -- it just breaks the separation of
`make cleandepend' from `make clean'.

Removed some superflous explicit dependencies.
1999-02-06 07:48:24 +00:00

50 lines
1.3 KiB
Makefile

# $Id: Makefile,v 1.1 1999/01/30 06:29:48 newton Exp $
.PATH: ${.CURDIR}/../../i386/svr4 ${.CURDIR}/../../svr4
KMOD= svr4
SRCS= svr4_sysent.c svr4_sysvec.c opt_compat.h opt_vmpage.h vnode_if.h \
imgact_svr4.c svr4_signal.c svr4_fcntl.c svr4_misc.c svr4_ioctl.c \
svr4_stat.c svr4_filio.c svr4_ttold.c svr4_termios.c svr4_stream.c \
svr4_socket.c svr4_sockio.c svr4_machdep.c svr4_resource.c \
svr4_ipc.c
OBJS= svr4_locore.o
NOMAN=1
MAN8= svr4.8
CFLAGS+= -DKERNEL
CFLAGS+= -DCOMPAT_SVR4
.if defined(DEBUG)
CFLAGS+= -DDEBUG_SVR4
.endif
EXPORT_SYMS=_svr4_mod
CLEANFILES+= vnode_if.h vnode_if.c svr4_genassym.o svr4_genassym \
svr4_assym.h opt_compat.h opt_vmpage.h
build-tools: svr4_genassym
svr4_assym.h: svr4_genassym
./svr4_genassym > svr4_assym.h
svr4_locore.o: svr4_locore.s svr4_assym.h
${CC} -c -x assembler-with-cpp -DLOCORE -DKERNEL ${CFLAGS} \
${.IMPSRC} -o ${.TARGET}
svr4_genassym.o: svr4_genassym.c svr4.h @ machine
${CC} -c ${CFLAGS} -UKERNEL ${.IMPSRC}
svr4_genassym: svr4_genassym.o
${CC} -static ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${.ALLSRC}
opt_compat.h:
echo "#define COMPAT_43 1" > opt_compat.h
opt_vmpage.h:
touch opt_vmpage.h
afterinstall:
${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \
${.CURDIR}/svr4.sh ${DESTDIR}/usr/bin/svr4
.include <bsd.kmod.mk>