forked from ninnghazad/hipims-ocl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
33 lines (27 loc) · 1.19 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
ifeq (,$(wildcard /usr/local/bin/mpic++))
CPP = g++
MACROS := -D MPI_OFF -std=c++17 -O3 -march=native
else
CPP = /usr/local/bin/mpic++
MACROS := -D MPI_ON -std=c++17 -O3 -march=native
endif
CPP_FILES := $(wildcard src/*.cpp) $(wildcard src/*/*.cpp) $(wildcard src/*/*/*.cpp) $(wildcard src/*/*/*/*.cpp) $(wildcard src/*/*/*/*/*.cpp)
OBJ_FILES := $(patsubst %.cpp,%.o,$(CPP_FILES))
LD_FLAGS := -L/opt/AMDAPP/lib/x86_64/ -L/usr/local/browndeer/lib/
LD_LINKS := -rdynamic -lm -lboost_system -lboost_regex -lboost_filesystem -lOpenCL -lgdal -lncurses -lpthread -lrt -ltinfo
CC_FLAGS := -rdynamic -g -Wall -g3 -w -I/usr/local/cuda/include/ -I/usr/local/include/ -I/usr/include/gdal/ -I/opt/AMDAPP/include/ -I/usr/local/browndeer/include/ $(MACROS)
hipims: $(OBJ_FILES)
$(CPP) $(LD_FLAGS) -o bin/linux64/$@ $^ $(LD_LINKS)
%.o: %.cpp
$(CPP) $(CC_FLAGS) -c -o $@ $<
clean:
find . -name \*.o -execdir rm {} \;
rm -rf bin/linux64/*
release:
find . -name \*.cpp -execdir rm {} \;
find . -name \*.o -execdir rm {} \;
find . -name \*.h -execdir rm {} \;
find . -name \*.log -execdir rm {} \;
find . -name \*.vcx* -execdir rm {} \;
find . -name \*.rc -execdir rm {} \;
find . -name \*.aps -execdir rm {} \;