-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
37 lines (22 loc) · 874 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
33
34
35
36
37
PACKAGES:=sdl glew gl ftgl
CFLAGS:=-std=c1x -fplan9-extensions `pkg-config --cflags $(PACKAGES)`
LDFLAGS:=-lm `pkg-config --libs $(PACKAGES)` -lz -lSDL_image
debug: CFLAGS+=-g -Wall -DDEBUG
debug: LDFLAGS+=-g -lstd
release: CFLAGS+=-O3 -flto -fwhole-program -Werror -Wall
release: LDFLAGS+=-flto
.PHONY: run gdb debug clean
debug: client server model_view
release: clean client server
client: actor.o player.o client.o utils.o world.o block.o network.o socket.o noise.o worldgfx.o model.o vmath.o gui.o ui.o
server: actor.o player.o server.o utils.o noise.o world.o block.o network.o socket.o worldgen.o model.o vmath.o
model_view: model_view.o model.o utils.o
*.o: Makefile *.h
clean:
rm -f *.o
run: debug
./client
gdb: debug
gdb ./client --eval-command="run"
data: $(HOME)/.minecraft/bin/minecraft.jar
unzip $(HOME)/.minecraft/bin/minecraft.jar -d data