about summary refs log tree commit diff stats
path: root/Tupfile
blob: 5c0af0881eec021ac7cd663067587370ea9b4ad6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
CFLAGS += `pkg-config --cflags raylib` `pkg-config --cflags glfw3` `pkg-config --cflags glu`
CFLAGS += `pkg-config --cflags gl` `pkg-config --cflags sdl2` `pkg-config --cflags SDL2_mixer` `pkg-config --cflags bdw-gc`
CFLAGS += -Isrc/ -std=gnu99 -Wall -Werror
# Compile more debug stuff is debug is enabled.
ifeq (@(DEBUG),true)
	CFLAGS += -Og -g -ggdb
else
	CFLAGS += -O3
endif
LDFLAGS += `pkg-config --libs raylib` `pkg-config --libs glfw3` `pkg-config --libs glu`
LDFLAGS += `pkg-config --libs gl` `pkg-config --libs sdl2` `pkg-config --libs SDL2_mixer`
LDFLAGS += `pkg-config --libs bdw-gc`
: foreach src/*.c |> @(CC) $(CFLAGS) -c %f -o %o |> @(BUILD_DIR)/obj/%B.o
: @(BUILD_DIR)/obj/*.o |> @(CC) %f -o %o $(LDFLAGS) |> @(BUILD_DIR)/bin/Pong