-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmakefile
27 lines (27 loc) · 810 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
objects= pda.o rngstream.o
global_flags= -g -W -Wall -Wextra -Werror -pedantic -fopenmp -lgomp # -pthread
CFLAGS:= $(CFLAGS) $(global_flags) -std=c99
CXXFLAGS:= $(CXXFLAGS) $(global_flags) -std=c++0x
LDFLAGS:= -lm -lprofiler -fopenmp
gepda.out: $(objects)
$(CXX) -o $@ $(objects) $(CXXFLAGS) $(LDFLAGS)
pda.o: rngstream.h omprng.h
rngstream.o: rngstream.h omprng.h
.PHONY: clean
clean:
rm *.out *.o
# ldflags: loader flags
# -v: verbose
# -O3: optimize level 3
# -g3: debug level 3
# -c: compile the source file into a object file only (no link)
# -lm: link library math
# -o: output
# -W: warning
# -Wall: warning all
# -Wextra: warning extra
# -Werror: warnings as errors
# -L: secondary directory of libraries
# -I: secondary directory of headers
# -pthread: posix thread
# -static: static link libraries