-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathMakefile
More file actions
executable file
·31 lines (22 loc) · 758 Bytes
/
Makefile
File metadata and controls
executable file
·31 lines (22 loc) · 758 Bytes
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
OUT = sprouts
SRC = ${wildcard *.cpp}
OBJ = ${SRC:.cpp=.o}
DEPENDS = .depends
CC = g++
CFLAGS := ${CFLAGS} -g -O2 -Wall -Wextra -Wno-sign-compare $(shell pkg-config sdl SDL_gfx SDL_image SDL_ttf --cflags) -std=c++98
LDFLAGS := $(shell pkg-config sdl SDL_gfx SDL_image SDL_ttf --libs)
all: ${OUT}
${OUT}: ${OBJ}
${CC} -o $@ ${OBJ} ${LDFLAGS}
.cpp.o:
${CC} -c -o $@ $< ${CFLAGS}
${DEPENDS}: ${SRC}
rm -f ./${DEPENDS}
${CC} ${CFLAGS} -MM $^ >> ./${DEPENDS}
depends: ${DEPENDS}
tests:
$(MAKE) -C tests
clean:
${RM} ${OUT} ${OBJ}
-include ${DEPENDS}
.PHONY: all depends clean tests