-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmakefile
More file actions
43 lines (31 loc) · 687 Bytes
/
makefile
File metadata and controls
43 lines (31 loc) · 687 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
39
40
41
42
43
CXX = g++
CXXFLAGS = -std=c++17 -Wall -Wextra -O2
SRC = $(shell find . -name "*.cpp" \
-not -path "./.emsdk/*" \
-not -path "./glfw/*" \
-not -path "./dist/*" \
-not -path "./dist_web/*")
UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S),Darwin)
RUN_TARGET = ./dist/game
else
RUN_TARGET = ./dist/game.exe
endif
BUILD_TARGET = $(RUN_TARGET)
LDFLAGS = -lglfw -lGL -lGLU -ldl -lpthread
all: $(BUILD_TARGET)
clean:
bash init.sh
$(BUILD_TARGET): $(SRC)
ifeq ($(UNAME_S),Darwin)
bash build_macos.sh
else
bash build.sh
endif
run: $(BUILD_TARGET)
$(RUN_TARGET)
web:
bash build_web.sh
web-run:
python3 -m http.server 8080 --directory dist_web
.PHONY: all clean run web web-run