1 # you may or may not need to change this
\r
2 #devkit_path = x:/stuff/dev/devkitgp2x/
\r
3 devkit_path ?= $(HOME)/opt/devkitGP2X/
\r
4 lgcc_path = $(devkit_path)lib/gcc/arm-linux/4.0.3/
\r
6 #CROSS = $(devkit_path)bin/arm-linux-
\r
11 CFLAGS += -O2 -Wall -fomit-frame-pointer -fstrict-aliasing -ffast-math
\r
12 CFLAGS += -I../.. -I. -D__GP2X__ -DARM
\r
13 CFLAGS += -mcpu=arm940t -mtune=arm940t
\r
14 LDFLAGS = -static -s -e code940 -Ttext 0x0 -L$(lgcc_path) -lgcc
\r
17 STRIP = $(CROSS)strip
\r
20 OBJCOPY = $(CROSS)objcopy
\r
22 vpath %.c = ../../common
\r
24 BIN = pico940_v3.bin
\r
30 $(GCC) $(CFLAGS) -c $< -o $@
\r
33 $(GCC) $(CFLAGS) -c $< -o $@
\r
36 # stuff for 940 core
\r
38 # init, emu_control, emu
\r
39 OBJS940 += 940init.o 940.o 940ym2612.o memcpy.o misc_arm.o mp3.o
\r
40 # the asm code seems to be faster when run on 920, but not on 940 for some reason
\r
41 # OBJS940 += ../../Pico/sound/ym2612_asm.o
\r
43 # uClibc library code
\r
44 OBJS940 += uClibc/memset.o uClibc/s_floor.o uClibc/e_pow.o uClibc/e_sqrt.o uClibc/s_fabs.o
\r
45 OBJS940 += uClibc/s_scalbn.o uClibc/s_copysign.o uClibc/k_sin.o uClibc/k_cos.o uClibc/s_sin.o
\r
46 OBJS940 += uClibc/e_rem_pio2.o uClibc/k_rem_pio2.o uClibc/e_log.o uClibc/wrappers.o
\r
48 $(BIN) : code940.elf
\r
50 $(OBJCOPY) -O binary $< $@
\r
52 code940.elf : $(OBJS940) ../../common/helix/$(CROSS)helix-mp3.a
\r
54 $(LD) $^ $(LDFLAGS) -o $@ -Map code940.map
\r
56 940ym2612.o : ../../../pico/sound/ym2612.c
\r
58 $(GCC) $(CFLAGS) -Os -DEXTERNAL_YM2612 -c $< -o $@
\r
60 mix.o : ../../../pico/sound/mix.s
\r
62 $(GCC) $(CFLAGS) -DEXTERNAL_YM2612 -c $< -o $@
\r
63 misc_arm.o : ../../../pico/misc_arm.s
\r
65 $(GCC) $(CFLAGS) -DEXTERNAL_YM2612 -c $< -o $@
\r
67 ../../common/helix/helix_mp3.a:
\r
68 @make -C ../../common/helix/
\r
72 @cp -v $< /mnt/gp2x/mnt/sd/emus/PicoDrive/
\r
79 $(RM) code940.elf $(OBJS940) code940.map
\r
83 OBJSMP3T = mp3test.o ../gp2x.o ../asmutils.o ../usbjoy.o
\r
85 mp3test.gpe : $(OBJSMP3T) ../helix/helix_mp3.a
\r
86 $(GCC) -static -o $@ $^
\r
88 @cp -v $@ /mnt/gp2x/mnt/sd
\r
91 $(RM) $(OBJSMP3T) mp3test.gpe
\r