summaryrefslogtreecommitdiff
path: root/Makefile
blob: 70672a9f0c1f3838910b91e47bba74f09f6bf1a7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
CPPFLAGS = $(shell sdl2-config --cflags --libs)

run: game
	./game

game: World.o main.o
	$(CXX) -o $@ $(CPPFLAGS) $^

clean: 
	rm -f game
	rm -f *.o
	rm -f *.bc

browser-game:
	emcc --std=c++11 -O2 World.cpp -o World.bc
	emcc --std=c++11 -O2 main.cpp -o main.bc
	emcc -O2 World.bc main.bc -o out.html -s USE_SDL=2 --preload-file coin.bmp --preload-file earth01.bmp --preload-file fonts.bmp --preload-file gridder01.bmp --preload-file guy01.bmp --preload-file guy02.bmp --preload-file gridder02.bmp --preload-file gridder03.bmp -s TOTAL_MEMORY=536870912 --shell-file shell_minimal.html