-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
62 lines (44 loc) · 1.51 KB
/
Makefile
File metadata and controls
62 lines (44 loc) · 1.51 KB
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
###############################################################
# @file Makefile #
# @author Filip Kocica <xkocic01@stud.fit.vutbr.cz> #
# @date 01/03/2018 #
# #
# ICP project Makefile #
###############################################################
################## Build constants ##############
BIN_NAME = blockeditor
DOC =
README = README.txt
QMAKE = qmake
CC = g++
CFLAGS = -std=c++14
LDFLAGS =
LIBS =
DOXYGEN = doxygen
SRC = src
GUI = $(SRC)/gui
HEADERS = $(wildcard $(SRC)/*.hpp)
SOURCES = $(wildcard $(SRC)/*.cpp)
OBJS = $(patsubst %.cpp, %.o, $(SOURCES))
GUI_SOURCES = $(wildcard $(GUI)/*.cpp)
GUI_HEADERS = $(wildcard $(GUI)/*.hpp)
GUI_OBJS = $(patsubst %.cpp, %.o, $(GUI_SOURCES))
################## Compilation ##################
all: $(BIN_NAME)
$(BIN_NAME): $(HEADERS) $(SOURCES) $(OBJS) $(GUI_SOURCES) $(GUI_HEADERS)
@cd $(GUI) && $(QMAKE) && make
@mv $(shell pwd)/$(GUI)/$(BIN_NAME) .
%.o: %.cpp %.hpp
$(CC) $(CFLAGS) -c $< -o $@
################## Pack/Clean ##################
.PHONY: clean
doxygen:
$(DOXYGEN) $(SRC)/doxyConf
pack:
zip -r xkocic01-xvasic25.zip Makefile $(README) ./src/* ./doc/ ./examples/*
clean:
-@cd $(GUI) && make clean && rm -f moc_*
rm -f $(BIN_NAME) $(SRC)/*.o $(GUI)/*.o
rm -rf doc/*
run:
./$(BIN_NAME)