2022-11-11 12:23:45 +00:00
|
|
|
INCPATHS = -I$(UTIL_DIR)
|
|
|
|
|
|
|
|
BENCHMARK = $(shell basename `pwd`)
|
|
|
|
EXE = $(BENCHMARK)_acc
|
|
|
|
SRC = $(BENCHMARK).c
|
|
|
|
HEADERS = $(BENCHMARK).h
|
|
|
|
|
|
|
|
SRC += $(UTIL_DIR)/polybench.c
|
|
|
|
|
|
|
|
DEPS := Makefile.dep
|
|
|
|
DEP_FLAG := -MM
|
|
|
|
|
|
|
|
CC=gcc
|
|
|
|
LD=ld
|
|
|
|
OBJDUMP=objdump
|
|
|
|
|
|
|
|
OPT=-O2 -g -fopenmp
|
|
|
|
CFLAGS=$(OPT) -I. $(EXT_CFLAGS)
|
|
|
|
LDFLAGS=-lm $(EXT_LDFLAGS)
|
|
|
|
|
|
|
|
.PHONY: all exe clean veryclean
|
|
|
|
|
|
|
|
all : exe
|
|
|
|
|
|
|
|
exe : $(EXE)
|
|
|
|
|
|
|
|
$(EXE) : $(SRC)
|
|
|
|
$(CC) $(CFLAGS) $(INCPATHS) $^ -o $@ $(LDFLAGS)
|
|
|
|
|
|
|
|
clean :
|
2022-11-16 16:06:16 +00:00
|
|
|
-rm -f $(EXE) *~
|
2022-11-11 12:23:45 +00:00
|
|
|
|
|
|
|
veryclean : clean
|
2022-11-16 16:06:16 +00:00
|
|
|
-rm -f $(DEPS)
|
2022-11-11 12:23:45 +00:00
|
|
|
|
|
|
|
run: $(EXE)
|
|
|
|
./$(EXE)
|
|
|
|
|
|
|
|
$(DEPS): $(SRC) $(HEADERS)
|
|
|
|
$(CC) $(INCPATHS) $(DEP_FLAG) $(SRC) > $(DEPS)
|
|
|
|
|
|
|
|
-include $(DEPS)
|