clean up switching between dynarec and interpreter
[pcsx_rearmed.git] / Makefile
... / ...
CommitLineData
1# Makefile for PCSX ReARMed
2
3# default stuff goes here, so that config can override
4TARGET ?= pcsx
5CFLAGS += -Wall -Iinclude -ffast-math
6ifeq ($(DEBUG), 1)
7CFLAGS += -O0 -ggdb
8else
9ifeq ($(platform), $(filter $(platform), vita ctr))
10CFLAGS += -O3 -DNDEBUG
11else
12CFLAGS += -O2 -DNDEBUG
13endif
14endif
15CXXFLAGS += $(CFLAGS)
16#DRC_DBG = 1
17#PCNT = 1
18
19# Suppress minor warnings for dependencies
20deps/%: CFLAGS += -Wno-unused -Wno-unused-function
21
22all: config.mak target_ plugins_
23
24ifndef NO_CONFIG_MAK
25ifneq ($(wildcard config.mak),)
26config.mak: ./configure
27 @echo $@ is out-of-date, running configure
28 @sed -n "/.*Configured with/s/[^:]*: //p" $@ | sh
29include config.mak
30else
31config.mak:
32 @echo "Please run ./configure before running make!"
33 @exit 1
34endif
35else # NO_CONFIG_MAK
36config.mak:
37endif
38
39-include Makefile.local
40
41CC_LINK ?= $(CC)
42CC_AS ?= $(CC)
43LDFLAGS += $(MAIN_LDFLAGS)
44EXTRA_LDFLAGS ?= -Wl,-Map=$@.map
45LDLIBS += $(MAIN_LDLIBS)
46ifdef PCNT
47CFLAGS += -DPCNT
48endif
49
50# core
51OBJS += libpcsxcore/cdriso.o libpcsxcore/cdrom.o libpcsxcore/cheat.o libpcsxcore/database.o \
52 libpcsxcore/decode_xa.o libpcsxcore/mdec.o \
53 libpcsxcore/misc.o libpcsxcore/plugins.o libpcsxcore/ppf.o libpcsxcore/psxbios.o \
54 libpcsxcore/psxcommon.o libpcsxcore/psxcounters.o libpcsxcore/psxdma.o libpcsxcore/psxhle.o \
55 libpcsxcore/psxhw.o libpcsxcore/psxinterpreter.o libpcsxcore/psxmem.o libpcsxcore/r3000a.o \
56 libpcsxcore/sio.o libpcsxcore/spu.o
57OBJS += libpcsxcore/gte.o libpcsxcore/gte_nf.o libpcsxcore/gte_divider.o
58
59ifeq ($(DEBUG), 1)
60#OBJS += libpcsxcore/debug.o libpcsxcore/socket.o libpcsxcore/disr3000a.o
61endif
62
63ifeq ($(WANT_ZLIB),1)
64CFLAGS += -Ideps/libchdr/deps/zlib-1.2.11
65OBJS += deps/libchdr/deps/zlib-1.2.11/adler32.o \
66 deps/libchdr/deps/zlib-1.2.11/compress.o \
67 deps/libchdr/deps/zlib-1.2.11/crc32.o \
68 deps/libchdr/deps/zlib-1.2.11/deflate.o \
69 deps/libchdr/deps/zlib-1.2.11/gzclose.o \
70 deps/libchdr/deps/zlib-1.2.11/gzlib.o \
71 deps/libchdr/deps/zlib-1.2.11/gzread.o \
72 deps/libchdr/deps/zlib-1.2.11/gzwrite.o \
73 deps/libchdr/deps/zlib-1.2.11/infback.o \
74 deps/libchdr/deps/zlib-1.2.11/inffast.o \
75 deps/libchdr/deps/zlib-1.2.11/inflate.o \
76 deps/libchdr/deps/zlib-1.2.11/inftrees.o \
77 deps/libchdr/deps/zlib-1.2.11/trees.o \
78 deps/libchdr/deps/zlib-1.2.11/uncompr.o \
79 deps/libchdr/deps/zlib-1.2.11/zutil.o
80endif
81ifeq "$(ARCH)" "arm"
82OBJS += libpcsxcore/gte_arm.o
83endif
84ifeq "$(HAVE_NEON_ASM)" "1"
85OBJS += libpcsxcore/gte_neon.o
86endif
87libpcsxcore/psxbios.o: CFLAGS += -Wno-nonnull
88
89# dynarec
90ifeq "$(DYNAREC)" "lightrec"
91CFLAGS += -Ideps/lightning/include -Ideps/lightrec -Iinclude/lightning -Iinclude/lightrec \
92 -DLIGHTREC -DLIGHTREC_STATIC
93LIGHTREC_CUSTOM_MAP ?= 0
94LIGHTREC_THREADED_COMPILER ?= 0
95CFLAGS += -DLIGHTREC_CUSTOM_MAP=$(LIGHTREC_CUSTOM_MAP) \
96 -DLIGHTREC_ENABLE_THREADED_COMPILER=$(LIGHTREC_THREADED_COMPILER)
97deps/lightning/lib/%.o: CFLAGS += -DHAVE_MMAP
98ifeq ($(LIGHTREC_CUSTOM_MAP),1)
99LDLIBS += -lrt
100OBJS += libpcsxcore/lightrec/mem.o
101endif
102ifeq ($(LIGHTREC_THREADED_COMPILER),1)
103OBJS += deps/lightrec/recompiler.o \
104 deps/lightrec/reaper.o
105endif
106OBJS += deps/lightrec/tlsf/tlsf.o
107OBJS += libpcsxcore/lightrec/plugin.o
108OBJS += deps/lightning/lib/jit_disasm.o \
109 deps/lightning/lib/jit_memory.o \
110 deps/lightning/lib/jit_names.o \
111 deps/lightning/lib/jit_note.o \
112 deps/lightning/lib/jit_print.o \
113 deps/lightning/lib/jit_size.o \
114 deps/lightning/lib/lightning.o \
115 deps/lightrec/blockcache.o \
116 deps/lightrec/constprop.o \
117 deps/lightrec/disassembler.o \
118 deps/lightrec/emitter.o \
119 deps/lightrec/interpreter.o \
120 deps/lightrec/lightrec.o \
121 deps/lightrec/memmanager.o \
122 deps/lightrec/optimizer.o \
123 deps/lightrec/regcache.o
124libpcsxcore/lightrec/mem.o: CFLAGS += -D_GNU_SOURCE
125ifeq ($(MMAP_WIN32),1)
126CFLAGS += -Iinclude/mman -I deps/mman
127OBJS += deps/mman/mman.o
128endif
129else ifeq "$(DYNAREC)" "ari64"
130OBJS += libpcsxcore/new_dynarec/new_dynarec.o
131OBJS += libpcsxcore/new_dynarec/pcsxmem.o
132 ifeq "$(ARCH)" "arm"
133 OBJS += libpcsxcore/new_dynarec/linkage_arm.o
134 libpcsxcore/new_dynarec/new_dynarec.o: libpcsxcore/new_dynarec/assem_arm.c
135 else ifneq (,$(findstring $(ARCH),aarch64 arm64))
136 OBJS += libpcsxcore/new_dynarec/linkage_arm64.o
137 libpcsxcore/new_dynarec/new_dynarec.o: libpcsxcore/new_dynarec/assem_arm64.c
138 else
139 $(error no dynarec support for architecture $(ARCH))
140 endif
141else
142CFLAGS += -DDRC_DISABLE
143endif
144OBJS += libpcsxcore/new_dynarec/emu_if.o
145libpcsxcore/new_dynarec/new_dynarec.o: libpcsxcore/new_dynarec/pcsxmem_inline.c
146ifdef DRC_DBG
147libpcsxcore/new_dynarec/emu_if.o: CFLAGS += -D_FILE_OFFSET_BITS=64
148CFLAGS += -DDRC_DBG
149endif
150ifeq "$(BASE_ADDR_DYNAMIC)" "1"
151libpcsxcore/new_dynarec/%.o: CFLAGS += -DBASE_ADDR_DYNAMIC=1
152endif
153
154# spu
155OBJS += plugins/dfsound/dma.o plugins/dfsound/freeze.o \
156 plugins/dfsound/registers.o plugins/dfsound/spu.o \
157 plugins/dfsound/out.o plugins/dfsound/nullsnd.o
158plugins/dfsound/spu.o: plugins/dfsound/adsr.c plugins/dfsound/reverb.c \
159 plugins/dfsound/xa.c
160ifeq "$(ARCH)" "arm"
161OBJS += plugins/dfsound/arm_utils.o
162endif
163ifeq "$(HAVE_C64_TOOLS)" "1"
164plugins/dfsound/spu.o: CFLAGS += -DC64X_DSP
165plugins/dfsound/spu.o: plugins/dfsound/spu_c64x.c
166frontend/menu.o: CFLAGS += -DC64X_DSP
167endif
168ifneq ($(findstring oss,$(SOUND_DRIVERS)),)
169plugins/dfsound/out.o: CFLAGS += -DHAVE_OSS
170OBJS += plugins/dfsound/oss.o
171endif
172ifneq ($(findstring alsa,$(SOUND_DRIVERS)),)
173plugins/dfsound/out.o: CFLAGS += -DHAVE_ALSA
174OBJS += plugins/dfsound/alsa.o
175LDLIBS += -lasound
176endif
177ifneq ($(findstring sdl,$(SOUND_DRIVERS)),)
178plugins/dfsound/out.o: CFLAGS += -DHAVE_SDL
179OBJS += plugins/dfsound/sdl.o
180endif
181ifneq ($(findstring pulseaudio,$(SOUND_DRIVERS)),)
182plugins/dfsound/out.o: CFLAGS += -DHAVE_PULSE
183OBJS += plugins/dfsound/pulseaudio.o
184endif
185ifneq ($(findstring libretro,$(SOUND_DRIVERS)),)
186plugins/dfsound/out.o: CFLAGS += -DHAVE_LIBRETRO
187endif
188
189# builtin gpu
190OBJS += plugins/gpulib/gpu.o plugins/gpulib/vout_pl.o
191ifeq "$(BUILTIN_GPU)" "neon"
192CFLAGS += -DGPU_NEON
193OBJS += plugins/gpu_neon/psx_gpu_if.o
194plugins/gpu_neon/psx_gpu_if.o: CFLAGS += -DNEON_BUILD -DTEXTURE_CACHE_4BPP -DTEXTURE_CACHE_8BPP
195plugins/gpu_neon/psx_gpu_if.o: plugins/gpu_neon/psx_gpu/*.c
196frontend/menu.o frontend/plugin_lib.o: CFLAGS += -DBUILTIN_GPU_NEON
197 ifeq "$(HAVE_NEON_ASM)" "1"
198 OBJS += plugins/gpu_neon/psx_gpu/psx_gpu_arm_neon.o
199 else
200 OBJS += plugins/gpu_neon/psx_gpu/psx_gpu_simd.o
201 plugins/gpu_neon/psx_gpu_if.o: CFLAGS += -DSIMD_BUILD
202 plugins/gpu_neon/psx_gpu/psx_gpu_simd.o: CFLAGS += -DSIMD_BUILD
203 endif
204endif
205ifeq "$(BUILTIN_GPU)" "peops"
206CFLAGS += -DGPU_PEOPS
207# note: code is not safe for strict-aliasing? (Castlevania problems)
208plugins/dfxvideo/gpulib_if.o: CFLAGS += -fno-strict-aliasing
209plugins/dfxvideo/gpulib_if.o: plugins/dfxvideo/prim.c plugins/dfxvideo/soft.c
210OBJS += plugins/dfxvideo/gpulib_if.o
211ifeq "$(THREAD_RENDERING)" "1"
212CFLAGS += -DTHREAD_RENDERING
213OBJS += plugins/gpulib/gpulib_thread_if.o
214endif
215endif
216ifeq "$(BUILTIN_GPU)" "unai"
217CFLAGS += -DGPU_UNAI
218CFLAGS += -DUSE_GPULIB=1
219#CFLAGS += -DINLINE="static __inline__"
220#CFLAGS += -Dasm="__asm__ __volatile__"
221OBJS += plugins/gpu_unai/gpulib_if.o
222ifeq "$(ARCH)" "arm"
223OBJS += plugins/gpu_unai/gpu_arm.o
224endif
225ifeq "$(THREAD_RENDERING)" "1"
226CFLAGS += -DTHREAD_RENDERING
227OBJS += plugins/gpulib/gpulib_thread_if.o
228endif
229plugins/gpu_unai/gpulib_if.o: CFLAGS += -DREARMED -O3
230CC_LINK = $(CXX)
231endif
232
233# cdrcimg
234OBJS += plugins/cdrcimg/cdrcimg.o
235
236# libchdr
237ifeq "$(HAVE_CHD)" "1"
238CFLAGS += -Ideps/libchdr/include
239CFLAGS += -Ideps/libchdr/include/libchdr
240OBJS += deps/libchdr/deps/lzma-19.00/src/Alloc.o
241OBJS += deps/libchdr/deps/lzma-19.00/src/Bra86.o
242OBJS += deps/libchdr/deps/lzma-19.00/src/BraIA64.o
243OBJS += deps/libchdr/deps/lzma-19.00/src/CpuArch.o
244OBJS += deps/libchdr/deps/lzma-19.00/src/Delta.o
245OBJS += deps/libchdr/deps/lzma-19.00/src/LzFind.o
246OBJS += deps/libchdr/deps/lzma-19.00/src/Lzma86Dec.o
247OBJS += deps/libchdr/deps/lzma-19.00/src/LzmaDec.o
248OBJS += deps/libchdr/deps/lzma-19.00/src/LzmaEnc.o
249OBJS += deps/libchdr/deps/lzma-19.00/src/Sort.o
250OBJS += deps/libchdr/src/libchdr_bitstream.o
251OBJS += deps/libchdr/src/libchdr_cdrom.o
252OBJS += deps/libchdr/src/libchdr_chd.o
253OBJS += deps/libchdr/src/libchdr_flac.o
254OBJS += deps/libchdr/src/libchdr_huffman.o
255CFLAGS += -Ideps/libchdr/deps/lzma-19.00/include
256CFLAGS += -DHAVE_CHD -D_7ZIP_ST
257LDFLAGS += -lm
258endif
259
260# dfinput
261ifneq "$(PLATFORM)" "libretro"
262OBJS += plugins/dfinput/main.o plugins/dfinput/pad.o plugins/dfinput/guncon.o
263endif
264
265# frontend/gui
266OBJS += frontend/cspace.o
267ifeq "$(HAVE_NEON_ASM)" "1"
268OBJS += frontend/cspace_neon.o
269frontend/cspace.o: CFLAGS += -DHAVE_bgr555_to_rgb565 -DHAVE_bgr888_to_x
270else
271ifeq "$(ARCH)" "arm"
272OBJS += frontend/cspace_arm.o
273frontend/cspace.o: CFLAGS += -DHAVE_bgr555_to_rgb565
274endif
275endif
276
277ifeq "$(PLATFORM)" "generic"
278OBJS += frontend/libpicofe/in_sdl.o
279OBJS += frontend/libpicofe/plat_sdl.o
280OBJS += frontend/libpicofe/plat_dummy.o
281OBJS += frontend/libpicofe/linux/in_evdev.o
282OBJS += frontend/plat_sdl.o
283ifeq "$(HAVE_GLES)" "1"
284OBJS += frontend/libpicofe/gl.o frontend/libpicofe/gl_platform.o
285LDLIBS += $(LDLIBS_GLES)
286frontend/libpicofe/plat_sdl.o: CFLAGS += -DHAVE_GLES $(CFLAGS_GLES)
287frontend/libpicofe/gl_platform.o: CFLAGS += -DHAVE_GLES $(CFLAGS_GLES)
288frontend/libpicofe/gl.o: CFLAGS += -DHAVE_GLES $(CFLAGS_GLES)
289frontend/plat_sdl.o: CFLAGS += -DHAVE_GLES $(CFLAGS_GLES)
290endif
291USE_PLUGIN_LIB = 1
292USE_FRONTEND = 1
293endif
294ifeq "$(PLATFORM)" "pandora"
295OBJS += frontend/libpicofe/pandora/plat.o
296OBJS += frontend/libpicofe/linux/fbdev.o frontend/libpicofe/linux/xenv.o
297OBJS += frontend/libpicofe/linux/in_evdev.o
298OBJS += frontend/plat_pandora.o frontend/plat_omap.o
299frontend/main.o frontend/menu.o: CFLAGS += -include frontend/pandora/ui_feat.h
300frontend/libpicofe/linux/plat.o: CFLAGS += -DPANDORA
301USE_PLUGIN_LIB = 1
302USE_FRONTEND = 1
303endif
304ifeq "$(PLATFORM)" "caanoo"
305OBJS += frontend/libpicofe/gp2x/in_gp2x.o frontend/warm/warm.o
306OBJS += frontend/libpicofe/gp2x/soc_pollux.o
307OBJS += frontend/libpicofe/linux/in_evdev.o
308OBJS += frontend/plat_pollux.o frontend/in_tsbutton.o frontend/blit320.o
309frontend/main.o frontend/menu.o: CFLAGS += -include frontend/320240/ui_gp2x.h
310USE_PLUGIN_LIB = 1
311USE_FRONTEND = 1
312endif
313ifeq "$(PLATFORM)" "maemo"
314OBJS += maemo/hildon.o maemo/main.o maemo/maemo_xkb.o frontend/pl_gun_ts.o
315maemo/%.o: maemo/%.c
316USE_PLUGIN_LIB = 1
317LDFLAGS += $(shell pkg-config --libs hildon-1 libpulse)
318CFLAGS += $(shell pkg-config --cflags hildon-1) -DHAVE_TSLIB
319CFLAGS += `pkg-config --cflags glib-2.0 libosso dbus-1 hildon-fm-2`
320LDFLAGS += `pkg-config --libs glib-2.0 libosso dbus-1 hildon-fm-2`
321endif
322ifeq "$(PLATFORM)" "libretro"
323ifeq "$(USE_LIBRETRO_VFS)" "1"
324OBJS += libretro-common/compat/compat_posix_string.o
325OBJS += libretro-common/compat/fopen_utf8.o
326OBJS += libretro-common/encodings/compat_strl.o
327OBJS += libretro-common/encodings/encoding_utf.o
328OBJS += libretro-common/file/file_path.o
329OBJS += libretro-common/streams/file_stream.o
330OBJS += libretro-common/streams/file_stream_transforms.o
331OBJS += libretro-common/string/stdstring.o
332OBJS += libretro-common/time/rtime.o
333OBJS += libretro-common/vfs/vfs_implementation.o
334CFLAGS += -DUSE_LIBRETRO_VFS
335endif
336OBJS += frontend/libretro.o
337CFLAGS += -Ilibretro-common/include
338CFLAGS += -DFRONTEND_SUPPORTS_RGB565
339CFLAGS += -DHAVE_LIBRETRO
340
341ifneq ($(DYNAREC),lightrec)
342ifeq ($(MMAP_WIN32),1)
343OBJS += libpcsxcore/memmap_win32.o
344endif
345endif
346endif
347
348ifeq "$(USE_PLUGIN_LIB)" "1"
349OBJS += frontend/plugin_lib.o
350OBJS += frontend/libpicofe/linux/plat.o
351OBJS += frontend/libpicofe/readpng.o frontend/libpicofe/fonts.o
352frontend/libpicofe/linux/plat.o: CFLAGS += -DNO_HOME_DIR
353ifeq "$(HAVE_NEON_ASM)" "1"
354OBJS += frontend/libpicofe/arm/neon_scale2x.o
355OBJS += frontend/libpicofe/arm/neon_eagle2x.o
356frontend/libpicofe/arm/neon_scale2x.o: CFLAGS += -DDO_BGR_TO_RGB
357frontend/libpicofe/arm/neon_eagle2x.o: CFLAGS += -DDO_BGR_TO_RGB
358endif
359endif
360ifeq "$(USE_FRONTEND)" "1"
361OBJS += frontend/menu.o
362OBJS += frontend/libpicofe/input.o
363frontend/menu.o: frontend/libpicofe/menu.c
364ifeq "$(HAVE_TSLIB)" "1"
365frontend/%.o: CFLAGS += -DHAVE_TSLIB
366OBJS += frontend/pl_gun_ts.o
367endif
368else
369CFLAGS += -DNO_FRONTEND
370endif
371
372# misc
373OBJS += frontend/main.o frontend/plugin.o
374
375
376frontend/menu.o frontend/main.o: frontend/revision.h
377frontend/plat_sdl.o frontend/libretro.o: frontend/revision.h
378
379frontend/libpicofe/%.c:
380 @echo "libpicofe module is missing, please run:"
381 @echo "git submodule init && git submodule update"
382 @exit 1
383
384libpcsxcore/gte_nf.o: libpcsxcore/gte.c
385 $(CC) -c -o $@ $^ $(CFLAGS) -DFLAGLESS
386
387frontend/revision.h: FORCE
388 @(git describe --always || echo) | sed -e 's/.*/#define REV "\0"/' > $@_
389 @diff -q $@_ $@ > /dev/null 2>&1 || cp $@_ $@
390 @rm $@_
391
392%.o: %.S
393 $(CC_AS) $(CFLAGS) -c $^ -o $@
394
395%.o: %.cpp
396 $(CXX) $(CXXFLAGS) -c -o $@ $<
397
398%.o: %.c
399 $(CC) $(CFLAGS) -c -o $@ $<
400
401target_: $(TARGET)
402
403$(TARGET): $(OBJS)
404ifeq ($(STATIC_LINKING), 1)
405 $(AR) rcs $@ $(OBJS)
406else
407 $(CC_LINK) -o $@ $^ $(LDFLAGS) $(LDLIBS) $(EXTRA_LDFLAGS)
408endif
409
410clean: $(PLAT_CLEAN) clean_plugins
411 $(RM) $(TARGET) $(OBJS) $(TARGET).map frontend/revision.h
412
413ifneq ($(PLUGINS),)
414plugins_: $(PLUGINS)
415
416$(PLUGINS):
417 make -C $(dir $@)
418
419clean_plugins:
420 make -C plugins/gpulib/ clean
421 for dir in $(PLUGINS) ; do \
422 $(MAKE) -C $$(dirname $$dir) clean; done
423else
424plugins_:
425clean_plugins:
426endif
427
428.PHONY: all clean target_ plugins_ clean_plugins FORCE
429
430# ----------- release -----------
431
432VER ?= $(shell git describe --always HEAD)
433
434ifeq "$(PLATFORM)" "generic"
435OUT = pcsx_rearmed_$(VER)
436
437rel: pcsx $(PLUGINS) \
438 frontend/pandora/skin readme.txt COPYING
439 rm -rf $(OUT)
440 mkdir -p $(OUT)/plugins
441 mkdir -p $(OUT)/bios
442 cp -r $^ $(OUT)/
443 mv $(OUT)/*.so* $(OUT)/plugins/
444 zip -9 -r $(OUT).zip $(OUT)
445endif
446
447ifeq "$(PLATFORM)" "pandora"
448PND_MAKE ?= $(HOME)/dev/pnd/src/pandora-libraries/testdata/scripts/pnd_make.sh
449
450rel: pcsx plugins/dfsound/pcsxr_spu_area3.out $(PLUGINS) \
451 frontend/pandora/pcsx.sh frontend/pandora/pcsx.pxml.templ frontend/pandora/pcsx.png \
452 frontend/pandora/picorestore frontend/pandora/skin readme.txt COPYING
453 rm -rf out
454 mkdir -p out/plugins
455 cp -r $^ out/
456 sed -e 's/%PR%/$(VER)/g' out/pcsx.pxml.templ > out/pcsx.pxml
457 rm out/pcsx.pxml.templ
458 mv out/*.so out/plugins/
459 $(PND_MAKE) -p pcsx_rearmed_$(VER).pnd -d out -x out/pcsx.pxml -i frontend/pandora/pcsx.png -c
460endif
461
462ifeq "$(PLATFORM)" "caanoo"
463PLAT_CLEAN = caanoo_clean
464
465caanoo_clean:
466 $(RM) frontend/320240/pollux_set
467
468rel: pcsx $(PLUGINS) \
469 frontend/320240/caanoo.gpe frontend/320240/pcsx26.png \
470 frontend/320240/pcsxb.png frontend/320240/skin \
471 frontend/warm/bin/warm_2.6.24.ko frontend/320240/pollux_set \
472 frontend/320240/pcsx_rearmed.ini frontend/320240/haptic_w.cfg \
473 frontend/320240/haptic_s.cfg \
474 readme.txt COPYING
475 rm -rf out
476 mkdir -p out/pcsx_rearmed/plugins
477 cp -r $^ out/pcsx_rearmed/
478 mv out/pcsx_rearmed/*.so out/pcsx_rearmed/plugins/
479 mv out/pcsx_rearmed/caanoo.gpe out/pcsx_rearmed/pcsx.gpe
480 mv out/pcsx_rearmed/pcsx_rearmed.ini out/
481 mkdir out/pcsx_rearmed/lib/
482 cp ./lib/libbz2.so.1 out/pcsx_rearmed/lib/
483 mkdir out/pcsx_rearmed/bios/
484 cd out && zip -9 -r ../pcsx_rearmed_$(VER)_caanoo.zip *
485endif