aboutsummaryrefslogtreecommitdiff
path: root/rules.mk
diff options
context:
space:
mode:
authoraqua <aqua@iserlohn-fortress.net>2023-08-04 08:57:11 +0300
committeraqua <aqua@iserlohn-fortress.net>2023-08-04 08:57:11 +0300
commit0e6598355040f92db6f373883c739a89c93fd63f (patch)
tree1d6add390d8e2a2d466ca88286e462c214b94a9f /rules.mk
parentAdded make wrapper (diff)
downloadkernel-0e6598355040f92db6f373883c739a89c93fd63f.tar.xz
rules.mk: make include paths absolute
Diffstat (limited to 'rules.mk')
-rw-r--r--rules.mk13
1 files changed, 7 insertions, 6 deletions
diff --git a/rules.mk b/rules.mk
index 5407a61..ed72b27 100644
--- a/rules.mk
+++ b/rules.mk
@@ -1,5 +1,6 @@
# variables
VCS_ROOT = $(shell git rev-parse --show-toplevel)
+CWD = $(shell pwd)
# generate build rules from variables
# This makefile defines the following targets:
@@ -74,9 +75,9 @@ all: ${DEFAULT_TARGETS}
@echo " -> Built all in ${COMPONENT}"
# extra flags
-${ARCH}_CFLAGS += -I../lib/libk \
+${ARCH}_CFLAGS += -I${VCS_ROOT}/lib/libk \
-Werror=implicit-function-declaration
-${ARCH}_CXXFLAGS += -I../lib/libk -Drestrict=__restrict__
+${ARCH}_CXXFLAGS += -I${VCS_ROOT}/lib/libk -Drestrict=__restrict__
# Target suffix rules
# -MD output makefile dependency rule
@@ -120,19 +121,19 @@ build/%.o: %.cc
.PHONY: test test.quiet valgrind valgrind.quiet clean.base FORCE
test: ${TESTS}
- @echo " -> Running tests in $(shell pwd | xargs basename)"
+ @echo " -> Running tests in $(CWD:${VCS_ROOT}/%=%)"
@[[ -z "${TESTS}" ]] || ${VCS_ROOT}/scripts/test_runner.py --verbose ${TESTS}
test.quiet: ${TESTS}
- @echo " -> Running tests in $(shell pwd | xargs basename)"
+ @echo " -> Running tests in $(CWD:${VCS_ROOT}/%=%)"
@[[ -z "${TESTS}" ]] || ${VCS_ROOT}/scripts/test_runner.py ${TESTS}
valgrind: ${TESTS}
- @echo " -> Running valgrind on tests in $(shell pwd | xargs basename)"
+ @echo " -> Running valgrind on tests in $(CWD:${VCS_ROOT}/%=%)"
@[[ -z "${TESTS}" ]] || ${VCS_ROOT}/scripts/test_runner.py --verbose --valgrind ${TESTS}
valgrind.quiet: ${TESTS}
- @echo " -> Running valgrind on tests in $(shell pwd | xargs basename)"
+ @echo " -> Running valgrind on tests in $(CWD:${VCS_ROOT}/%=%)"
@[[ -z "${TESTS}" ]] || ${VCS_ROOT}/scripts/test_runner.py --valgrind ${TESTS}
clean: FORCE