759037cc4fb6521b0d51ebc7d2d7ef25e1bf7b4c
[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 .PATH: ${.CURDIR}/${MACHINE_ARCH}
4
5 ARCH=   arch_linux
6 KMOD=   linux
7 SRCS=   linux_dummy.c linux_emuldata.c linux_epoll.c \
8         linux_file.c linux_futex.c linux_getcwd.c linux_ioctl.c \
9         linux_ipc.c \
10         linux_machdep.c linux_mib.c linux_misc.c linux_time.c linux_signal.c \
11         linux_socket.c \
12         linux_stats.c linux_sysctl.c linux_sysent.c linux_sysvec.c \
13         linux_util.c opt_compat.h opt_global.h opt_vmpage.h
14 SRCS+=  bus_if.h device_if.h
15 SRCS+=  opt_nfs.h assym.s
16 OBJS=   linux_support.o linux_locore.o
17
18 SUBDIR= ${MACHINE_ARCH}
19 .if ${MACHINE_ARCH} == "i386"
20 SRCS+=  linux_ptrace.c linux_uid16.c imgact_linux.c opt_cpu.h
21 .endif
22
23 CLEANFILES=     linux_assym.h linux_genassym.o
24
25 linux_assym.h: linux_genassym.o
26
27 .if exists(@)
28 linux_assym.h: @/kern/genassym.sh
29 .endif
30         sh @/kern/genassym.sh linux_genassym.o > ${.TARGET}
31
32 linux_locore.o: linux_locore.s linux_assym.h
33         ${CC} -c -x assembler-with-cpp -DLOCORE ${CFLAGS} \
34             ${.IMPSRC} -o ${.TARGET}
35
36 linux_support.o: linux_support.s linux_assym.h assym.s
37         ${CC} -c -x assembler-with-cpp -DLOCORE ${CFLAGS} \
38             ${.IMPSRC} -o ${.TARGET}
39
40 linux_genassym.o: linux_genassym.c linux.h @
41         ${CC} -c ${CFLAGS:N-fno-common} ${.IMPSRC}
42
43 opt_compat.h:
44         echo "#define COMPAT_43 1" > opt_compat.h
45
46 .include <bsd.kmod.mk>