-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
27 lines (19 loc) · 733 Bytes
/
Copy pathMakefile
File metadata and controls
27 lines (19 loc) · 733 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
# set non-optional compiler flags here
CXXFLAGS += -march=native -std=c++11 -Wall -Wextra -pedantic-errors
# set non-optional preprocessor flags here
# eg. project specific include directories
CPPFLAGS += -I ./include -lpthread
# find cpp files in subdirectories
SOURCES := $(shell find . -name '*.cpp')
# find headers
HEADERS := $(shell find . -name '*.h')
OUTPUT := aes-brute-force
# Everything depends on the output
all: $(OUTPUT)
test: $(SOURCES) $(HEADERS)
$(CXX) -g -pg -fno-omit-frame-pointer $(CXXFLAGS) $(CPPFLAGS) -o $(OUTPUT)-test $(SOURCES)
# The output depends on sources and headers
$(OUTPUT): $(SOURCES) $(HEADERS)
$(CXX) -Ofast $(CXXFLAGS) $(CPPFLAGS) -o $(OUTPUT)-fast $(SOURCES)
clean:
$(RM) $(OUTPUT)-*