1c3aac50fSPeter Wemm# $FreeBSD$ 2c21dee17SSøren Schmidt 3adfa0adeSAlexander Leidinger.if ${MACHINE_ARCH} == "amd64" 4adfa0adeSAlexander LeidingerSFX= 32 5adfa0adeSAlexander LeidingerCFLAGS+=-DCOMPAT_IA32 -DCOMPAT_LINUX32 6adfa0adeSAlexander Leidinger.endif 7adfa0adeSAlexander Leidinger 8adfa0adeSAlexander Leidinger.PATH: ${.CURDIR}/../../compat/linux ${.CURDIR}/../../${MACHINE_ARCH}/linux${SFX} 9c68159a6SDavid E. O'Brien 10a654d072SPeter WemmKMOD= linux 113680a419SAlexander LeidingerSRCS= linux${SFX}_dummy.c linux_emul.c linux_file.c \ 126a1162d4SAlexander Leidinger linux_futex.c linux_getcwd.c linux_ioctl.c linux_ipc.c \ 136a1162d4SAlexander Leidinger linux${SFX}_machdep.c linux_mib.c linux_misc.c linux_signal.c \ 146a1162d4SAlexander Leidinger linux_socket.c linux_stats.c linux_sysctl.c linux${SFX}_sysent.c \ 156a1162d4SAlexander Leidinger linux${SFX}_sysvec.c linux_uid16.c linux_util.c linux_time.c \ 166a1162d4SAlexander Leidinger opt_inet6.h opt_mac.h opt_compat.h opt_posix.h vnode_if.h \ 171c182de9SKonstantin Belousov device_if.h bus_if.h assym.s 181c182de9SKonstantin Belousov 191c182de9SKonstantin Belousov# XXX: for assym.s 201c182de9SKonstantin BelousovSRCS+= opt_kstack_pages.h opt_nfs.h opt_apic.h opt_compat.h 211c182de9SKonstantin Belousov 221c182de9SKonstantin BelousovOBJS= linux${SFX}_locore.o linux${SFX}_support.o 23785d64c4SPeter Wemm 24e4b36f7dSPeter Wemm.if ${MACHINE_ARCH} == "i386" 25adfa0adeSAlexander LeidingerSRCS+= linux_ptrace.c imgact_linux.c opt_cpu.h 26849baab8SDavid E. O'Brien.endif 27849baab8SDavid E. O'Brien 28bea8bf95SDag-Erling SmørgravEXPORT_SYMS= 29bea8bf95SDag-Erling SmørgravEXPORT_SYMS+= linux_emul_path 30bea8bf95SDag-Erling SmørgravEXPORT_SYMS+= linux_get_osname 31bea8bf95SDag-Erling SmørgravEXPORT_SYMS+= linux_get_osrelease 32bea8bf95SDag-Erling SmørgravEXPORT_SYMS+= linux_ifname 33bea8bf95SDag-Erling SmørgravEXPORT_SYMS+= linux_ioctl_register_handler 34bea8bf95SDag-Erling SmørgravEXPORT_SYMS+= linux_ioctl_unregister_handler 35bea8bf95SDag-Erling Smørgrav 36adfa0adeSAlexander LeidingerCLEANFILES= linux${SFX}_assym.h linux${SFX}_genassym.o 37785d64c4SPeter Wemm 38adfa0adeSAlexander Leidingerlinux${SFX}_assym.h: linux${SFX}_genassym.o 3927d33931SBruce Evans.if exists(@) 40adfa0adeSAlexander Leidingerlinux${SFX}_assym.h: @/kern/genassym.sh 4127d33931SBruce Evans.endif 42adfa0adeSAlexander Leidinger sh @/kern/genassym.sh linux${SFX}_genassym.o > ${.TARGET} 43785d64c4SPeter Wemm 44adfa0adeSAlexander Leidingerlinux${SFX}_locore.o: linux${SFX}_locore.s linux${SFX}_assym.h 4527e2d53cSBruce Evans ${CC} -c -x assembler-with-cpp -DLOCORE ${CFLAGS} \ 46c11bd941SBruce Evans ${.IMPSRC} -o ${.TARGET} 47785d64c4SPeter Wemm 481c182de9SKonstantin Belousovlinux${SFX}_support.o: linux${SFX}_support.s assym.s 491c182de9SKonstantin Belousov ${CC} -c -x assembler-with-cpp -DLOCORE ${CFLAGS} \ 501c182de9SKonstantin Belousov ${.IMPSRC} -o ${.TARGET} 511c182de9SKonstantin Belousov 52adfa0adeSAlexander Leidingerlinux${SFX}_genassym.o: linux${SFX}_genassym.c linux.h @ machine 53ee3c29ebSMike Smith ${CC} -c ${CFLAGS:N-fno-common} ${.IMPSRC} 54785d64c4SPeter Wemm 5582292344SYaroslav Tykhiy.if !defined(KERNBUILDDIR) 56ca26842eSHajimu UMEMOTOopt_inet6.h: 57ca26842eSHajimu UMEMOTO echo "#define INET6 1" > opt_inet6.h 5882292344SYaroslav Tykhiy.endif 59ca26842eSHajimu UMEMOTO 6064db83a8SPeter Wemm.include <bsd.kmod.mk> 61