-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
32 lines (23 loc) · 794 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
CC = g++
CFLAGS = -std=c++17 -O3 -g -Wall -Wextra -Wpedantic -Wstrict-aliasing
CFLAGS += -Wno-pointer-arith -Wno-newline-eof -Wno-unused-parameter -Wno-gnu-statement-expression
CFLAGS += -Wno-gnu-compound-literal-initializer -Wno-gnu-zero-variadic-macro-arguments
CFLAGS += -Iinclude
HEADER = $(wildcard include/*.h) $(wildcard include/**/*.h)
# LDFLAGS = -Llib/ -lglfw3 -lGL -lX11 -lXxf86vm -lXrandr -pthread -lXi -ldl
SRC = $(wildcard src/**/*.cpp) $(wildcard src/*.cpp)
OBJ = $(SRC:.cpp=.o)
LDFLAGS = -Llib/ -lglfw3 -lGL -lX11 -lXxf86vm -lXrandr -pthread -lXi -ldl
BIN = bin
.PHONY: all clean
all: dirs game
dirs:
mkdir -p ./$(BIN)
run: all
$(BIN)/emu
game: $(OBJ)
$(CC) -o $(BIN)/emu $^ $(LDFLAGS)
%.o: %.cpp $(HEADER)
$(CC) -o $@ -c $< $(CFLAGS)
clean:
rm -rf $(BIN) $(OBJ)