This repository has been archived by the owner on Feb 11, 2021. It is now read-only.
/
Makefile
40 lines (25 loc) · 1.04 KB
1
2
3
CFLAGS := -W -Wall -Wextra -g -I. `sdl-config --cflags`
4
LDFLAGS := `sdl-config --libs`
5
6
# If it doesn't pick up defaults
7
8
#CFLAGS := -I. -D_GNU_SOURCE=1 -D_REENTRANT -I/usr/local/include/SDL
#LDFLAGS := -lm -ldl -lesd -lpthread
9
10
COMMON_SRC := SDL_at.c common/common.c
11
12
COMMON_INCLUDE := SDL_at.h
13
TESTS_ALL := rwops/rwops platform/platform surface/surface render/render
14
15
16
.PHONY: all clean test
17
18
19
20
all: $(TESTS_ALL)
21
test: all
22
@./rwops/rwops
23
@./platform/platform
24
@./surface/surface
25
@./render/render
26
27
rwops/rwops: rwops/rwops.c $(COMMON_INCLUDE) $(COMMON_SRC)
28
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ rwops/rwops.c $(COMMON_SRC)
29
30
31
32
platform/platform: platform/platform.c $(COMMON_INCLUDE) $(COMMON_SRC)
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ platform/platform.c $(COMMON_SRC)
33
surface/surface: surface/surface.c $(COMMON_INCLUDE) $(COMMON_SRC)
34
35
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ surface/surface.c $(COMMON_SRC)
36
render/render: render/render.c $(COMMON_INCLUDE) $(COMMON_SRC)
37
38
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ render/render.c $(COMMON_SRC)
39
40
clean:
$(RM) $(TESTS_ALL)