-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
82 lines (59 loc) · 2.6 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# Executable names:
EXE = main
TEST = test
# Add all object files needed for compiling:
EXE_OBJ = main.o
OBJS = main.o read.o graph.o functions.o draw.o
# Generated files
#CLEAN_RM = unsolved.png solved.png testdsets testsquaremaze \
*.o *.d tests/*.o tests/*.d cs225/*.d cs225/*.o \
cs225/lodepng/*.o cs225/lodepng/*.d \
cs225/catch/*.o cs225/catch/*.d
# Use the cs225 makefile template:
include cs225/make/cs225.mk
# EXENAME = lab_intro
# OBJS = main.o PNG.o HSLAPixel.o lodepng.o lab_intro.o
# CXX = clang++
# CXXFLAGS = $(CS225) -std=c++1y -stdlib=libc++ -c -g -O0 -Wall -Wextra -pedantic
# LD = clang++
# LDFLAGS = -std=c++1y -stdlib=libc++ -lc++abi -lm
# # Custom Clang version enforcement logic:
# ccred=$(shell echo -e "\033[0;31m")
# ccyellow=$(shell echo -e "\033[0;33m")
# ccend=$(shell echo -e "\033[0m")
# IS_EWS=$(shell hostname | grep "ews.illinois.edu")
# IS_CORRECT_CLANG=$(shell clang -v 2>&1 | grep "version 6")
# ifneq ($(strip $(IS_EWS)),)
# ifeq ($(strip $(IS_CORRECT_CLANG)),)
# CLANG_VERSION_MSG = $(error $(ccred) On EWS, please run 'module load llvm/6.0.1' first when running CS225 assignments. $(ccend))
# endif
# else
# ifneq ($(strip $(SKIP_EWS_CHECK)),True)
# CLANG_VERSION_MSG = $(warning $(ccyellow) Looks like you are not on EWS. Be sure to test on EWS before the deadline. $(ccend))
# endif
# endif
# .PHONY: all test clean output_msg
# all : $(EXENAME)
# output_msg: ; $(CLANG_VERSION_MSG)
# $(EXENAME) : output_msg $(OBJS)
# $(LD) $(OBJS) $(LDFLAGS) -o $(EXENAME)
# main.o : main.cpp lab_intro.h cs225/PNG.h cs225/HSLAPixel.h
# $(CXX) $(CXXFLAGS) main.cpp
# lab_intro.o : lab_intro.cpp lab_intro.h
# $(CXX) $(CXXFLAGS) lab_intro.cpp
# PNG.o : cs225/PNG.cpp cs225/PNG.h cs225/HSLAPixel.h cs225/lodepng/lodepng.h
# $(CXX) $(CXXFLAGS) cs225/PNG.cpp
# HSLAPixel.o : cs225/HSLAPixel.cpp cs225/HSLAPixel.h
# $(CXX) $(CXXFLAGS) cs225/HSLAPixel.cpp
# lodepng.o : cs225/lodepng/lodepng.cpp cs225/lodepng/lodepng.h
# $(CXX) $(CXXFLAGS) cs225/lodepng/lodepng.cpp
# test: output_msg catchmain.o tests-part1.o tests-part2.o PNG.o HSLAPixel.o lodepng.o lab_intro.o
# $(LD) catchmain.o tests-part1.o tests-part2.o PNG.o HSLAPixel.o lodepng.o lab_intro.o $(LDFLAGS) -o test
# catchmain.o : cs225/catch/catchmain.cpp cs225/catch/catch.hpp
# $(CXX) $(CXXFLAGS) cs225/catch/catchmain.cpp
# tests-part1.o : tests/tests-part1.cpp cs225/catch/catch.hpp lab_intro.cpp lab_intro.h
# $(CXX) $(CXXFLAGS) tests/tests-part1.cpp
# tests-part2.o : tests/tests-part2.cpp cs225/catch/catch.hpp lab_intro.cpp lab_intro.h
# $(CXX) $(CXXFLAGS) tests/tests-part2.cpp
# clean :
# -rm -f *.o $(EXENAME) test