forked from alekmaul/potator
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile.gp2x
53 lines (43 loc) · 1.46 KB
/
Makefile.gp2x
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
47
48
49
50
51
52
53
# Potator2x makefile
# Global definitions
CCPREFIX = arm-linux-
CC = ${CCPREFIX}gcc
CPP = ${CCPREFIX}g++
STRIP = ${CCPREFIX}strip
AS = ${CCPREFIX}as
PLATFORM =./platform/GP2X
PREFIX = /c/devkitPro/devkitGP2X/
OBJS = controls.o gpu.o \
memorymap.o sound.o \
timer.o watara.o m6502/m6502.o \
${PLATFORM}/main.o ${PLATFORM}/menues.o \
${PLATFORM}/memcmp.o ${PLATFORM}/memcpy.o \
${PLATFORM}/memset.o ${PLATFORM}/strcmp.o \
${PLATFORM}/strlen.o ${PLATFORM}/strncmp.o \
${PLATFORM}/lib/minimal.o
ASMOBJS = arm_stub.S
BIN = Potator2x
# Platform specific definitions
VPATH += common/
CFLAGS += -O3 -Wall
# NOTE: -funroll-loops will slow down compiling considerably
CFLAGS += -funroll-loops -fstrength-reduce -fstrict-aliasing -fexpensive-optimizations -falign-functions -fweb -frename-registers -fomit-frame-pointer -ffast-math -fno-builtin -fno-common -finline -finline-functions
#CFLAGS += -fsigned-char
CXXFLAGS = ${CFLAGS} -fno-exceptions -fno-rtti
ASFLAGS = ${CFLAGS}
INCLUDES = -I${PLATFORM} -I${PLATFORM}/lib -I./common -I${PREFIX}/include
LIBS = -L${PREFIX}/lib -static -lpthread -lm
# Compilation:
.SUFFIXES: .c
%.o: %.c
${CC} ${CFLAGS} ${INCLUDES} -c $<
%.o: %.cpp
$(CPP) $(CXXFLAGS) ${INCLUDES} -c $<
%.o: %.S
$(CC) ${CFLAGS} -s -c $<
all: ${OBJS}
${CC} *.o ${LIBS} -o ${BIN}.gpe
${STRIP} ${BIN}.gpe
gpecomp ${BIN}.gpe ${BIN}_comp.gpe
clean:
rm -f *.o ${BIN}.gpe ${BIN}_comp.gpe