-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmakefile
More file actions
29 lines (23 loc) · 791 Bytes
/
makefile
File metadata and controls
29 lines (23 loc) · 791 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
28
29
##----------------------------------------------------------------------
## Makefile Variables
##----------------------------------------------------------------------
TARGET := GameOfLife
CXX := g++
CXXFLAGS := -std=c++11 -g -Wall -pedantic-errors
LDFLAGS := -pthread -lpthread -static-libstdc++
RM := rm -f
SRC := $(shell find . -name "*.cpp")
OBJS := $(patsubst %.cpp, %.o, $(SRC))
##----------------------------------------------------------------------
## Make Functions
##----------------------------------------------------------------------
all: $(TARGET)
$(TARGET): $(OBJS)
$(CXX) $(CXXFLAGS) $(LDFLAGS) -o $(TARGET) $(OBJS) $(LDLIBS)
depend: .depend
.depend: $(SRC)
rm -f ./.depend
$(CXX) $(CXXFLAGS) -MM $^>>./.depend;
clean:
$(RM) $(OBJS)
include .depend