potator/Makefile.gp2x

54 lines
1.5 KiB
Makefile
Raw Normal View History

2013-08-10 07:27:17 +00:00
# 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 \
2013-08-10 07:27:17 +00:00
${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
2013-08-10 07:27:17 +00:00
ASMOBJS = arm_stub.S
BIN = Potator2x
2013-08-10 07:27:17 +00:00
# Platform specific definitions
2013-08-10 07:27:17 +00:00
VPATH += common/
CFLAGS += -O3 -Wall
2013-08-10 07:27:17 +00:00
# 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
2013-08-10 07:27:17 +00:00
CXXFLAGS = ${CFLAGS} -fno-exceptions -fno-rtti
ASFLAGS = ${CFLAGS}
2013-08-10 07:27:17 +00:00
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 $<
2013-08-10 07:27:17 +00:00
all: ${OBJS}
${CC} *.o ${LIBS} -o ${BIN}.gpe
${STRIP} ${BIN}.gpe
gpecomp ${BIN}.gpe ${BIN}_comp.gpe
2013-08-10 07:27:17 +00:00
clean:
rm -f *.o ${BIN}.gpe ${BIN}_comp.gpe