1.10 release
[libpicofe.git] / gp2x / Makefile
index 11e6749..7b41be9 100644 (file)
@@ -61,6 +61,8 @@ OBJS += ../../zlib/gzio.o ../../zlib/inffast.o ../../zlib/inflate.o ../../zlib/i
        ../../zlib/deflate.o ../../zlib/crc32.o ../../zlib/adler32.o ../../zlib/zutil.o ../../zlib/compress.o\r
 # unzip\r
 OBJS += ../../unzip/unzip.o\r
+# mp3\r
+OBJS += mp3.o\r
 # CPU cores\r
 ifeq "$(use_musashi)" "1"\r
 DEFINC += -DEMU_M68K\r
@@ -78,13 +80,14 @@ DEFINC += -D_USE_DRZ80
 OBJS += ../../cpu/DrZ80/drz80.o\r
 endif\r
 \r
+\r
 all: PicoDrive.gpe\r
 \r
-PicoDrive.gpe : $(OBJS)\r
+PicoDrive.gpe : $(OBJS) helix/helix_mp3.a\r
        @echo $@\r
-       @$(GCC) $(COPT) $(OBJS) $(PRELIBS) -lm -o $@\r
+       @$(GCC) -o $@ $(COPT) $^ -lm\r
        @$(STRIP) $@\r
-#      @$(GCC) $(COPT) $(OBJS) $(PRELIBS) -lm -o PicoDrive_.gpe\r
+#      @$(GCC) $(COPT) $(OBJS) -lm -o PicoDrive_.gpe\r
 #      @gpecomp PicoDrive_.gpe $@\r
 ifeq "$(up)" "1"\r
        @cmd //C copy $@ \\\\10.0.1.2\\gp2x\\mnt\\sd\\games\\PicoDrive\\\r
@@ -98,7 +101,7 @@ up:
 \r
 testrefr.gpe : test.o gp2x.o asmutils.o\r
        @echo $@\r
-       @$(GCC) $(COPT) $^ $(PRELIBS) -o $@\r
+       @$(GCC) $(COPT) $^ -o $@\r
        @$(STRIP) $@\r
 \r
 .c.o:\r
@@ -126,6 +129,10 @@ testrefr.gpe : test.o gp2x.o asmutils.o
        @echo building Cyclone...\r
        @make -C ../../cpu/Cyclone/proj -f Makefile.linux\r
 \r
+# build helix libs\r
+helix/helix_mp3.a:\r
+       make -C helix\r
+\r
 \r
 # cleanup\r
 clean: tidy\r
@@ -139,6 +146,20 @@ clean_prof:
        find ../.. -name '*.gcno' -delete\r
        find ../.. -name '*.gcda' -delete\r
 \r
+# ----------- release -----------\r
+ifneq ($(findstring rel,$(MAKECMDGOALS)),)\r
+ifeq ($(VER),)\r
+$(error need VER)\r
+endif\r
+endif\r
+\r
+rel: PicoDrive.gpe code940/code940.bin ../readme.txt config.txt\r
+       zip -9 -j ../../PicoDrive_$(VER).zip $^ mmuhack.o\r
+\r
+code940/code940.bin:\r
+       make -C code940/\r
+\r
+\r
 # test\r
 usbjoy.o : usbjoy.c\r
        @echo $<\r