2015-07-22 07:32:49 +00:00
|
|
|
# $FreeBSD$
|
|
|
|
|
2017-03-04 10:10:17 +00:00
|
|
|
SYSDIR?=${SRCTOP}/sys
|
2016-08-10 21:02:41 +00:00
|
|
|
|
|
|
|
.PATH: ${SYSDIR}/compat/cloudabi64
|
2016-08-27 09:50:11 +00:00
|
|
|
.PATH: ${SYSDIR}/${MACHINE_CPUARCH}/cloudabi64
|
2016-08-29 07:48:35 +00:00
|
|
|
.PATH: ${SYSDIR}/${MACHINE}/cloudabi64
|
2015-07-22 07:32:49 +00:00
|
|
|
|
|
|
|
KMOD= cloudabi64
|
2015-10-22 09:07:53 +00:00
|
|
|
SRCS= cloudabi64_fd.c cloudabi64_module.c cloudabi64_poll.c \
|
|
|
|
cloudabi64_sock.c cloudabi64_syscalls.c cloudabi64_sysent.c \
|
|
|
|
cloudabi64_sysvec.c cloudabi64_thread.c
|
2015-07-22 07:32:49 +00:00
|
|
|
|
2016-08-10 21:02:41 +00:00
|
|
|
OBJS= cloudabi64_vdso_blob.o
|
|
|
|
CLEANFILES=cloudabi64_vdso.o
|
|
|
|
|
|
|
|
.if ${MACHINE_CPUARCH} == "aarch64"
|
2016-08-21 07:28:38 +00:00
|
|
|
VDSO_SRCS=${SYSDIR}/contrib/cloudabi/cloudabi_vdso_aarch64.S
|
2016-08-10 21:02:41 +00:00
|
|
|
OUTPUT_TARGET=elf64-littleaarch64
|
|
|
|
BINARY_ARCHITECTURE=aarch64
|
|
|
|
.elif ${MACHINE_CPUARCH} == "amd64"
|
2016-08-21 07:28:38 +00:00
|
|
|
VDSO_SRCS=${SYSDIR}/contrib/cloudabi/cloudabi_vdso_x86_64.S
|
2016-08-10 21:02:41 +00:00
|
|
|
OUTPUT_TARGET=elf64-x86-64-freebsd
|
|
|
|
BINARY_ARCHITECTURE=i386
|
|
|
|
.endif
|
|
|
|
|
|
|
|
cloudabi64_vdso.o: ${VDSO_SRCS}
|
2016-08-21 07:28:38 +00:00
|
|
|
${CC} -x assembler-with-cpp -shared -nostdinc -nostdlib \
|
2016-08-21 15:14:06 +00:00
|
|
|
-Wl,-T${SYSDIR}/compat/cloudabi/cloudabi_vdso.lds \
|
2016-08-10 21:02:41 +00:00
|
|
|
${VDSO_SRCS} -o ${.TARGET}
|
|
|
|
|
|
|
|
cloudabi64_vdso_blob.o: cloudabi64_vdso.o
|
|
|
|
${OBJCOPY} --input-target binary \
|
|
|
|
--output-target ${OUTPUT_TARGET} \
|
|
|
|
--binary-architecture ${BINARY_ARCHITECTURE} \
|
|
|
|
cloudabi64_vdso.o ${.TARGET}
|
|
|
|
|
2015-07-22 07:32:49 +00:00
|
|
|
.include <bsd.kmod.mk>
|