-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile.win
45 lines (32 loc) · 1.1 KB
/
Makefile.win
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
# Compile all .cpp files found inside this folder and put the
# executables inside ./Windows_executables
CXX = g++
CXXFLAGS = -Wall -std=c++11 -static
IDIR = "C:\Program Files\boost_1_61_0"
LDIR = "C:\Program Files\boost_1_61_0\stage\lib\libboost_program_options-mgw63-mt-sd-1_61.a"
EDIR = Windows_executables
OBJS = factorial fibonacci limits prime quadratic_roots rand sizeof sort bsort nperfect
all: $(OBJS)
factorial: factorial.cpp
$(CXX) -I $(IDIR) factorial.cpp -o $(EDIR)/$@
fibonacci: fibonacci.cpp
$(CXX) fibonacci.cpp -o $(EDIR)/$@
limits: limits.cpp
$(CXX) $(CXXFLAGS) limits.cpp -o $(EDIR)/$@
prime: prime.cpp
$(CXX) prime.cpp -o $(EDIR)/$@
quadratic_roots: quadratic_roots.cpp
$(CXX) quadratic_roots.cpp -o $(EDIR)/$@
rand: rand.cpp
$(CXX) rand.cpp -o $(EDIR)/$@
sizeof: sizeof.cpp
$(CXX) $(CXXFLAGS) sizeof.cpp -o $(EDIR)/$@
sort: sort.cpp
$(CXX) $(CXXFLAGS) sort.cpp -o $(EDIR)/$@
bsort: bsort.cpp
$(CXX) -I $(IDIR) bsort.cpp -o $(EDIR)/$@ $(LDIR) $(CXXFLAGS)
nperfect: nperfect.cpp
$(CXX) $(CXXFLAGS) nperfect.cpp -o $(EDIR)/$@
clean:
del *.exe
del Windows_executables/*.exe