1 # Makefile for PCSX ReARMed
3 # default stuff goes here, so that config can override
5 CFLAGS += -Wall -Iinclude -ffast-math
9 ifeq ($(platform), $(filter $(platform), vita ctr))
10 CFLAGS += -O3 -DNDEBUG
12 CFLAGS += -O2 -DNDEBUG
15 ifeq ($(DEBUG_ASAN), 1)
16 CFLAGS += -fsanitize=address
18 CFLAGS += -DP_HAVE_MMAP=$(if $(NO_MMAP),0,1) \
19 -DP_HAVE_PTHREAD=$(if $(NO_PTHREAD),0,1) \
20 -DP_HAVE_POSIX_MEMALIGN=$(if $(NO_POSIX_MEMALIGN),0,1) \
26 # Suppress minor warnings for dependencies
27 deps/%: CFLAGS += -Wno-unused -Wno-unused-function
29 all: config.mak target_ plugins_
32 ifneq ($(wildcard config.mak),)
33 config.mak: ./configure
34 @echo $@ is out-of-date, running configure
35 @sed -n "/.*Configured with/s/[^:]*: //p" $@ | sh
39 @echo "Please run ./configure before running make!"
46 -include Makefile.local
50 LDFLAGS += $(MAIN_LDFLAGS)
51 ifeq ($(DEBUG_ASAN), 1)
52 LDFLAGS += -static-libasan
54 EXTRA_LDFLAGS ?= -Wl,-Map=$@.map
55 LDLIBS += $(MAIN_LDLIBS)
61 OBJS += libpcsxcore/cdriso.o libpcsxcore/cdrom.o libpcsxcore/cheat.o libpcsxcore/database.o \
62 libpcsxcore/decode_xa.o libpcsxcore/mdec.o \
63 libpcsxcore/misc.o libpcsxcore/plugins.o libpcsxcore/ppf.o libpcsxcore/psxbios.o \
64 libpcsxcore/psxcommon.o libpcsxcore/psxcounters.o libpcsxcore/psxdma.o \
65 libpcsxcore/psxhw.o libpcsxcore/psxinterpreter.o libpcsxcore/psxmem.o \
66 libpcsxcore/psxevents.o libpcsxcore/r3000a.o \
67 libpcsxcore/sio.o libpcsxcore/spu.o libpcsxcore/gpu.o
68 OBJS += libpcsxcore/gte.o libpcsxcore/gte_nf.o libpcsxcore/gte_divider.o
71 #OBJS += libpcsxcore/debug.o libpcsxcore/socket.o libpcsxcore/disr3000a.o
75 ZLIB_DIR = deps/libchdr/deps/zlib-1.3.1
76 CFLAGS += -I$(ZLIB_DIR)
77 OBJS += $(ZLIB_DIR)/adler32.o \
78 $(ZLIB_DIR)/compress.o \
80 $(ZLIB_DIR)/deflate.o \
81 $(ZLIB_DIR)/gzclose.o \
83 $(ZLIB_DIR)/gzread.o \
84 $(ZLIB_DIR)/gzwrite.o \
85 $(ZLIB_DIR)/infback.o \
86 $(ZLIB_DIR)/inffast.o \
87 $(ZLIB_DIR)/inflate.o \
88 $(ZLIB_DIR)/inftrees.o \
90 $(ZLIB_DIR)/uncompr.o \
92 $(ZLIB_DIR)/%.o: CFLAGS += -DHAVE_UNISTD_H
95 OBJS += libpcsxcore/gte_arm.o
97 ifeq "$(HAVE_NEON_ASM)" "1"
98 OBJS += libpcsxcore/gte_neon.o
100 libpcsxcore/psxbios.o: CFLAGS += -Wno-nonnull
103 ifeq "$(DYNAREC)" "lightrec"
104 CFLAGS += -Ideps/lightning/include -Ideps/lightrec -Iinclude/lightning -Iinclude/lightrec \
105 -DLIGHTREC -DLIGHTREC_STATIC
106 LIGHTREC_CUSTOM_MAP ?= 0
107 LIGHTREC_CUSTOM_MAP_OBJ ?= libpcsxcore/lightrec/mem.o
108 LIGHTREC_THREADED_COMPILER ?= 0
109 CFLAGS += -DLIGHTREC_CUSTOM_MAP=$(LIGHTREC_CUSTOM_MAP) \
110 -DLIGHTREC_ENABLE_THREADED_COMPILER=$(LIGHTREC_THREADED_COMPILER)
111 ifeq ($(LIGHTREC_CUSTOM_MAP),1)
113 OBJS += $(LIGHTREC_CUSTOM_MAP_OBJ)
115 ifeq ($(NEED_SYSCONF),1)
116 OBJS += libpcsxcore/lightrec/sysconf.o
118 ifeq ($(LIGHTREC_THREADED_COMPILER),1)
119 OBJS += deps/lightrec/recompiler.o \
120 deps/lightrec/reaper.o
122 OBJS += deps/lightrec/tlsf/tlsf.o
123 OBJS += libpcsxcore/lightrec/plugin.o \
124 libpcsxcore/lightrec/internals.o
125 OBJS += deps/lightning/lib/jit_disasm.o \
126 deps/lightning/lib/jit_memory.o \
127 deps/lightning/lib/jit_names.o \
128 deps/lightning/lib/jit_note.o \
129 deps/lightning/lib/jit_print.o \
130 deps/lightning/lib/jit_size.o \
131 deps/lightning/lib/lightning.o \
132 deps/lightrec/blockcache.o \
133 deps/lightrec/constprop.o \
134 deps/lightrec/disassembler.o \
135 deps/lightrec/emitter.o \
136 deps/lightrec/interpreter.o \
137 deps/lightrec/lightrec.o \
138 deps/lightrec/memmanager.o \
139 deps/lightrec/optimizer.o \
140 deps/lightrec/regcache.o
141 deps/lightning/%.o: CFLAGS += -DHAVE_MMAP=P_HAVE_MMAP
142 deps/lightning/%: CFLAGS += -w
143 deps/lightrec/%: CFLAGS += -w
144 libpcsxcore/lightrec/mem.o: CFLAGS += -D_GNU_SOURCE
145 ifeq ($(MMAP_WIN32),1)
146 CFLAGS += -Iinclude/mman -I deps/mman
147 OBJS += deps/mman/mman.o
149 else ifeq "$(DYNAREC)" "ari64"
150 OBJS += libpcsxcore/new_dynarec/new_dynarec.o
151 OBJS += libpcsxcore/new_dynarec/pcsxmem.o
153 OBJS += libpcsxcore/new_dynarec/linkage_arm.o
154 libpcsxcore/new_dynarec/new_dynarec.o: libpcsxcore/new_dynarec/assem_arm.c
155 else ifneq (,$(findstring $(ARCH),aarch64 arm64))
156 OBJS += libpcsxcore/new_dynarec/linkage_arm64.o
157 libpcsxcore/new_dynarec/new_dynarec.o: libpcsxcore/new_dynarec/assem_arm64.c
159 $(error no dynarec support for architecture $(ARCH))
162 CFLAGS += -DDRC_DISABLE
164 OBJS += libpcsxcore/new_dynarec/emu_if.o
165 libpcsxcore/new_dynarec/new_dynarec.o: libpcsxcore/new_dynarec/pcsxmem_inline.c
167 libpcsxcore/new_dynarec/emu_if.o: CFLAGS += -D_FILE_OFFSET_BITS=64
170 ifeq "$(BASE_ADDR_DYNAMIC)" "1"
171 libpcsxcore/new_dynarec/%.o: CFLAGS += -DBASE_ADDR_DYNAMIC=1
175 OBJS += plugins/dfsound/dma.o plugins/dfsound/freeze.o \
176 plugins/dfsound/registers.o plugins/dfsound/spu.o \
177 plugins/dfsound/out.o plugins/dfsound/nullsnd.o
178 plugins/dfsound/spu.o: plugins/dfsound/adsr.c plugins/dfsound/reverb.c \
181 OBJS += plugins/dfsound/arm_utils.o
183 ifeq "$(HAVE_C64_TOOLS)" "1"
184 plugins/dfsound/%.o: CFLAGS += -DC64X_DSP -DWANT_THREAD_CODE
185 plugins/dfsound/spu.o: plugins/dfsound/spu_c64x.c
186 frontend/menu.o: CFLAGS += -DC64X_DSP
188 ifneq ($(findstring oss,$(SOUND_DRIVERS)),)
189 plugins/dfsound/out.o: CFLAGS += -DHAVE_OSS
190 OBJS += plugins/dfsound/oss.o
192 ifneq ($(findstring alsa,$(SOUND_DRIVERS)),)
193 plugins/dfsound/out.o: CFLAGS += -DHAVE_ALSA
194 OBJS += plugins/dfsound/alsa.o
197 ifneq ($(findstring sdl,$(SOUND_DRIVERS)),)
198 plugins/dfsound/out.o: CFLAGS += -DHAVE_SDL
199 OBJS += plugins/dfsound/sdl.o
201 ifneq ($(findstring pulseaudio,$(SOUND_DRIVERS)),)
202 plugins/dfsound/out.o: CFLAGS += -DHAVE_PULSE
203 OBJS += plugins/dfsound/pulseaudio.o
205 ifneq ($(findstring libretro,$(SOUND_DRIVERS)),)
206 plugins/dfsound/out.o: CFLAGS += -DHAVE_LIBRETRO
210 OBJS += plugins/gpulib/gpu.o plugins/gpulib/vout_pl.o
211 ifeq "$(BUILTIN_GPU)" "neon"
213 OBJS += plugins/gpu_neon/psx_gpu_if.o
214 plugins/gpu_neon/psx_gpu_if.o: CFLAGS += -DNEON_BUILD -DTEXTURE_CACHE_4BPP -DTEXTURE_CACHE_8BPP
215 plugins/gpu_neon/psx_gpu_if.o: plugins/gpu_neon/psx_gpu/*.c
216 frontend/menu.o frontend/plugin_lib.o: CFLAGS += -DBUILTIN_GPU_NEON
217 ifeq "$(HAVE_NEON_ASM)" "1"
218 OBJS += plugins/gpu_neon/psx_gpu/psx_gpu_arm_neon.o
220 OBJS += plugins/gpu_neon/psx_gpu/psx_gpu_simd.o
221 plugins/gpu_neon/psx_gpu_if.o: CFLAGS += -DSIMD_BUILD
222 plugins/gpu_neon/psx_gpu/psx_gpu_simd.o: CFLAGS += -DSIMD_BUILD
225 ifeq "$(BUILTIN_GPU)" "peops"
226 CFLAGS += -DGPU_PEOPS
227 # note: code is not safe for strict-aliasing? (Castlevania problems)
228 plugins/dfxvideo/gpulib_if.o: CFLAGS += -fno-strict-aliasing
229 plugins/dfxvideo/gpulib_if.o: plugins/dfxvideo/prim.c plugins/dfxvideo/soft.c
230 OBJS += plugins/dfxvideo/gpulib_if.o
231 ifeq "$(THREAD_RENDERING)" "1"
232 CFLAGS += -DTHREAD_RENDERING
233 OBJS += plugins/gpulib/gpulib_thread_if.o
236 ifeq "$(BUILTIN_GPU)" "unai"
238 CFLAGS += -DUSE_GPULIB=1
239 #CFLAGS += -DINLINE="static __inline__"
240 #CFLAGS += -Dasm="__asm__ __volatile__"
241 OBJS += plugins/gpu_unai/gpulib_if.o
243 OBJS += plugins/gpu_unai/gpu_arm.o
245 ifeq "$(THREAD_RENDERING)" "1"
246 CFLAGS += -DTHREAD_RENDERING
247 OBJS += plugins/gpulib/gpulib_thread_if.o
249 plugins/gpu_unai/gpulib_if.o: CFLAGS += -DREARMED -O3
254 OBJS += plugins/cdrcimg/cdrcimg.o
257 ifeq "$(HAVE_CHD)" "1"
259 LCHDR_LZMA = $(LCHDR)/deps/lzma-22.01
260 LCHDR_ZSTD = $(LCHDR)/deps/zstd-1.5.5/lib
261 OBJS += $(LCHDR)/src/libchdr_bitstream.o
262 OBJS += $(LCHDR)/src/libchdr_cdrom.o
263 OBJS += $(LCHDR)/src/libchdr_chd.o
264 OBJS += $(LCHDR)/src/libchdr_flac.o
265 OBJS += $(LCHDR)/src/libchdr_huffman.o
266 $(LCHDR)/src/%.o: CFLAGS += -Wno-unused -std=gnu11
267 OBJS += $(LCHDR_LZMA)/src/Alloc.o
268 OBJS += $(LCHDR_LZMA)/src/Bra86.o
269 OBJS += $(LCHDR_LZMA)/src/BraIA64.o
270 OBJS += $(LCHDR_LZMA)/src/CpuArch.o
271 OBJS += $(LCHDR_LZMA)/src/Delta.o
272 OBJS += $(LCHDR_LZMA)/src/LzFind.o
273 OBJS += $(LCHDR_LZMA)/src/Lzma86Dec.o
274 OBJS += $(LCHDR_LZMA)/src/LzmaDec.o
275 OBJS += $(LCHDR_LZMA)/src/LzmaEnc.o
276 OBJS += $(LCHDR_LZMA)/src/Sort.o
277 $(LCHDR_LZMA)/src/%.o: CFLAGS += -Wno-unused -D_7ZIP_ST -I$(LCHDR_LZMA)/include
278 $(LCHDR)/src/%.o: CFLAGS += -I$(LCHDR_LZMA)/include
279 OBJS += $(LCHDR_ZSTD)/common/debug.o
280 OBJS += $(LCHDR_ZSTD)/common/entropy_common.o
281 OBJS += $(LCHDR_ZSTD)/common/error_private.o
282 OBJS += $(LCHDR_ZSTD)/common/fse_decompress.o
283 OBJS += $(LCHDR_ZSTD)/common/pool.o
284 OBJS += $(LCHDR_ZSTD)/common/threading.o
285 OBJS += $(LCHDR_ZSTD)/common/xxhash.o
286 OBJS += $(LCHDR_ZSTD)/common/zstd_common.o
287 OBJS += $(LCHDR_ZSTD)/decompress/huf_decompress.o
288 OBJS += $(LCHDR_ZSTD)/decompress/zstd_ddict.o
289 OBJS += $(LCHDR_ZSTD)/decompress/zstd_decompress_block.o
290 OBJS += $(LCHDR_ZSTD)/decompress/zstd_decompress.o
291 $(LCHDR_ZSTD)/common/%.o \
292 $(LCHDR_ZSTD)/decompress/%.o: CFLAGS += -DZSTD_DISABLE_ASM -I$(LCHDR_ZSTD)
293 $(LCHDR)/src/%.o: CFLAGS += -I$(LCHDR_ZSTD)
294 libpcsxcore/cdriso.o: CFLAGS += -Wno-unused-function
295 CFLAGS += -DHAVE_CHD -I$(LCHDR)/include
300 OBJS += frontend/cspace.o
301 ifeq "$(HAVE_NEON_ASM)" "1"
302 OBJS += frontend/cspace_neon.o
303 frontend/cspace.o: CFLAGS += -DHAVE_bgr555_to_rgb565 -DHAVE_bgr888_to_x
306 OBJS += frontend/cspace_arm.o
307 frontend/cspace.o: CFLAGS += -DHAVE_bgr555_to_rgb565
311 ifeq "$(PLATFORM)" "generic"
312 OBJS += frontend/libpicofe/in_sdl.o
313 OBJS += frontend/libpicofe/plat_sdl.o
314 OBJS += frontend/libpicofe/plat_dummy.o
315 OBJS += frontend/libpicofe/linux/in_evdev.o
316 OBJS += frontend/plat_sdl.o
317 ifeq "$(HAVE_GLES)" "1"
318 OBJS += frontend/libpicofe/gl.o frontend/libpicofe/gl_platform.o
319 LDLIBS += $(LDLIBS_GLES)
320 frontend/libpicofe/plat_sdl.o: CFLAGS += -DHAVE_GLES $(CFLAGS_GLES)
321 frontend/libpicofe/gl_platform.o: CFLAGS += -DHAVE_GLES $(CFLAGS_GLES)
322 frontend/libpicofe/gl.o: CFLAGS += -DHAVE_GLES $(CFLAGS_GLES)
323 frontend/plat_sdl.o: CFLAGS += -DHAVE_GLES $(CFLAGS_GLES)
328 ifeq "$(PLATFORM)" "pandora"
329 OBJS += frontend/libpicofe/pandora/plat.o
330 OBJS += frontend/libpicofe/linux/fbdev.o frontend/libpicofe/linux/xenv.o
331 OBJS += frontend/libpicofe/linux/in_evdev.o
332 OBJS += frontend/plat_pandora.o frontend/plat_omap.o
333 frontend/main.o frontend/menu.o: CFLAGS += -include frontend/pandora/ui_feat.h
334 frontend/libpicofe/linux/plat.o: CFLAGS += -DPANDORA
337 CFLAGS += -gdwarf-3 -ffunction-sections -fdata-sections
338 LDFLAGS += -Wl,--gc-sections
340 ifeq "$(PLATFORM)" "caanoo"
341 OBJS += frontend/libpicofe/gp2x/in_gp2x.o frontend/warm/warm.o
342 OBJS += frontend/libpicofe/gp2x/soc_pollux.o
343 OBJS += frontend/libpicofe/linux/in_evdev.o
344 OBJS += frontend/plat_pollux.o frontend/in_tsbutton.o frontend/blit320.o
345 frontend/main.o frontend/menu.o: CFLAGS += -include frontend/320240/ui_gp2x.h
349 ifeq "$(PLATFORM)" "maemo"
350 OBJS += maemo/hildon.o maemo/main.o maemo/maemo_xkb.o frontend/pl_gun_ts.o
353 LDFLAGS += $(shell pkg-config --libs hildon-1 libpulse)
354 CFLAGS += $(shell pkg-config --cflags hildon-1) -DHAVE_TSLIB
355 CFLAGS += `pkg-config --cflags glib-2.0 libosso dbus-1 hildon-fm-2`
356 LDFLAGS += `pkg-config --libs glib-2.0 libosso dbus-1 hildon-fm-2`
358 ifeq "$(PLATFORM)" "libretro"
359 ifneq "$(HAVE_PHYSICAL_CDROM)$(USE_LIBRETRO_VFS)" "00"
360 OBJS += deps/libretro-common/compat/compat_strl.o
361 OBJS += deps/libretro-common/file/file_path.o
362 OBJS += deps/libretro-common/string/stdstring.o
363 OBJS += deps/libretro-common/vfs/vfs_implementation.o
365 ifeq "$(HAVE_PHYSICAL_CDROM)" "1"
366 OBJS += frontend/libretro-cdrom.o
367 OBJS += deps/libretro-common/lists/string_list.o
368 OBJS += deps/libretro-common/memmap/memalign.o
369 OBJS += deps/libretro-common/rthreads/rthreads.o
370 OBJS += deps/libretro-common/vfs/vfs_implementation_cdrom.o
371 CFLAGS += -DHAVE_CDROM
373 ifeq "$(USE_LIBRETRO_VFS)" "1"
374 OBJS += deps/libretro-common/compat/compat_posix_string.o
375 OBJS += deps/libretro-common/compat/fopen_utf8.o
376 OBJS += deps/libretro-common/encodings/encoding_utf.o
377 OBJS += deps/libretro-common/streams/file_stream.o
378 OBJS += deps/libretro-common/streams/file_stream_transforms.o
379 OBJS += deps/libretro-common/time/rtime.o
380 CFLAGS += -DUSE_LIBRETRO_VFS
382 OBJS += frontend/libretro.o
383 CFLAGS += -Ideps/libretro-common/include
384 CFLAGS += -DFRONTEND_SUPPORTS_RGB565
385 CFLAGS += -DHAVE_LIBRETRO
387 ifneq ($(DYNAREC),lightrec)
388 ifeq ($(MMAP_WIN32),1)
389 OBJS += libpcsxcore/memmap_win32.o
394 ifeq "$(USE_PLUGIN_LIB)" "1"
395 OBJS += frontend/plugin_lib.o
396 OBJS += frontend/libpicofe/linux/plat.o
397 OBJS += frontend/libpicofe/readpng.o frontend/libpicofe/fonts.o
398 frontend/libpicofe/linux/plat.o: CFLAGS += -DNO_HOME_DIR
399 ifeq "$(HAVE_NEON_ASM)" "1"
400 OBJS += frontend/libpicofe/arm/neon_scale2x.o
401 OBJS += frontend/libpicofe/arm/neon_eagle2x.o
402 frontend/libpicofe/arm/neon_scale2x.o: CFLAGS += -DDO_BGR_TO_RGB
403 frontend/libpicofe/arm/neon_eagle2x.o: CFLAGS += -DDO_BGR_TO_RGB
406 ifeq "$(USE_FRONTEND)" "1"
407 OBJS += frontend/menu.o
408 OBJS += frontend/libpicofe/input.o
409 frontend/menu.o: frontend/libpicofe/menu.c
410 ifeq "$(HAVE_TSLIB)" "1"
411 frontend/%.o: CFLAGS += -DHAVE_TSLIB
412 OBJS += frontend/pl_gun_ts.o
415 CFLAGS += -DNO_FRONTEND
419 OBJS += frontend/main.o frontend/plugin.o
420 frontend/main.o: CFLAGS += -DBUILTIN_GPU=$(BUILTIN_GPU)
422 frontend/menu.o frontend/main.o: frontend/revision.h
423 frontend/plat_sdl.o frontend/libretro.o: frontend/revision.h
425 frontend/libpicofe/%.c:
426 @echo "libpicofe module is missing, please run:"
427 @echo "git submodule init && git submodule update"
430 libpcsxcore/gte_nf.o: libpcsxcore/gte.c
431 $(CC) -c -o $@ $^ $(CFLAGS) -DFLAGLESS
433 frontend/revision.h: FORCE
434 @(git describe --always || echo) | sed -e 's/.*/#define REV "\0"/' > $@_
435 @diff -q $@_ $@ > /dev/null 2>&1 || cp $@_ $@
439 $(CC_AS) $(CFLAGS) -c $^ -o $@
442 $(CXX) $(CXXFLAGS) -c -o $@ $<
445 $(CC) $(CFLAGS) -c -o $@ $<
450 ifeq ($(STATIC_LINKING), 1)
453 $(CC_LINK) $(CFLAGS) -o $@ $^ $(LDFLAGS) $(LDLIBS) $(EXTRA_LDFLAGS)
456 clean: $(PLAT_CLEAN) clean_plugins
457 $(RM) $(TARGET) $(OBJS) $(TARGET).map frontend/revision.h
466 $(MAKE) -C plugins/gpulib/ clean
467 for dir in $(PLUGINS) ; do \
468 $(MAKE) -C $$(dirname $$dir) clean; done
474 .PHONY: all clean target_ plugins_ clean_plugins FORCE
476 # ----------- release -----------
478 VER ?= $(shell git describe --always HEAD)
480 ifeq "$(PLATFORM)" "generic"
481 OUT = pcsx_rearmed_$(VER)
483 rel: pcsx $(PLUGINS) \
484 frontend/pandora/skin readme.txt COPYING
486 mkdir -p $(OUT)/plugins
489 mv $(OUT)/*.so* $(OUT)/plugins/
490 zip -9 -r $(OUT).zip $(OUT)
493 ifeq "$(PLATFORM)" "pandora"
494 PND_MAKE ?= $(HOME)/dev/pnd/src/pandora-libraries/testdata/scripts/pnd_make.sh
496 rel: pcsx plugins/dfsound/pcsxr_spu_area3.out $(PLUGINS) \
497 frontend/pandora/pcsx.sh frontend/pandora/pcsx.pxml.templ frontend/pandora/pcsx.png \
498 frontend/pandora/picorestore frontend/pandora/skin readme.txt COPYING
502 sed -e 's/%PR%/$(VER)/g' out/pcsx.pxml.templ > out/pcsx.pxml
503 rm out/pcsx.pxml.templ
504 mv out/*.so out/plugins/
505 $(PND_MAKE) -p pcsx_rearmed_$(VER).pnd -d out -x out/pcsx.pxml -i frontend/pandora/pcsx.png -c
508 ifeq "$(PLATFORM)" "caanoo"
509 PLAT_CLEAN = caanoo_clean
512 $(RM) frontend/320240/pollux_set
514 rel: pcsx $(PLUGINS) \
515 frontend/320240/caanoo.gpe frontend/320240/pcsx26.png \
516 frontend/320240/pcsxb.png frontend/320240/skin \
517 frontend/warm/bin/warm_2.6.24.ko frontend/320240/pollux_set \
518 frontend/320240/pcsx_rearmed.ini frontend/320240/haptic_w.cfg \
519 frontend/320240/haptic_s.cfg \
522 mkdir -p out/pcsx_rearmed/plugins
523 cp -r $^ out/pcsx_rearmed/
524 mv out/pcsx_rearmed/*.so out/pcsx_rearmed/plugins/
525 mv out/pcsx_rearmed/caanoo.gpe out/pcsx_rearmed/pcsx.gpe
526 mv out/pcsx_rearmed/pcsx_rearmed.ini out/
527 mkdir out/pcsx_rearmed/lib/
528 cp ./lib/libbz2.so.1 out/pcsx_rearmed/lib/
529 mkdir out/pcsx_rearmed/bios/
530 cd out && zip -9 -r ../pcsx_rearmed_$(VER)_caanoo.zip *