diff options
-rw-r--r-- | Makefile | 4 | ||||
-rw-r--r-- | build/exports.mk | 8 | ||||
-rw-r--r-- | build/flags.mk | 44 | ||||
-rw-r--r-- | build/pkgs.mk | 6 |
4 files changed, 31 insertions, 31 deletions
@@ -54,7 +54,7 @@ bin/bfs: ${LIBBFS} obj/src/main.o ${BINS}: @${MKDIR} ${@D} - +${MSG} "[ LD ] $@" ${CC} ${CFLAGS} ${LDFLAGS} ${.ALLSRC} ${LDLIBS} -o $@ + +${MSG} "[ LD ] $@" ${CC} ${_CFLAGS} ${_LDFLAGS} ${.ALLSRC} ${_LDLIBS} -o $@ ${POSTLINK} # Get the .c file for a .o file @@ -63,7 +63,7 @@ CSRC = ${@:obj/%.o=%.c} # Rebuild when the configuration changes ${OBJS}: gen/config.mk @${MKDIR} ${@D} - ${MSG} "[ CC ] ${CSRC}" ${CC} ${CPPFLAGS} ${CFLAGS} -c ${CSRC} -o $@ + ${MSG} "[ CC ] ${CSRC}" ${CC} ${_CPPFLAGS} ${_CFLAGS} -c ${CSRC} -o $@ # Save the version number to this file, but only update version.c if it changes gen/version.c.new:: diff --git a/build/exports.mk b/build/exports.mk index ed19134..913a1aa 100644 --- a/build/exports.mk +++ b/build/exports.mk @@ -12,9 +12,9 @@ export XMKDIR=${MKDIR} export XPKG_CONFIG=${PKG_CONFIG} export XRM=${RM} -export XCPPFLAGS=${CPPFLAGS} -export XCFLAGS=${CFLAGS} -export XLDFLAGS=${LDFLAGS} -export XLDLIBS=${LDLIBS} +export XCPPFLAGS=${_CPPFLAGS} +export XCFLAGS=${_CFLAGS} +export XLDFLAGS=${_LDFLAGS} +export XLDLIBS=${_LDLIBS} export XNOLIBS=${NOLIBS} diff --git a/build/flags.mk b/build/flags.mk index c911b22..8e359aa 100644 --- a/build/flags.mk +++ b/build/flags.mk @@ -109,28 +109,28 @@ APPEND = @append() { test -z "$$2" || printf '%s += %s\n' "$$1" "$$2" >>$@; }; a gen/flags.mk:: ${MSG} "[ GEN] $@" @printf '# %s\n' "$@" >$@ - ${SETVAR} CPPFLAGS "$$BFS_CPPFLAGS" - ${APPEND} CPPFLAGS "$$TSAN_CPPFLAGS" - ${APPEND} CPPFLAGS "$$LINT_CPPFLAGS" - ${APPEND} CPPFLAGS "$$RELEASE_CPPFLAGS" - ${APPEND} CPPFLAGS "$$XCPPFLAGS" - ${APPEND} CPPFLAGS "$$EXTRA_CPPFLAGS" - ${SETVAR} CFLAGS "$$BFS_CFLAGS" - ${APPEND} CFLAGS "$$ASAN_CFLAGS" - ${APPEND} CFLAGS "$$LSAN_CFLAGS" - ${APPEND} CFLAGS "$$MSAN_CFLAGS" - ${APPEND} CFLAGS "$$TSAN_CFLAGS" - ${APPEND} CFLAGS "$$UBSAN_CFLAGS" - ${APPEND} CFLAGS "$$SAN_CFLAGS" - ${APPEND} CFLAGS "$$GCOV_CFLAGS" - ${APPEND} CFLAGS "$$LINT_CFLAGS" - ${APPEND} CFLAGS "$$RELEASE_CFLAGS" - ${APPEND} CFLAGS "$$XCFLAGS" - ${APPEND} CFLAGS "$$EXTRA_CFLAGS" - ${SETVAR} LDFLAGS "$$XLDFLAGS" - ${SETVAR} LDLIBS "$$XLDLIBS" - ${APPEND} LDLIBS "$$EXTRA_LDLIBS" - ${APPEND} LDLIBS "$$BFS_LDLIBS" + ${SETVAR} _CPPFLAGS "$$BFS_CPPFLAGS" + ${APPEND} _CPPFLAGS "$$TSAN_CPPFLAGS" + ${APPEND} _CPPFLAGS "$$LINT_CPPFLAGS" + ${APPEND} _CPPFLAGS "$$RELEASE_CPPFLAGS" + ${APPEND} _CPPFLAGS "$$XCPPFLAGS" + ${APPEND} _CPPFLAGS "$$EXTRA_CPPFLAGS" + ${SETVAR} _CFLAGS "$$BFS_CFLAGS" + ${APPEND} _CFLAGS "$$ASAN_CFLAGS" + ${APPEND} _CFLAGS "$$LSAN_CFLAGS" + ${APPEND} _CFLAGS "$$MSAN_CFLAGS" + ${APPEND} _CFLAGS "$$TSAN_CFLAGS" + ${APPEND} _CFLAGS "$$UBSAN_CFLAGS" + ${APPEND} _CFLAGS "$$SAN_CFLAGS" + ${APPEND} _CFLAGS "$$GCOV_CFLAGS" + ${APPEND} _CFLAGS "$$LINT_CFLAGS" + ${APPEND} _CFLAGS "$$RELEASE_CFLAGS" + ${APPEND} _CFLAGS "$$XCFLAGS" + ${APPEND} _CFLAGS "$$EXTRA_CFLAGS" + ${SETVAR} _LDFLAGS "$$XLDFLAGS" + ${SETVAR} _LDLIBS "$$XLDLIBS" + ${APPEND} _LDLIBS "$$EXTRA_LDLIBS" + ${APPEND} _LDLIBS "$$BFS_LDLIBS" ${SETVAR} NOLIBS "$$XNOLIBS" @test "${OS}-${SAN}" != FreeBSD-y || printf 'POSTLINK = elfctl -e +noaslr $$@\n' >>$@ ${VCAT} $@ diff --git a/build/pkgs.mk b/build/pkgs.mk index 39b550d..5a26548 100644 --- a/build/pkgs.mk +++ b/build/pkgs.mk @@ -15,9 +15,9 @@ gen/pkgs.mk: ${HEADERS} @printf '# %s\n' "$@" >$@ @gen() { \ printf 'PKGS := %s\n' "$$*"; \ - printf 'CFLAGS += %s\n' "$$(build/pkgconf.sh --cflags "$$@")"; \ - printf 'LDFLAGS += %s\n' "$$(build/pkgconf.sh --ldflags "$$@")"; \ - printf 'LDLIBS := %s $${LDLIBS}\n' "$$(build/pkgconf.sh --ldlibs "$$@")"; \ + printf '_CFLAGS += %s\n' "$$(build/pkgconf.sh --cflags "$$@")"; \ + printf '_LDFLAGS += %s\n' "$$(build/pkgconf.sh --ldflags "$$@")"; \ + printf '_LDLIBS := %s $${_LDLIBS}\n' "$$(build/pkgconf.sh --ldlibs "$$@")"; \ }; \ gen $$(grep -l ' true$$' ${.ALLSRC} | sed 's|.*/\(.*\)\.h|\1|') >>$@ ${VCAT} $@ |