2007-11-14 12:06:48 +00:00
|
|
|
CC=gcc
|
|
|
|
CPPC=g++
|
2007-11-14 18:32:12 +00:00
|
|
|
CFLAGS=-W -Wall -Wno-unused -DHAVE_NETINET_IN_H -DHAVE_ARPA_INET_H -DFINAL_VERSION -DC_CORE -DSDL -DSYSCONFDIR="home"
|
2007-11-14 12:06:48 +00:00
|
|
|
CXXFLAGS=${CFLAGS}
|
|
|
|
ASM=nasm
|
|
|
|
ASMFLAGS=-w-orphan-labels -f elf -DELF -O1 -Isrc/
|
2007-11-19 19:58:21 +00:00
|
|
|
LFLAGS=-lz -lpng `sdl-config --libs`
|
|
|
|
STRIP=strip -s
|
2007-11-19 23:09:00 +00:00
|
|
|
DEL=rm -f
|
|
|
|
OE=.o
|
|
|
|
OUT=vba
|
|
|
|
|
|
|
|
ifeq ($(PLATFORM),win)
|
|
|
|
ASMFLAGS=-w-orphan-labels -f win32 -O1 -Isrc/
|
|
|
|
LFLAGS=-lz -lpng -lSDL -lwsock32
|
|
|
|
DELETECOMMAND = del
|
|
|
|
OE=.obj
|
|
|
|
OUT=vba.exe
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(PLATFORM),win-cross)
|
|
|
|
CC=i586-mingw32-gcc
|
|
|
|
CPPC=i586-mingw32-g++
|
|
|
|
ASMFLAGS=-w-orphan-labels -f win32 -O1 -Isrc/
|
|
|
|
LFLAGS=-lz -lpng -lSDL -lwsock32
|
|
|
|
STRIP=i586-mingw32-strip -s
|
|
|
|
OE=.obj
|
|
|
|
OUT=vba.exe
|
|
|
|
endif
|
|
|
|
|
2007-11-14 12:06:48 +00:00
|
|
|
|
|
|
|
MAINDIR=src
|
|
|
|
SDLDIR=src/sdl
|
|
|
|
DMGDIR=src/gb
|
2007-11-19 23:09:00 +00:00
|
|
|
RESAMPLEDIR=src/libresample-0.1.3/src
|
2007-11-14 12:06:48 +00:00
|
|
|
|
2007-11-20 13:04:31 +00:00
|
|
|
|
|
|
|
ASMOBJ=${MAINDIR}/hq3x_16${OE} ${MAINDIR}/hq3x_32${OE} ${MAINDIR}/hq4x_16${OE} ${MAINDIR}/hq4x_32${OE} \
|
|
|
|
${MAINDIR}/hq3x32${OE}
|
|
|
|
|
|
|
|
CALTERNOBJ=${MAINDIR}/hq3x16c${OE} ${MAINDIR}/hq3x32c${OE} ${MAINDIR}/hq4x16c${OE} ${MAINDIR}/hq4x32c${OE} \
|
|
|
|
${MAINDIR}/hq_shared32${OE}
|
2007-11-15 00:22:35 +00:00
|
|
|
|
2007-11-19 23:09:00 +00:00
|
|
|
MAINOBJ=${MAINDIR}/2xSaI${OE} ${MAINDIR}/admame${OE} ${MAINDIR}/agbprint${OE} ${MAINDIR}/armdis${OE} \
|
|
|
|
${MAINDIR}/bilinear${OE} ${MAINDIR}/bios${OE} ${MAINDIR}/Cheats${OE} ${MAINDIR}/CheatSearch${OE} \
|
|
|
|
${MAINDIR}/EEprom${OE} ${MAINDIR}/elf${OE} ${MAINDIR}/Flash${OE} ${MAINDIR}/GBA${OE} \
|
|
|
|
${MAINDIR}/gbafilter${OE} ${MAINDIR}/Gfx${OE} ${MAINDIR}/Globals${OE} ${MAINDIR}/interframe${OE} \
|
2007-11-20 13:04:31 +00:00
|
|
|
${MAINDIR}/hq2x${OE} ${MAINDIR}/Mode0${OE} \
|
2007-11-19 23:09:00 +00:00
|
|
|
${MAINDIR}/Mode1${OE} ${MAINDIR}/Mode2${OE} ${MAINDIR}/Mode3${OE} ${MAINDIR}/Mode4${OE} \
|
|
|
|
${MAINDIR}/Mode5${OE} ${MAINDIR}/motionblur${OE} ${MAINDIR}/pixel${OE} ${MAINDIR}/portable${OE} \
|
|
|
|
${MAINDIR}/remote${OE} ${MAINDIR}/RTC${OE} ${MAINDIR}/scanline${OE} ${MAINDIR}/simpleFilter${OE} \
|
|
|
|
${MAINDIR}/snd_interp${OE} ${MAINDIR}/Sound${OE} ${MAINDIR}/Sram${OE} ${MAINDIR}/Text${OE} \
|
|
|
|
${MAINDIR}/unzip${OE} ${MAINDIR}/Util${OE} ${MAINDIR}/exprNode${OE} ${MAINDIR}/getopt${OE} \
|
|
|
|
${MAINDIR}/getopt1${OE} ${MAINDIR}/memgzio${OE} ${MAINDIR}/expr-lex${OE} ${MAINDIR}/expr${OE}
|
2007-11-14 12:06:48 +00:00
|
|
|
|
2007-11-19 23:09:00 +00:00
|
|
|
DMGOBJ=${DMGDIR}/GB${OE} ${DMGDIR}/gbCheats${OE} ${DMGDIR}/gbDis${OE} ${DMGDIR}/gbGfx${OE} \
|
|
|
|
${DMGDIR}/gbGlobals${OE} ${DMGDIR}/gbMemory${OE} ${DMGDIR}/gbPrinter${OE} ${DMGDIR}/gbSGB${OE} \
|
|
|
|
${DMGDIR}/gbSound${OE}
|
2007-11-14 12:06:48 +00:00
|
|
|
|
2007-11-19 23:09:00 +00:00
|
|
|
SDLOBJ=${SDLDIR}/debugger${OE} ${SDLDIR}/SDL${OE} ${SDLDIR}/dummy${OE}
|
2007-11-14 12:06:48 +00:00
|
|
|
|
2007-11-20 13:04:31 +00:00
|
|
|
OBJECTS=${MAINOBJ} ${DMGOBJ} ${SDLOBJ} ${CALTERNOBJ}
|
2007-11-19 23:09:00 +00:00
|
|
|
LIB=${RESAMPLEDIR}/filterkit${OE} ${RESAMPLEDIR}/resample${OE} ${RESAMPLEDIR}/resamplesubs${OE}
|
2007-11-14 12:06:48 +00:00
|
|
|
|
2007-11-19 21:04:57 +00:00
|
|
|
.SUFFIXES: .c .cpp .asm
|
2007-11-14 12:06:48 +00:00
|
|
|
|
2007-11-19 23:09:00 +00:00
|
|
|
%${OE}: %.c
|
2007-11-14 12:06:48 +00:00
|
|
|
${CC} ${CFLAGS} -o $@ -c $<
|
|
|
|
|
2007-11-19 23:09:00 +00:00
|
|
|
%${OE}: %.cpp
|
2007-11-14 12:06:48 +00:00
|
|
|
${CPPC} ${CXXFLAGS} -o $@ -c $<
|
|
|
|
|
2007-11-19 23:09:00 +00:00
|
|
|
%${OE}: %.asm
|
2007-11-14 12:06:48 +00:00
|
|
|
${ASM} ${ASMFLAGS} -o $@ $<
|
|
|
|
|
2007-11-19 23:09:00 +00:00
|
|
|
ALL: ${OUT}
|
2007-11-14 12:06:48 +00:00
|
|
|
|
2007-11-19 23:09:00 +00:00
|
|
|
${OUT}: ${OBJECTS} ${LIB}
|
2007-11-14 12:06:48 +00:00
|
|
|
$(CPPC) -o $@ ${OBJECTS} ${LIB} ${LFLAGS}
|
2007-11-19 19:58:21 +00:00
|
|
|
$(STRIP) $@
|
2007-11-14 12:06:48 +00:00
|
|
|
|
|
|
|
clean:
|
2007-11-20 00:06:18 +00:00
|
|
|
$(DEL) ${OUT} ${OBJECTS} ${LIB}
|