Files
freebsd/sys/modules/cloudabi32/Makefile
T
Enji Cooper cad800042f MFC r314651,r318439,r318440:
r314651:

sys/modules: normalize .CURDIR-relative paths to SRCTOP

This simplifies make output/logic

Tested with:	`cd sys/modules; make ALL_MODULES=` on amd64

r318439:

Normalize .PATH on SRCTOP

This will help Jenkins dedupe 9 warnings between the static build and
the module build of ipsec(4).

Missed in SRCTOP conversion in r314651.

MFC with:	r314651

r318440:

Normalize SYSDIR on SRCTOP instead of .CURDIR

This is being done to simplify pathing for CFLAGS and source files.
2017-05-30 04:11:12 +00:00

43 lines
1.3 KiB
Makefile

# $FreeBSD$
SYSDIR?=${SRCTOP}/sys
.PATH: ${SYSDIR}/compat/cloudabi32
.PATH: ${SYSDIR}/${MACHINE_CPUARCH}/cloudabi32
.PATH: ${SYSDIR}/${MACHINE}/cloudabi32
KMOD= cloudabi32
SRCS= cloudabi32_fd.c cloudabi32_module.c cloudabi32_poll.c \
cloudabi32_sock.c cloudabi32_syscalls.c cloudabi32_sysent.c \
cloudabi32_sysvec.c cloudabi32_thread.c
OBJS= cloudabi32_vdso_blob.o
CLEANFILES=cloudabi32_vdso.o
.if ${MACHINE_CPUARCH} == "amd64"
VDSO_SRCS=${SYSDIR}/contrib/cloudabi/cloudabi_vdso_i686_on_64bit.S
OUTPUT_TARGET=elf64-x86-64-freebsd
BINARY_ARCHITECTURE=i386
.elif ${MACHINE_ARCH} == "armv6"
VDSO_SRCS=${SYSDIR}/contrib/cloudabi/cloudabi_vdso_armv6.S
OUTPUT_TARGET=elf32-littlearm
BINARY_ARCHITECTURE=arm
.elif ${MACHINE_CPUARCH} == "i386"
VDSO_SRCS=${SYSDIR}/contrib/cloudabi/cloudabi_vdso_i686.S
OUTPUT_TARGET=elf32-i386-freebsd
BINARY_ARCHITECTURE=i386
.endif
cloudabi32_vdso.o: ${VDSO_SRCS}
${CC} -x assembler-with-cpp -m32 -shared -nostdinc -nostdlib \
-Wl,-T${SYSDIR}/compat/cloudabi/cloudabi_vdso.lds \
${VDSO_SRCS} -o ${.TARGET}
cloudabi32_vdso_blob.o: cloudabi32_vdso.o
${OBJCOPY} --input-target binary \
--output-target ${OUTPUT_TARGET} \
--binary-architecture ${BINARY_ARCHITECTURE} \
cloudabi32_vdso.o ${.TARGET}
.include <bsd.kmod.mk>