Makefile revision 276429
1# $FreeBSD: stable/10/sys/modules/linux/Makefile 276429 2014-12-30 22:22:46Z neel $ 2 3.if ${MACHINE_CPUARCH} == "amd64" 4SFX= 32 5CFLAGS+=-DCOMPAT_FREEBSD32 -DCOMPAT_LINUX32 6.endif 7 8.PATH: ${.CURDIR}/../../compat/linux ${.CURDIR}/../../${MACHINE_CPUARCH}/linux${SFX} 9 10KMOD= linux 11SRCS= linux_fork.c 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 linux_timer.c \ 17 opt_inet6.h opt_compat.h opt_kdtrace.h opt_posix.h opt_usb.h \ 18 vnode_if.h device_if.h bus_if.h assym.s 19DPSRCS= linux${SFX}_genassym.c 20 21# XXX: for assym.s 22SRCS+= opt_kstack_pages.h opt_nfs.h opt_compat.h opt_hwpmc_hooks.h 23.if ${MACHINE_CPUARCH} == "i386" 24SRCS+= opt_apic.h 25.endif 26 27OBJS= linux${SFX}_locore.o linux${SFX}_support.o 28 29.if ${MACHINE_CPUARCH} == "i386" 30SRCS+= linux_ptrace.c imgact_linux.c opt_cpu.h 31.endif 32 33EXPORT_SYMS= 34EXPORT_SYMS+= linux_emul_path 35EXPORT_SYMS+= linux_get_osname 36EXPORT_SYMS+= linux_get_osrelease 37EXPORT_SYMS+= linux_ifname 38EXPORT_SYMS+= linux_ioctl_register_handler 39EXPORT_SYMS+= linux_ioctl_unregister_handler 40 41CLEANFILES= linux${SFX}_assym.h linux${SFX}_genassym.o 42 43linux${SFX}_assym.h: linux${SFX}_genassym.o 44.if exists(@) 45linux${SFX}_assym.h: @/kern/genassym.sh 46.endif 47 sh @/kern/genassym.sh linux${SFX}_genassym.o > ${.TARGET} 48 49linux${SFX}_locore.o: linux${SFX}_locore.s linux${SFX}_assym.h 50 ${CC} -c -x assembler-with-cpp -DLOCORE ${CFLAGS} \ 51 ${.IMPSRC} -o ${.TARGET} 52 53linux${SFX}_support.o: linux${SFX}_support.s assym.s linux${SFX}_assym.h 54 ${CC} -c -x assembler-with-cpp -DLOCORE ${CFLAGS} \ 55 ${.IMPSRC} -o ${.TARGET} 56 57linux${SFX}_genassym.o: linux${SFX}_genassym.c linux.h @ machine x86 58 ${CC} -c ${CFLAGS:N-fno-common} ${.IMPSRC} 59 60.if !defined(KERNBUILDDIR) 61opt_inet6.h: 62 echo "#define INET6 1" > ${.TARGET} 63.if defined(KTR) 64CFLAGS+= -DKTR 65.endif 66.endif 67 68.include <bsd.kmod.mk> 69