-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
44 lines (29 loc) · 779 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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
C = gcc
CXX = g++
#CXXFLAGS = -g -Wall
CXXFLAGS = -O2 -Wall
INCLUDE =
TLIB =
#-----Suffix Rules---------------------------
# set up C++ suffixes and relationship between .cc and .o files
.SUFFIXES: .cpp .c
.c.o:
$(C) $(CXXFLAGS) $(INCLUDE) -c $<
.c :
$(C) $(CXXFLAGS) $(INCLUDE) $< -o $@ $(TLIB)
.cpp.o:
$(CXX) $(CXXFLAGS) $(INCLUDE) -c $<
.cpp :
$(CXX) $(CXXFLAGS) $(INCLUDE) $< -o $@ -lm $(TLIB) -lg++
#-----File Dependencies----------------------
GOAL = SC2Overmind
SRC = ga.cpp myrand.cpp main.cpp mt19937ar.cpp SCTools.cpp
OBJ = $(addsuffix .o, $(basename $(SRC)))
$(GOAL): $(OBJ)
$(CXX) $(CXXFLAGS) $(INCLUDE) $(TLIB) -o $@ $(OBJ)
#-----Other stuff----------------------------
depend:
makedepend $(SRC)
clean:
rm -f $(OBJ) $(GOAL)
# DO NOT DELETE