-../../Pico/Cart.o : ../../Pico/Cart.c\r
- @echo $<\r
- @$(GCC) $(COPT) $(DEFINC) -fno-profile-generate -c $< -o $@\r
-\r
-../../zlib/trees.o : ../../zlib/trees.c\r
- @echo $<\r
- @$(GCC) $(COPT) $(DEFINC) -fno-profile-generate -c $< -o $@\r
+# ----------- release -----------\r
+ifneq ($(findstring rel,$(MAKECMDGOALS)),)\r
+ifeq ($(VER),)\r
+$(error need VER)\r
+endif\r
+endif\r
+CODE940 = code940/pico940_v3.bin\r
+\r
+rel: PicoDrive PicoDrive.gpe $(CODE940) readme.txt PicoDrive.png ../game_def.cfg \\r
+ warm_2.4.25.o warm_2.4.26-open2x.o warm_2.6.24.ko\r
+ zip -9 -j ../../PicoDrive_$(VER).zip $^\r
+ zip -9 -r ../../PicoDrive_$(VER).zip skin -i \*.png -i \*.txt\r
+ mkdir bin_to_cso_mp3\r
+ cp ../../tools/bin_to_cso_mp3/* bin_to_cso_mp3/\r
+ zip -9 -r ../../PicoDrive_$(VER).zip bin_to_cso_mp3\r
+ rm -rf bin_to_cso_mp3\r
+\r
+$(CODE940):\r
+ make -C code940/\r