Initial import from FreeBSD RELENG_4:
[dragonfly.git] / sys / emulation / linux / Makefile
1 # $FreeBSD: src/sys/modules/linux/Makefile,v 1.34.2.12 2003/01/02 20:41:34 kan Exp $
2
3 MAINTAINER=     marcel@FreeBSD.org
4
5 .PATH: ${.CURDIR}/../../compat/linux ${.CURDIR}/../../${MACHINE_ARCH}/linux
6
7 KMOD=   linux
8 SRCS=   linux_dummy.c linux_file.c linux_getcwd.c linux_ioctl.c linux_ipc.c \
9         linux_machdep.c linux_mib.c linux_misc.c linux_signal.c linux_socket.c \
10         linux_stats.c linux_sysctl.c linux_sysent.c linux_sysvec.c \
11         linux_util.c opt_compat.h opt_linux.h opt_vmpage.h vnode_if.h
12 OBJS=   linux_locore.o
13 MAN=    linux.8
14
15 .if ${MACHINE_ARCH} == "i386"
16 SRCS+=  linux_ptrace.c linux_uid16.c imgact_linux.c opt_cpu.h
17 .endif
18
19 CLEANFILES=     linux_assym.h linux_genassym.o
20
21 linux_assym.h: linux_genassym.o
22 .if exists(@)
23 linux_assym.h: @/kern/genassym.sh
24 .endif
25         sh @/kern/genassym.sh linux_genassym.o > ${.TARGET}
26
27 linux_locore.o: linux_locore.s linux_assym.h
28         ${CC} -c -x assembler-with-cpp -DLOCORE ${CFLAGS} \
29             ${.IMPSRC} -o ${.TARGET}
30
31 linux_genassym.o: linux_genassym.c linux.h @ machine
32         ${CC} -c ${CFLAGS} ${.IMPSRC}
33
34 opt_compat.h:
35         echo "#define COMPAT_43 1" > opt_compat.h
36
37 afterinstall:
38         ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \
39                 ${.CURDIR}/linux.sh ${DESTDIR}/usr/sbin/linux
40
41 .include <bsd.kmod.mk>