-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
46 lines (40 loc) · 1.4 KB
/
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
38
39
40
41
42
43
44
45
46
NAME := floodit
TARGET := $(NAME)
TARGETDIST := $(NAME).opk
DISTFILES := $(TARGET) ClearSans-Medium.ttf LICENCE.md README.md resources
OBJS := *.c
OPTS := -g -O2 -Wall -Wextra -Wmissing-declarations \
-Wcast-qual -Wconversion -Wsign-conversion \
-Wdisabled-optimization \
-Werror -Wfloat-equal -Wformat=2 \
-Wformat-nonliteral -Wformat-security \
-Wformat-y2k \
-Wimport -Winit-self -Winline \
-Winvalid-pch \
-Wlong-long \
-Wmissing-field-initializers -Wmissing-format-attribute \
-Wmissing-noreturn \
-Wpacked -Wpointer-arith \
-Wredundant-decls \
-Wshadow -Wstack-protector \
-Wstrict-aliasing=2 -Wswitch-default \
-Wswitch-enum \
-Wunreachable-code -Wunused \
-Wunused-parameter \
-Wvariadic-macros \
-Wwrite-strings \
LIB := -lSDL2 -lSDL2_ttf -lSDL2_net -lSDL2_image
CC := $(CROSS_COMPILE)gcc
SDL2CONF = $(shell which sdl2-config)
CFLAGS += $(shell $(SDL2CONF) --cflags)
LDFLAGS += $(shell $(SDL2CONF) --libs)
$(TARGET): $(OBJS)
$(CC) $(OPTS) $(CFLAGS) $^ -o $(NAME) $(LIB)
gcw: $(OBJS)
$(CC) $(OPTS) $(CFLAGS) -DGCW $^ -o $(NAME) $(LIB)
opk:
cp -r $(DISTFILES) dist/
mksquashfs dist $(TARGETDIST) -all-root -noappend -no-exports -no-xattrs
clean:
rm -f $(TARGET) $(TARGETDIST)
rm -rf dist/$(TARGET) dist/ClearSans-Medium.ttf dist/resources