forked from AlNigmat/PhotoLab-for-macOS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
42 lines (30 loc) · 798 Bytes
/
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
GXX=g++
BD=build
CXX_FLAGS=-c -Wall -Werror -Wextra -std=c++17
GTESTFLAGS=-lgtest
ifeq ($(shell uname -s), Linux)
GTESTFLAGS+= -lpthread -lrt
endif
MODEL_SOURCES= test.cpp Photo.cpp Filter.cpp SimpleFilter.cpp Sliders.cpp controller.cpp
MODEL_OBJECTS=$(addprefix $(BD)/,$(MODEL_SOURCES:.cpp=.o))
./$(BD)/%.o:%.cpp
$(GXX) $(CXX_FLAGS) $< -o $@
./$(BD)/%.o: */%.cpp
$(GXX) $(CXX_FLAGS) $< -o $@
./$(BD)/%.o: */*/%.cpp
$(GXX) $(CXX_FLAGS) $< -o $@
./$(BD)/%.o: */*/*/%.cpp
$(GXX) $(CXX_FLAGS) $< -o $@
all: test clean
install: clean build
build:
mkdir build
cd $(BD) && qmake ../PhotoLab/PhotoLab.pro && make
cd $(BD) && open PhotoLab.app
uninstall:
rm -rf $(BD)
test: clean $(MODEL_OBJECTS)
$(GXX) $(MODEL_OBJECTS) -o $(BD)/$@ $(GTESTFLAGS)
./$(BD)/$@
clean:
rm -rf $(BD)/*