-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
53 lines (36 loc) · 1.57 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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
SHELL := /bin/bash
.PHONY: run del
errors = -Wall -Wextra -pedantic
mem = -fbounds-check -g
opt = -O2 # -fopenmp
flags = -Llib/
msg = lib/massages.h
files = $(wildcard src/*.cpp)
obj = $(files:src/%.cpp=.o/%.o)
compile_current = g++ $(errors) $(mem) $(opt) $(flags) -c $< -o $@
#main: .o/configuration.o .o/etalon_profile.o .o/custom_time.o .o/custom_math.o .o/session_info.o .o/raw_profile.o .o/frequency_response.o .o/int_profile.o .o/main.o
# g++ $(errors) $(mem) $(opt) $^ -I./lib -L./lib -o $@
main: $(msg) $(obj) #.o/raw_profile.o .o/int_profile.o .o/etalon_profile.o .o/frequency_response.o .o/configuration.o
g++ $(errors) $(mem) $(opt) $(flags) $^ -o $@
# Compile object files
.o/raw_profile.o: src/raw_profile.cpp lib/raw_profile.h $(msg) .o/session_info.o .o/configuration.o
$(compile_current)
echo $(obj)
.o/int_profile.o: src/int_profile.cpp lib/int_profile.h $(msg) .o/session_info.o .o/raw_profile.o .o/custom_math.o .o/configuration.o
$(compile_current)
.o/etalon_profile.o: src/etalon_profile.cpp lib/etalon_profile.h $(msg) .o/int_profile.o .o/custom_math.o .o/configuration.o
$(compile_current)
.o/frequency_response.o: src/frequency_response.cpp lib/frequency_response.h $(msg) .o/int_profile.o .o/raw_profile.o .o/custom_math.o .o/configuration.o
$(compile_current)
.o/session_info.o: src/session_info.cpp lib/session_info.h $(msg) .o/configuration.o .o/custom_time.o
$(compile_current)
.o/%.o: src/%.cpp lib/%.h $(msg)
$(compile_current)
.o/%.o: src/%.cpp $(msg)
$(compile_current)
# Some run commands
run: main
clear
time ./main
del:
rm .o/* main