-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
54 lines (33 loc) · 1.03 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
CXXFLAGS= -Wall -Wextra -pedantic -std=c++11 -g
LIBS= -L./lib -lrubik
INCLUDE= ./include
BIN=./bin
DIR_LIBS=./lib
SRC=./src
OBJ=./obj
all: Rubik searchBugs
Rubik: $(OBJ)/Rubik.o $(DIR_LIBS)/librubik.a
g++ -o $(BIN)/Rubik $< $(LIBS)
searchBugs: $(OBJ)/searchBugs.o $(DIR_LIBS)/librubik.a
g++ -o $(BIN)/searchBugs $< $(LIBS)
$(OBJ)/Rubik.o: $(SRC)/Rubik.cpp
g++ -c -I$(INCLUDE) $(CXXFLAGS) -o $@ $<
$(OBJ)/searchBugs.o: $(SRC)/searchBugs.cpp
g++ -c -I$(INCLUDE) $(CXXFLAGS) -o $@ $<
$(OBJ)/defineRubik.o: $(SRC)/defineRubik.cpp $(INCLUDE)/defineRubik.h
g++ -c -I$(INCLUDE) $(CXXFLAGS) -o $@ $<
################################################
$(DIR_LIBS)/librubik.a: $(OBJ)/defineRubik.o
$(AR) rvs $@ $^
################################################
documentation:
doxygen doc/doxys/Doxyfile
test:
./bin/Rubik ./data/example.dat
clean:
@ echo "Cleaning..."
rm -f $(OBJ)/*.o $(DIR_LIBS)/lib*.a ./doc/html/*
find . -regex ".*~" -exec rm -r {} \; # Auxiliary files
mrproper: clean
rm -f $(BIN)/*
.PHONY: clean mrproper all