32 lines
557 B
Text
32 lines
557 B
Text
|
CC = x86_64-w64-mingw32-gcc
|
||
|
CPP = x86_64-w64-mingw32-g++
|
||
|
STRIP = x86_64-w64-mingw32-strip
|
||
|
CFLAGS = -O2 -g -Wstrict-aliasing -Iinclude
|
||
|
LDFLAGS = -static -lglfw3 -lopengl32 -lgdi32 -luser32 -lkernel32 -lssp -lnoise
|
||
|
|
||
|
OBJ = out/glad.o out/stb_image.o out/world.o out/main.o
|
||
|
BIN = voksel.exe
|
||
|
|
||
|
.PHONY: all clean
|
||
|
|
||
|
all: dirs $(BIN)
|
||
|
|
||
|
dirs:
|
||
|
mkdir -p out
|
||
|
|
||
|
run: all
|
||
|
./$(BIN)
|
||
|
|
||
|
$(BIN): $(OBJ)
|
||
|
$(CPP) -o $(BIN) $^ $(LDFLAGS)
|
||
|
$(STRIP) $(BIN)
|
||
|
|
||
|
out/%.o: src/%.c
|
||
|
$(CC) -o $@ -c $< $(CFLAGS)
|
||
|
|
||
|
out/%.o: src/%.cpp
|
||
|
$(CPP) -o $@ -c $< $(CFLAGS)
|
||
|
|
||
|
clean:
|
||
|
rm -rf $(BIN) $(OBJ)
|