-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathMakefile
37 lines (24 loc) · 919 Bytes
/
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
33
34
35
CXX = g++
SOURCE_FILES = filterbank.cpp device.cpp opencl_error_handling.cpp
CFLAGS = -Wall -std=c++11 -DTIME
LIBS = -lrt -lOpenCL
INCLUDES = -Iinclude -Iinclude/catch2
SRC_DIR := src
BUILD_DIR := build
TEST_DIR := test
OBJS := $(SOURCE_FILES:.cpp=.o)
SRCS := $(addprefix $(SRC_DIR)/, $(SOURCE_FILES))
OBJS := $(addprefix $(BUILD_DIR)/, $(OBJS))
DAS := prun -np 1 -native '-C TitanX --gres=gpu:1'
#DAS := prun -np 1 -native '-C GTX980 --gres=gpu:1'
#DAS =
make: $(OBJS) $(SRCS)
$(CXX) $(CFLAGS) $(LIBS) $(INCLUDES) $(OBJS) $(SRC_DIR)/main.cpp -o fflagger
$(DAS) ./fflagger -i ~/real.fil -o ~/del.fil -m 3 --rfi_mode 2 --sir
test: $(OBJS) $(SRCS)
$(CXX) $(CFLAGS) $(LIBS) $(INCLUDES) $(OBJS) $(TEST_DIR)/tests.cpp -o $(BUILD_DIR)/tests
$(DAS) $(BUILD_DIR)/tests [PointEdgeThreshold]
$(BUILD_DIR)/%.o: $(SRC_DIR)/%.cpp
$(CXX) $(CFLAGS) $(LIBS) $(INCLUDES) -c $< -o $@
clean:
rm build/* fflagger