]> CyberLeo.Net >> Repos - FreeBSD/releng/7.2.git/blob - sys/modules/linux/Makefile
Create releng/7.2 from stable/7 in preparation for 7.2-RELEASE.
[FreeBSD/releng/7.2.git] / sys / modules / linux / Makefile
1 # $FreeBSD$
2
3 .if ${MACHINE_ARCH} == "amd64"
4 SFX= 32
5 CFLAGS+=-DCOMPAT_IA32 -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_mac.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_apic.h opt_compat.h
21
22 OBJS=   linux${SFX}_locore.o linux${SFX}_support.o
23
24 .if ${MACHINE_ARCH} == "i386"
25 SRCS+=  linux_ptrace.c imgact_linux.c opt_cpu.h
26 .endif
27
28 EXPORT_SYMS=
29 EXPORT_SYMS+=   linux_emul_path
30 EXPORT_SYMS+=   linux_get_osname
31 EXPORT_SYMS+=   linux_get_osrelease
32 EXPORT_SYMS+=   linux_ifname
33 EXPORT_SYMS+=   linux_ioctl_register_handler
34 EXPORT_SYMS+=   linux_ioctl_unregister_handler
35
36 CLEANFILES=     linux${SFX}_assym.h linux${SFX}_genassym.o
37
38 linux${SFX}_assym.h: linux${SFX}_genassym.o
39 .if exists(@)
40 linux${SFX}_assym.h: @/kern/genassym.sh
41 .endif
42         sh @/kern/genassym.sh linux${SFX}_genassym.o > ${.TARGET}
43
44 linux${SFX}_locore.o: linux${SFX}_locore.s linux${SFX}_assym.h
45         ${CC} -c -x assembler-with-cpp -DLOCORE ${CFLAGS} \
46             ${.IMPSRC} -o ${.TARGET}
47
48 linux${SFX}_support.o: linux${SFX}_support.s assym.s linux${SFX}_assym.h
49         ${CC} -c -x assembler-with-cpp -DLOCORE ${CFLAGS} \
50             ${.IMPSRC} -o ${.TARGET}
51
52 linux${SFX}_genassym.o: linux${SFX}_genassym.c linux.h @ machine
53         ${CC} -c ${CFLAGS:N-fno-common} ${.IMPSRC}
54
55 .if !defined(KERNBUILDDIR)
56 opt_inet6.h:
57         echo "#define INET6 1" > opt_inet6.h
58 .endif
59
60 .include <bsd.kmod.mk>