-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
36 lines (25 loc) · 1.12 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
EXE = pa3
OBJS_EXE = RGBAPixel.o lodepng.o PNG.o main.o twoDtree.o stats.o
CXX = clang++
CXXFLAGS = -std=c++1y -stdlib=libc++ -c -g -O0 -Wall -Wextra -pedantic
LD = clang++
#LDFLAGS = -std=c++1y -stdlib=libc++ -lc++abi -lpthread -lm
LDFLAGS = -std=c++1y -stdlib=libc++ -lpthread -lm
all : pa3
$(EXE) : $(OBJS_EXE)
$(LD) $(OBJS_EXE) $(LDFLAGS) -o $(EXE)
#object files
RGBAPixel.o : cs221util/RGBAPixel.cpp cs221util/RGBAPixel.h
$(CXX) $(CXXFLAGS) cs221util/RGBAPixel.cpp -o $@
PNG.o : cs221util/PNG.cpp cs221util/PNG.h cs221util/RGBAPixel.h cs221util/lodepng/lodepng.h
$(CXX) $(CXXFLAGS) cs221util/PNG.cpp -o $@
lodepng.o : cs221util/lodepng/lodepng.cpp cs221util/lodepng/lodepng.h
$(CXX) $(CXXFLAGS) cs221util/lodepng/lodepng.cpp -o $@
stats.o : stats.h stats.cpp cs221util/RGBAPixel.h cs221util/PNG.h
$(CXX) $(CXXFLAGS) stats.cpp -o $@
twoDtree.o : twoDtree.h twoDtree.cpp stats.h cs221util/PNG.h cs221util/RGBAPixel.h
$(CXX) $(CXXFLAGS) twoDtree.cpp -o $@
main.o : main.cpp cs221util/PNG.h cs221util/RGBAPixel.h twoDtree.h
$(CXX) $(CXXFLAGS) main.cpp -o main.o
clean :
-rm -f *.o $(EXE)