4962423c3e196eb4c311965623e6bb733649447e
[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 # $DragonFly: src/sys/emulation/linux/Makefile,v 1.5 2004/02/22 12:11:00 joerg Exp $
3
4 .PATH: ${.CURDIR}/../../emulation/linux ${.CURDIR}/../../emulation/linux/${MACHINE_ARCH}
5
6 ARCH=   arch_linux
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 SUBDIR= i386/linprocfs
16 .if ${MACHINE_ARCH} == "i386"
17 SRCS+=  linux_ptrace.c linux_uid16.c imgact_linux.c opt_cpu.h
18 .endif
19
20 CLEANFILES=     linux_assym.h linux_genassym.o
21
22 linux_assym.h: linux_genassym.o
23 .if exists(@)
24 linux_assym.h: @/kern/genassym.sh
25 .endif
26         sh @/kern/genassym.sh linux_genassym.o > ${.TARGET}
27
28 linux_locore.o: linux_locore.s linux_assym.h
29         ${CC} -c -x assembler-with-cpp -DLOCORE ${CFLAGS} \
30             ${.IMPSRC} -o ${.TARGET}
31
32 linux_genassym.o: linux_genassym.c linux.h @ machine
33         ${CC} -c ${CFLAGS:N-fno-common} ${.IMPSRC}
34
35 opt_compat.h:
36         echo "#define COMPAT_43 1" > opt_compat.h
37
38 afterinstall:
39         ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \
40                 ${.CURDIR}/linux.sh ${DESTDIR}/usr/sbin/linux
41
42 .include <bsd.kmod.mk>
43 .include <bsd.subdir.mk>