2 # you may or may not need to change this
\r
3 #devkit_path = x:/stuff/dev/devkitgp2x/
\r
4 devkit_path = /usr/local/devkitPro/devkitGP2X/
\r
5 lgcc_path = $(devkit_path)lib/gcc/arm-linux/4.0.3/
\r
7 #CROSS = $(devkit_path)bin/arm-linux-
\r
12 DEFINC = -I../.. -I. -D__GP2X__ -DARM # -DBENCHMARK
\r
13 COPT_COMMON = -static -s -O3 -ftracer -fstrength-reduce -Wall -funroll-loops -fomit-frame-pointer -fstrict-aliasing -ffast-math
\r
14 COPT = $(COPT_COMMON) -mtune=arm940t
\r
16 STRIP = $(CROSS)strip
\r
19 OBJCOPY = $(CROSS)objcopy
\r
26 $(GCC) $(COPT) $(DEFINC) -c $< -o $@
\r
29 $(GCC) $(COPT) $(DEFINC) -c $< -o $@
\r
32 # stuff for 940 core
\r
34 # init, emu_control, emu
\r
35 OBJS940 += 940init.o 940.o 940ym2612.o memcpy.o mix.o
\r
36 # the asm code seems to be faster when run on 920, but not on 940 for some reason
\r
37 # OBJS940 += ../../Pico/sound/ym2612_asm.o
\r
39 # uClibc library code
\r
40 OBJS940 += uClibc/memset.o uClibc/s_floor.o uClibc/e_pow.o uClibc/e_sqrt.o uClibc/s_fabs.o
\r
41 OBJS940 += uClibc/s_scalbn.o uClibc/s_copysign.o uClibc/k_sin.o uClibc/k_cos.o uClibc/s_sin.o
\r
42 OBJS940 += uClibc/e_rem_pio2.o uClibc/k_rem_pio2.o uClibc/e_log.o uClibc/wrappers.o
\r
44 code940.bin : code940.gpe
\r
46 @$(OBJCOPY) -O binary $< $@
\r
48 code940.gpe : $(OBJS940) ../helix/helix_mp3.a
\r
50 @$(LD) -static -e code940 -Ttext 0x0 $^ -L$(lgcc_path) -lgcc -o $@ -Map code940.map
\r
52 940ym2612.o : ../../../Pico/sound/ym2612.c
\r
54 @$(GCC) $(COPT) $(DEFINC) -DEXTERNAL_YM2612 -c $< -o $@
\r
56 mix.o : ../../../Pico/sound/mix.s
\r
58 @$(GCC) $(COPT) $(DEFINC) -DEXTERNAL_YM2612 -c $< -o $@
\r
60 ../helix/helix_mp3.a:
\r
65 @cp -v code940.bin /mnt/gp2x/mnt/sd/games/PicoDrive/
\r
72 @$(RM) code940.gpe $(OBJS940) code940.map
\r
75 OBJSMP3T = mp3test.o ../gp2x.o ../asmutils.o ../usbjoy.o
\r
77 mp3test.gpe : $(OBJSMP3T) ../helix/helix_mp3.a
\r
78 $(GCC) -static -o $@ $^
\r
80 @cp -v $@ /mnt/gp2x/mnt/sd
\r
83 $(RM) $(OBJSMP3T) mp3test.gpe
\r
85 # uClibc/e_pow.o : uClibc/e_pow.c
\r
87 # @$(GCC) $(COPT) $(DEFINC) -fno-profile-generate -c $< -o $@
\r
89 # uClibc/e_sqrt.o : uClibc/e_sqrt.c
\r
91 # @$(GCC) $(COPT) $(DEFINC) -fno-profile-generate -c $< -o $@
\r