summaryrefslogtreecommitdiff
path: root/TRNS/Makefile
diff options
context:
space:
mode:
authorBirte Kristina Friesel <derf@finalrewind.org>2025-05-13 14:18:39 +0200
committerBirte Kristina Friesel <derf@finalrewind.org>2025-05-13 14:18:39 +0200
commiteb71b2b0a15a400d61285e4e0534a27af5c4f41d (patch)
tree4fa014d35792b33fade0df84baa19fbc33d790e0 /TRNS/Makefile
parent05001600966baeeba4ef42ddcf1804975fe88625 (diff)
TRNS: refactor AspectC++ and timer headers
Diffstat (limited to 'TRNS/Makefile')
-rw-r--r--TRNS/Makefile8
1 files changed, 5 insertions, 3 deletions
diff --git a/TRNS/Makefile b/TRNS/Makefile
index 427a332..302fcd6 100644
--- a/TRNS/Makefile
+++ b/TRNS/Makefile
@@ -2,7 +2,6 @@ NR_DPUS ?= 1
NR_TASKLETS ?= 16
ENERGY ?= 0
-COMMON_INCLUDES := support
HOST_SOURCES := $(wildcard host/*.c)
DPU_SOURCES := $(wildcard dpu/*.c)
@@ -12,12 +11,12 @@ dfatool_timing ?= 1
HOST_CC := ${CC}
-COMMON_FLAGS := -Wall -Wextra -g -I${COMMON_INCLUDES}
+COMMON_FLAGS := -Wall -Wextra -g -Iinclude
HOST_FLAGS := ${COMMON_FLAGS} -O3 -march=native `dpu-pkg-config --cflags --libs dpu` -DNR_TASKLETS=${NR_TASKLETS} -DNR_DPUS=${NR_DPUS} -DENERGY=${ENERGY} -DDFATOOL_TIMING=${dfatool_timing} -DASPECTC=${aspectc}
DPU_FLAGS := ${COMMON_FLAGS} -O2 -DNR_TASKLETS=${NR_TASKLETS}
ifeq (${aspectc_timing}, 1)
- ASPECTC_HOST_FLAGS += -a support/dfatool_host.ah
+ ASPECTC_HOST_FLAGS += -ainclude/dfatool_host_dpu.ah -ainclude/dfatool_host.ah
endif
ASPECTC_HOST_FLAGS ?= -a0
@@ -39,8 +38,11 @@ all: bin/host_code bin/dpu_code
bin:
${QUIET}mkdir -p bin
+# cp/rm are needed to work around AspectC++ not liking symlinks
bin/host_code: ${HOST_SOURCES} ${COMMON_INCLUDES} bin
+ ${QUIET}cp ../include/dfatool_host_dpu.ah include
${QUIET}${HOST_CC} -o $@ ${HOST_SOURCES} ${HOST_FLAGS}
+ ${QUIET}rm -f include/dfatool_host_dpu.ah
bin/dpu_code: ${DPU_SOURCES} ${COMMON_INCLUDES} bin
${QUIET}dpu-upmem-dpurte-clang ${DPU_FLAGS} -o $@ ${DPU_SOURCES}