diff options
Diffstat (limited to 'TRNS/Makefile')
-rw-r--r-- | TRNS/Makefile | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/TRNS/Makefile b/TRNS/Makefile index 9d6a60b..427a332 100644 --- a/TRNS/Makefile +++ b/TRNS/Makefile @@ -6,12 +6,28 @@ COMMON_INCLUDES := support HOST_SOURCES := $(wildcard host/*.c) DPU_SOURCES := $(wildcard dpu/*.c) +aspectc ?= 0 +aspectc_timing ?= * dfatool_timing ?= 1 +HOST_CC := ${CC} + COMMON_FLAGS := -Wall -Wextra -g -I${COMMON_INCLUDES} -HOST_FLAGS := ${COMMON_FLAGS} -std=c11 -O3 `dpu-pkg-config --cflags --libs dpu` -DNR_TASKLETS=${NR_TASKLETS} -DNR_DPUS=${NR_DPUS} -DENERGY=${ENERGY} -DDFATOOL_TIMING=${dfatool_timing} +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 +endif + +ASPECTC_HOST_FLAGS ?= -a0 + +ifeq (${aspectc}, 1) + HOST_CC = ag++ -r repo.acp -v 0 ${ASPECTC_HOST_FLAGS} --c_compiler ${UPMEM_HOME}/bin/clang++ -p . --Xcompiler +else + HOST_FLAGS += -std=c11 +endif + QUIET = @ ifdef verbose @@ -24,7 +40,7 @@ bin: ${QUIET}mkdir -p bin bin/host_code: ${HOST_SOURCES} ${COMMON_INCLUDES} bin - ${QUIET}${CC} -o $@ ${HOST_SOURCES} ${HOST_FLAGS} + ${QUIET}${HOST_CC} -o $@ ${HOST_SOURCES} ${HOST_FLAGS} bin/dpu_code: ${DPU_SOURCES} ${COMMON_INCLUDES} bin ${QUIET}dpu-upmem-dpurte-clang ${DPU_FLAGS} -o $@ ${DPU_SOURCES} |