1 # $FreeBSD: releng/8.2/sys/modules/linux/Makefile 206336 2010-04-07 02:24:41Z nwhitehorn $
2
3 .if ${MACHINE_ARCH} == "amd64"
4 SFX= 32
5 CFLAGS+=-DCOMPAT_FREEBSD32 -DCOMPAT_LINUX32
6 .endif
7
8 .PATH: ${.CURDIR}/../../compat/linux ${.CURDIR}/../../${MACHINE_ARCH}/linux${SFX}
9
10 KMOD= linux
11 SRCS= linux${SFX}_dummy.c linux_emul.c linux_file.c \
12 linux_futex.c linux_getcwd.c linux_ioctl.c linux_ipc.c \
13 linux${SFX}_machdep.c linux_mib.c linux_misc.c linux_signal.c \
14 linux_socket.c linux_stats.c linux_sysctl.c linux${SFX}_sysent.c \
15 linux${SFX}_sysvec.c linux_uid16.c linux_util.c linux_time.c \
16 opt_inet6.h opt_compat.h opt_posix.h vnode_if.h \
17 device_if.h bus_if.h assym.s
18
19 # XXX: for assym.s
20 SRCS+= opt_kstack_pages.h opt_nfs.h opt_compat.h opt_hwpmc_hooks.h
21 .if ${MACHINE_ARCH} == "i386"
22 SRCS+= opt_apic.h
23 .endif
24
25 OBJS= linux${SFX}_locore.o linux${SFX}_support.o
26
27 .if ${MACHINE_ARCH} == "i386"
28 SRCS+= linux_ptrace.c imgact_linux.c opt_cpu.h
29 .endif
30
31 EXPORT_SYMS=
32 EXPORT_SYMS+= linux_emul_path
33 EXPORT_SYMS+= linux_get_osname
34 EXPORT_SYMS+= linux_get_osrelease
35 EXPORT_SYMS+= linux_ifname
36 EXPORT_SYMS+= linux_ioctl_register_handler
37 EXPORT_SYMS+= linux_ioctl_unregister_handler
38
39 CLEANFILES= linux${SFX}_assym.h linux${SFX}_genassym.o
40
41 linux${SFX}_assym.h: linux${SFX}_genassym.o
42 .if exists(@)
43 linux${SFX}_assym.h: @/kern/genassym.sh
44 .endif
45 sh @/kern/genassym.sh linux${SFX}_genassym.o > ${.TARGET}
46
47 linux${SFX}_locore.o: linux${SFX}_locore.s linux${SFX}_assym.h
48 ${CC} -c -x assembler-with-cpp -DLOCORE ${CFLAGS} \
49 ${.IMPSRC} -o ${.TARGET}
50
51 linux${SFX}_support.o: linux${SFX}_support.s assym.s linux${SFX}_assym.h
52 ${CC} -c -x assembler-with-cpp -DLOCORE ${CFLAGS} \
53 ${.IMPSRC} -o ${.TARGET}
54
55 linux${SFX}_genassym.o: linux${SFX}_genassym.c linux.h @ machine
56 ${CC} -c ${CFLAGS:N-fno-common} ${.IMPSRC}
57
58 .if !defined(KERNBUILDDIR)
59 opt_inet6.h:
60 echo "#define INET6 1" > ${.TARGET}
61 .if defined(KTR)
62 CFLAGS+= -DKTR
63 .endif
64 .endif
65
66 .include <bsd.kmod.mk>
Cache object: 90ace5ef45783dac4c55d704dab73568
|