ROM load progress bar
[picodrive.git] / platform / gp2x / code940 / Makefile
CommitLineData
42c7b147 1\r
2# you may or may not need to change this\r
3#devkit_path = x:/stuff/dev/devkitgp2x/\r
4devkit_path = /usr/local/devkitPro/devkitGP2X/\r
5lgcc_path = $(devkit_path)lib/gcc/arm-linux/4.0.3/\r
6CROSS = arm-linux-\r
7#CROSS = $(devkit_path)bin/arm-linux-\r
8\r
9# settings\r
10#up = 1\r
11\r
12DEFINC = -I../.. -I. -D__GP2X__ -DARM # -DBENCHMARK\r
4e8a534c 13COPT_COMMON = -static -s -O2 -ftracer -fstrength-reduce -Wall -fomit-frame-pointer -fstrict-aliasing -ffast-math\r
4f265db7 14COPT = $(COPT_COMMON) -mtune=arm940t\r
42c7b147 15GCC = $(CROSS)gcc\r
16STRIP = $(CROSS)strip\r
17AS = $(CROSS)as\r
18LD = $(CROSS)ld\r
19OBJCOPY = $(CROSS)objcopy\r
20\r
d524c827 21BIN = pico940.bin\r
22\r
23all: $(BIN)\r
42c7b147 24\r
42c7b147 25\r
26.c.o:\r
27 @echo $<\r
28 $(GCC) $(COPT) $(DEFINC) -c $< -o $@\r
29.s.o:\r
30 @echo $<\r
31 $(GCC) $(COPT) $(DEFINC) -c $< -o $@\r
32\r
33\r
34# stuff for 940 core\r
35\r
36# init, emu_control, emu\r
2433f409 37OBJS940 += 940init.o 940.o 940ym2612.o memcpy.o mix.o misc.o\r
42c7b147 38# the asm code seems to be faster when run on 920, but not on 940 for some reason\r
39# OBJS940 += ../../Pico/sound/ym2612_asm.o\r
40\r
41# uClibc library code\r
42OBJS940 += uClibc/memset.o uClibc/s_floor.o uClibc/e_pow.o uClibc/e_sqrt.o uClibc/s_fabs.o\r
43OBJS940 += uClibc/s_scalbn.o uClibc/s_copysign.o uClibc/k_sin.o uClibc/k_cos.o uClibc/s_sin.o\r
44OBJS940 += uClibc/e_rem_pio2.o uClibc/k_rem_pio2.o uClibc/e_log.o uClibc/wrappers.o\r
45\r
d524c827 46$(BIN) : code940.gpe\r
42c7b147 47 @echo $@\r
48 @$(OBJCOPY) -O binary $< $@\r
49\r
50code940.gpe : $(OBJS940) ../helix/helix_mp3.a\r
51 @echo $@\r
4f265db7 52 @$(LD) -static -e code940 -Ttext 0x0 $^ -L$(lgcc_path) -lgcc -o $@ -Map code940.map\r
42c7b147 53\r
54940ym2612.o : ../../../Pico/sound/ym2612.c\r
55 @echo $@\r
4e8a534c 56 @$(GCC) $(COPT) -Os $(DEFINC) -DEXTERNAL_YM2612 -c $< -o $@\r
4f265db7 57\r
58mix.o : ../../../Pico/sound/mix.s\r
59 @echo $@\r
60 @$(GCC) $(COPT) $(DEFINC) -DEXTERNAL_YM2612 -c $< -o $@\r
2433f409 61misc.o : ../../../Pico/misc.s\r
62 @echo $@\r
63 @$(GCC) $(COPT) $(DEFINC) -DEXTERNAL_YM2612 -c $< -o $@\r
42c7b147 64\r
65../helix/helix_mp3.a:\r
66 @make -C ../helix/\r
67\r
68\r
d524c827 69up: $(BIN)\r
70 @cp -v $< /mnt/gp2x/mnt/sd/emus/PicoDrive/\r
51a902ae 71\r
72\r
42c7b147 73# cleanup\r
74clean: tidy\r
75 @$(RM) code940.bin\r
76tidy:\r
4f265db7 77 @$(RM) code940.gpe $(OBJS940) code940.map\r
42c7b147 78\r
79\r
80OBJSMP3T = mp3test.o ../gp2x.o ../asmutils.o ../usbjoy.o\r
81\r
82mp3test.gpe : $(OBJSMP3T) ../helix/helix_mp3.a\r
83 $(GCC) -static -o $@ $^\r
84 $(STRIP) $@\r
85 @cp -v $@ /mnt/gp2x/mnt/sd\r
86\r
87cleanmp3test:\r
88 $(RM) $(OBJSMP3T) mp3test.gpe\r
89\r
90# uClibc/e_pow.o : uClibc/e_pow.c\r
91# @echo $<\r
92# @$(GCC) $(COPT) $(DEFINC) -fno-profile-generate -c $< -o $@\r
93\r
94# uClibc/e_sqrt.o : uClibc/e_sqrt.c\r
95# @echo $<\r
96# @$(GCC) $(COPT) $(DEFINC) -fno-profile-generate -c $< -o $@\r