-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMakefile
More file actions
38 lines (26 loc) · 688 Bytes
/
Makefile
File metadata and controls
38 lines (26 loc) · 688 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
31
32
33
34
35
36
37
38
EXEC_FILE = launcher
CXX = g++
SRC_DIR = ./engine
BUILD_DIR = ./build
SRCS := $(shell find $(SRC_DIR) -name *.cpp)
OBJS := $(SRCS:%=$(BUILD_DIR)/%.o)
CPPINCS = -I"deps/" -I"deps/lua/include" -I"deps/box2d/include"
CPPLIBS = -L"deps/lua/lib" -L"deps/box2d/lib" -llua -ldl -lpthread -lsfml-system -lsfml-window \
-lsfml-graphics -lsfml-audio -lX11 -lbox2d
default:
-mkdir $(BUILD_DIR)
make $(EXEC_FILE)
$(EXEC_FILE): $(OBJS)
$(CXX) $(OBJS) -o $@ $(CPPLIBS)
$(BUILD_DIR)/%.cpp.o: %.cpp
-mkdir -p $(dir $@)
$(CXX) -c $< -o $@ $(CPPINCS)
.PHONY: clean
clean:
-rm $(EXEC_FILE) $(OBJS)
.PHONY: run
run:
./$(EXEC_FILE)
.PHONY: lc
lc:
git ls-files | grep src | xargs wc -l