Equivalent to: FreeBSD rev 1.82
[dragonfly.git] / sys / emulation / svr4 / Makefile
1 # Makefile for syscall tables
2 #
3 # $FreeBSD: src/sys/svr4/Makefile,v 1.3 1999/09/01 00:32:18 newton Exp $
4 # $DragonFly: src/sys/emulation/svr4/Attic/Makefile,v 1.9 2004/08/13 17:51:09 dillon Exp $
5
6 # This builds the module
7 #
8 #
9 .PATH:  ${.CURDIR}/../../emulation/svr4/${MACHINE_ARCH} ${.CURDIR}/../../emulation/svr4
10 ARCH=   arch_svr4
11 KMOD=   svr4
12 SRCS=   svr4_sysent.c svr4_sysvec.c opt_compat.h opt_svr4.h opt_vmpage.h \
13         imgact_svr4.c svr4_signal.c svr4_fcntl.c svr4_misc.c \
14         svr4_ioctl.c svr4_stat.c svr4_filio.c svr4_ttold.c svr4_termios.c \
15         svr4_stream.c svr4_socket.c svr4_sockio.c svr4_machdep.c \
16         svr4_resource.c svr4_ipc.c
17 OBJS=   svr4_locore.o 
18 MAN=    svr4.8
19
20 EXPORT_SYMS=_svr4_mod
21 CLEANFILES= svr4_assym.h svr4_genassym.o opt_svr4.h opt_compat.h
22
23 opt_compat.h:
24         echo "#define COMPAT_43 1" > opt_compat.h
25
26 opt_svr4.h:
27         touch opt_svr4.h
28 .if defined(DEBUG)
29         echo "#define DEBUG_SVR4 1" >> opt_svr4.h
30 .endif
31
32 .include <bsd.kmod.mk>
33
34 svr4_assym.h:   svr4_genassym.o
35 .if exists(@)
36 svr4_assym.h:   @/kern/genassym.sh
37 .endif
38         sh @/kern/genassym.sh svr4_genassym.o > ${.TARGET}
39
40 svr4_locore.o:  svr4_locore.s svr4_assym.h
41         ${CC} -c -x assembler-with-cpp -DLOCORE ${CFLAGS} \
42                 ${.IMPSRC} -o ${.TARGET}
43
44 svr4_genassym.o:        svr4_genassym.c svr4.h @ machine ${ARCH}
45         ${CC} -c ${CFLAGS:N-fno-common} ${.IMPSRC}
46
47 afterinstall:
48         ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \
49                 ${.CURDIR}/svr4.sh ${DESTDIR}/usr/sbin/svr4
50
51 sysent:
52         cd ${.CURDIR} && ${MAKE} -f Makefile.misc sysent