-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
30 lines (22 loc) · 796 Bytes
/
Makefile
File metadata and controls
30 lines (22 loc) · 796 Bytes
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
CXX := g++
CXX_FLAGS := -std=c++0x
LINK_FLAGS := -lgdi32
CXXTEST_DIR := ./cxxtest
TESTDIR := ./tests
LIB_OBJECTS := AbstractSolver.o BfsSolver.o Coords.o DummyCellMatrix.o Pixel.o PixelCellMatrix.o
APP_OBJECTS := main.o Application.o MainWindow.o ScreenshotGrabber.o
all: app
app: $(APP_OBJECTS) $(LIB_OBJECTS)
$(CXX) $(CXX_FLAGS) $(APP_OBJECTS) $(LIB_OBJECTS) -o app.exe $(LINK_FLAGS)
test: runner.exe
runner.exe
runner.exe: runner.o $(LIB_OBJECTS)
$(CXX) $(CXX_FLAGS) runner.o $(LIB_OBJECTS) -o runner.exe
%.o: %.cpp
$(CXX) $(CXX_FLAGS) -c $< -o $@
runner.o: runner.cpp
$(CXX) $(CXX_FLAGS) -I $(TESTDIR)/include -c runner.cpp -o runner.o
runner.cpp: $(TESTDIR)/*.h
python $(CXXTEST_DIR)/cxxtestgen.py --error-printer -o runner.cpp $(TESTDIR)/*.h
clean:
del *.o *.exe runner.cpp