1# $FreeBSD$ 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_posix.h opt_usb.h vnode_if.h \ 18 device_if.h bus_if.h assym.s \ 19 linux${SFX}_locore.s linux${SFX}_support.s 20DPSRCS= linux${SFX}_genassym.c 21 22# XXX: for assym.s 23SRCS+= opt_kstack_pages.h opt_nfs.h opt_compat.h opt_hwpmc_hooks.h 24.if ${MACHINE_CPUARCH} == "i386" 25SRCS+= opt_apic.h 26.endif 27 28.if ${MACHINE_CPUARCH} == "i386" 29SRCS+= linux_ptrace.c imgact_linux.c opt_cpu.h 30.endif 31 32EXPORT_SYMS= 33EXPORT_SYMS+= linux_emul_path 34EXPORT_SYMS+= linux_get_osname 35EXPORT_SYMS+= linux_get_osrelease 36EXPORT_SYMS+= linux_ifname 37EXPORT_SYMS+= linux_ioctl_register_handler 38EXPORT_SYMS+= linux_ioctl_unregister_handler 39 40CLEANFILES= linux${SFX}_assym.h linux${SFX}_genassym.o 41 42linux${SFX}_assym.h: linux${SFX}_genassym.o 43 sh ${SYSDIR}/kern/genassym.sh linux${SFX}_genassym.o > ${.TARGET} 44 45linux${SFX}_locore.o: linux${SFX}_assym.h assym.s 46 ${CC} -c -x assembler-with-cpp -DLOCORE ${CFLAGS} \ 47 ${.IMPSRC} -o ${.TARGET} 48 49linux${SFX}_support.o: linux${SFX}_assym.h assym.s 50 ${CC} -c -x assembler-with-cpp -DLOCORE ${CFLAGS} \ 51 ${.IMPSRC} -o ${.TARGET} 52 53linux${SFX}_genassym.o: 54 ${CC} -c ${CFLAGS:N-fno-common} ${.IMPSRC} 55 56.if !defined(KERNBUILDDIR) 57.if defined(KTR) 58CFLAGS+= -DKTR 59.endif 60.endif 61 62.include <bsd.kmod.mk> 63