Fix build with read-only source dir after 83c20b8a2da0
I changed the Makefile to use SRCS instead of LDADD, but since there is still and absolute path to the source the .o file was created inside the source directory instead of the build directory. It would be nice if this was an error/warning by default, but for now just fix this issue by using .PATH and the base name of the file. Reported by: cy, peterj
This commit is contained in:
parent
eb0b1b33d5
commit
8b820df156
@ -62,9 +62,11 @@ SRCS.libkern_crc32+= libkern_crc32.c
|
||||
SRCS.libkern_crc32+= gsb_crc32.c
|
||||
CFLAGS.libkern_crc32+= -DTESTING
|
||||
.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386"
|
||||
SRCS.libkern_crc32+= ${SRCTOP}/sys/libkern/x86/crc32_sse42.c
|
||||
.PATH: ${SRCTOP}/sys/libkern/x86
|
||||
SRCS.libkern_crc32+= crc32_sse42.c
|
||||
.elif ${MACHINE_CPUARCH} == "aarch64"
|
||||
SRCS.libkern_crc32+= ${SRCTOP}/sys/libkern/arm64/crc32c_armv8.S
|
||||
.PATH: ${SRCTOP}/sys/libkern/arm64
|
||||
SRCS.libkern_crc32+= crc32c_armv8.S
|
||||
.endif
|
||||
|
||||
# subr_unit.c contains functions whose prototypes lie in headers that cannot be
|
||||
|
Loading…
x
Reference in New Issue
Block a user