forked from SideChannelMarvels/Daredevil
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
34 lines (24 loc) · 693 Bytes
/
Makefile
File metadata and controls
34 lines (24 loc) · 693 Bytes
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
TARGET=daredevil
PREFIX=/usr/local
RESOURCES=$(PREFIX)/share/daredevil/
CC=clang++
CFLAGS=-Wall -Wextra -std=c++11 -O3 -DRESOURCES=\"$(RESOURCES)\"
LIBS=-fopenmp -lm
OBJECTS = $(patsubst %.cpp, %.o, $(wildcard *.cpp))
HEADERS = $(wildcard *.h)
TARGET_OBJECTS=$(filter-out $(TEST).o, $(OBJECTS))
.PHONY: default all clean check install uninstall
all: $(TARGET)
%.o: %.cpp $(HEADERS)
$(CC) $(CFLAGS) -c $< -o $@
$(TARGET): $(TARGET_OBJECTS)
$(CC) $(TARGET_OBJECTS) $(CFLAGS) -o $@ $(LIBS)
clean:
@-rm -f *.o daredevil
install:
@cp $(TARGET) $(PREFIX)/bin/
@mkdir -p $(RESOURCES)
@cp -a LUT $(RESOURCES)
uninstall:
@rm $(PREFIX)/bin/$(TARGET)
@rm -rf $(PREFIX)/share/daredevil