-
Notifications
You must be signed in to change notification settings - Fork 21
/
Makefile.wiz
45 lines (31 loc) · 1019 Bytes
/
Makefile.wiz
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
ifeq ($(TOOLCHAIN),)
OPEN2X = ./tools/toolchains/wiz/arm-openwiz-linux-gnu
else
OPEN2X = $(TOOLCHAIN)
endif
CC = $(OPEN2X)/bin/arm-openwiz-linux-gnu-gcc
LD = $(CC)
STRIP = $(OPEN2X)/bin/arm-openwiz-linux-gnu-strip
NAME=wizznic
TARGET= $(NAME)-wiz
DEFS = -DDATADIR="\"./\"" -DWIZ -DIS_LITTLE_ENDIAN -D_REENTRANT -DGP2X_ASM -D_BSD_SOURCE -D__USE_BSD
ifneq ($(BUILD_NUMBER),)
DEFS +=-DBUILD_NUMBER="\"$(BUILD_NUMBER)\""
endif
INCS = -I. -I$(OPEN2X)/include -I$(OPEN2X)/include/SDL
CFLAGS=-O3 -std=c99
LDFLAGS=$(CFLAGS) -L$(OPEN2X)/lib
LIBS = -Wl,-rpath,$(OPEN2X)/lib -lSDL -lSDL_image -lSDL_mixer -lm -lpthread
SOURCES = $(wildcard src/*.c) src/platform/wiz.c src/list/list.c
OBJS = $(SOURCES:.c=.o)
MYCC = $(CC) $(CFLAGS) $(INCS) $(DEFS)
########################################################################
sdl: $(TARGET)
all: $(TARGET)
$(TARGET): $(OBJS)
$(LD) $(LDFLAGS) $(OBJS) -o $@ $(LIBS)
$(STRIP) $@
.c.o:
$(MYCC) -c $< -o $@
clean:
rm -f $(NAME) src/*.o src/platform/*.o src/list/*.o