4 COPT = -IC:/cygwin/opt/cegcc/arm-wince-cegcc/include -I .
5 COPT += -mcpu=arm920 -mtune=arm920t -O3 -ffast-math -fexpensive-optimizations -finline -finline-functions -msoft-float -falign-functions=32 -falign-loops -falign-labels -falign-jumps -fomit-frame-pointer
12 # SNES stuff (c-based)
14 OBJS = 2xsaiwin.o apu.o c4.o c4emu.o cheats.o cheats2.o clip.o cpu.o cpuexec.o data.o
15 OBJS += dma.o dsp1.o fxemu.o fxinst.o gfx.o globals.o loadzip.o memmap.o ppu.o
16 OBJS += sdd1.o sdd1emu.o snapshot.o soundux.o spc700.o srtc.o tile.o
18 # ASM CPU Core, ripped from Yoyo's OpenSnes9X
20 OBJS += os9x_asm_cpu.o os9x_65c816.o spc700a.o
22 # and some asm from LJP...
24 OBJS += m3d_func.o misc.o
28 OBJS += giz_sdk.o menu.o input.o gp2x_menutile.o gp2x_highlightbar.o \
29 gp2x_menu_header.o unzip.o zip.o ioapi.o giz_kgsdkasm.o
32 # and the glue code that sticks it all together :)
36 # Inopia's menu system, hacked for the GP2X under rlyeh's sdk
37 PRELIBS = -LC:/cygwin/opt/cegcc/arm-wince-cegcc/lib -lz -lGizSdk $(LIBS)
40 clean: tidy $(APPNAME).exe
43 $(GCC) $(COPT) -c $< -o $@
46 $(GCC) $(COPT) -c $< -o $@
48 # make seems to lowercase the extensions, so files with '.S' end up being passed to the compiler as '.s', which means thousands of errors.
49 # this is a small workaround.
52 $(GCC) $(COPT) -c $< -o $@
54 os9x_65c816.o: os9x_65c816.s
55 $(GCC) $(COPT) -c $< -o $@
57 osnes9xgp_asmfunc.o: osnes9xgp_asmfunc.s
58 $(GCC) $(COPT) -c $< -o $@
60 m3d_func.o: m3d_func.S
61 $(GCC) $(COPT) -c $< -o $@
63 spc_decode.o: spc_decode.s
64 $(GCC) $(COPT) -c $< -o $@
67 $(GCC) $(COPT) -c $< -o $@
70 $(GCC) $(COPT) -c $< -o $@
73 $(GCC) $(COPT) -c $< -o $@
75 dspMixer.o: dspMixer.s
76 $(GCC) $(COPT) -c $< -o $@
78 giz_kgsdkasm.o: giz_kgsdkasm.s
79 $(GCC) $(COPT) -c $< -o $@
81 RenderASM/render8.o: RenderASM/render8.S
82 $(GCC) $(COPT) -c $< -o $@
84 $(APPNAME)d.exe: $(OBJS)
85 $(GCC) $(COPT) $(OBJS) -static $(PRELIBS) -o $@ -lstdc++ -lm
87 $(APPNAME).exe: $(APPNAME)d.exe
88 $(STRIP) $(APPNAME)d.exe -o $(APPNAME).exe