Merge pull request #545 from gameblabla/icache_emulation
[pcsx_rearmed.git] / Makefile
CommitLineData
4132e8ca 1# Makefile for PCSX ReARMed
a80ae4a0 2
61bc6d40 3# default stuff goes here, so that config can override
9aff1963 4TARGET ?= pcsx
9b400da1 5CFLAGS += -Wall -Iinclude -ffast-math
6ifeq ($(DEBUG), 1)
0f97d2d8 7CFLAGS += -O0 -ggdb
9b400da1 8else
eca6163f 9ifeq ($(platform), $(filter $(platform), vita ctr))
30373936 10CFLAGS += -O3 -DNDEBUG
73081f23 11else
cfbd3c6e 12CFLAGS += -O2 -DNDEBUG
b60f2812 13endif
73081f23 14endif
61bc6d40 15CXXFLAGS += $(CFLAGS)
4132e8ca 16#DRC_DBG = 1
17#PCNT = 1
80c2304e 18
9361a5aa
EC
19# Suppress minor warnings for dependencies
20deps/%: CFLAGS += -Wno-unused -Wno-unused-function
21
38c2028e 22all: config.mak target_ plugins_
de38f20e 23
9aff1963 24ifndef NO_CONFIG_MAK
4132e8ca 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
9aff1963 35else # NO_CONFIG_MAK
36config.mak:
37endif
38
4132e8ca 39-include Makefile.local
80c2304e 40
9aff1963 41CC_LINK ?= $(CC)
42CC_AS ?= $(CC)
22fa3f2b 43LDFLAGS += $(MAIN_LDFLAGS)
9aff1963 44EXTRA_LDFLAGS ?= -Wl,-Map=$@.map
07c13dfd 45LDLIBS += $(MAIN_LDLIBS)
e0aec5ee 46ifdef PCNT
47CFLAGS += -DPCNT
48endif
61bc6d40 49
80c2304e 50# core
11a43034 51OBJS += libpcsxcore/cdriso.o libpcsxcore/cdrom.o libpcsxcore/cheat.o \
52 libpcsxcore/decode_xa.o libpcsxcore/mdec.o \
80c2304e 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 \
11a43034 56 libpcsxcore/sio.o libpcsxcore/spu.o
59774ed0 57OBJS += libpcsxcore/gte.o libpcsxcore/gte_nf.o libpcsxcore/gte_divider.o
11a43034 58
59ifeq ($(DEBUG), 1)
60OBJS += libpcsxcore/debug.o libpcsxcore/socket.o libpcsxcore/disr3000a.o
61endif
62
7795edd6 63ifeq ($(WANT_ZLIB),1)
f07738df 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
7795edd6 80endif
59774ed0 81ifeq "$(ARCH)" "arm"
82OBJS += libpcsxcore/gte_arm.o
83endif
a80ae4a0 84ifeq "$(HAVE_NEON)" "1"
8cfbda97 85OBJS += libpcsxcore/gte_neon.o
86endif
305c8c93 87libpcsxcore/psxbios.o: CFLAGS += -Wno-nonnull
ab948f7e 88
f95a77f7 89# dynarec
6f1edc3c
PC
90ifeq "$(DYNAREC)" "lightrec"
91CFLAGS += -Ideps/lightning/include -Ideps/lightrec \
1532f1b1 92 -DLIGHTREC -DLIGHTREC_STATIC
6f1edc3c
PC
93OBJS += libpcsxcore/lightrec/plugin.o
94OBJS += deps/lightning/lib/jit_disasm.o \
95 deps/lightning/lib/jit_memory.o \
96 deps/lightning/lib/jit_names.o \
97 deps/lightning/lib/jit_note.o \
98 deps/lightning/lib/jit_print.o \
99 deps/lightning/lib/jit_size.o \
100 deps/lightning/lib/lightning.o \
101 deps/lightrec/blockcache.o \
102 deps/lightrec/disassembler.o \
103 deps/lightrec/emitter.o \
104 deps/lightrec/interpreter.o \
105 deps/lightrec/lightrec.o \
106 deps/lightrec/memmanager.o \
107 deps/lightrec/optimizer.o \
108 deps/lightrec/regcache.o \
6b02f240 109 deps/lightrec/recompiler.o \
110 deps/lightrec/reaper.o
6f1edc3c 111ifeq ($(MMAP_WIN32),1)
1532f1b1 112CFLAGS += -Ideps/mman
6f1edc3c
PC
113OBJS += deps/mman/mman.o
114endif
115else ifeq "$(DYNAREC)" "ari64"
87cc59de 116CFLAGS += -DNEW_DYNAREC
6f1edc3c
PC
117OBJS += libpcsxcore/new_dynarec/backends/psx/emu_if.o \
118 libpcsxcore/new_dynarec/new_dynarec.o \
119 libpcsxcore/new_dynarec/arm/linkage_arm.o \
120 libpcsxcore/new_dynarec/backends/psx/pcsxmem.o
121libpcsxcore/new_dynarec/new_dynarec.o: libpcsxcore/new_dynarec/arm/assem_arm.c \
122 libpcsxcore/new_dynarec/backends/psx/pcsxmem_inline.c
448bbcae 123else
b2627e51 124OBJS += libpcsxcore/new_dynarec/backends/psx/emu_if.o
6f173b35 125libpcsxcore/new_dynarec/backends/psx/emu_if.o: CFLAGS += -DDRC_DISABLE
48f615ba 126frontend/libretro.o: CFLAGS += -DDRC_DISABLE
7139f3c8 127endif
3eb78778 128ifdef DRC_DBG
6f173b35 129libpcsxcore/new_dynarec/backends/psx/emu_if.o: CFLAGS += -D_FILE_OFFSET_BITS=64
3eb78778 130CFLAGS += -DDRC_DBG
131endif
4132e8ca 132ifeq "$(DRC_CACHE_BASE)" "1"
133libpcsxcore/new_dynarec/%.o: CFLAGS += -DBASE_ADDR_FIXED=1
6f173b35 134libpcsxcore/new_dynarec/backends/psx/%.o: CFLAGS += -DBASE_ADDR_FIXED=1
135libpcsxcore/new_dynarec/arm/%.o: CFLAGS += -DBASE_ADDR_FIXED=1
a327ad27 136endif
f95a77f7 137
e906c010 138# spu
ee849648 139OBJS += plugins/dfsound/dma.o plugins/dfsound/freeze.o \
07c13dfd 140 plugins/dfsound/registers.o plugins/dfsound/spu.o \
141 plugins/dfsound/out.o plugins/dfsound/nullsnd.o
6d866bb7 142plugins/dfsound/spu.o: plugins/dfsound/adsr.c plugins/dfsound/reverb.c \
143 plugins/dfsound/xa.c
3a721c1f 144ifeq "$(ARCH)" "arm"
b17618c0 145OBJS += plugins/dfsound/arm_utils.o
146endif
5514a050 147ifeq "$(HAVE_C64_TOOLS)" "1"
148plugins/dfsound/spu.o: CFLAGS += -DC64X_DSP
149plugins/dfsound/spu.o: plugins/dfsound/spu_c64x.c
8886a808 150frontend/menu.o: CFLAGS += -DC64X_DSP
5514a050 151endif
07c13dfd 152ifneq ($(findstring oss,$(SOUND_DRIVERS)),)
153plugins/dfsound/out.o: CFLAGS += -DHAVE_OSS
de38f20e 154OBJS += plugins/dfsound/oss.o
155endif
07c13dfd 156ifneq ($(findstring alsa,$(SOUND_DRIVERS)),)
157plugins/dfsound/out.o: CFLAGS += -DHAVE_ALSA
de38f20e 158OBJS += plugins/dfsound/alsa.o
4132e8ca 159LDLIBS += -lasound
160endif
07c13dfd 161ifneq ($(findstring sdl,$(SOUND_DRIVERS)),)
162plugins/dfsound/out.o: CFLAGS += -DHAVE_SDL
d8a2f79b 163OBJS += plugins/dfsound/sdl.o
164endif
07c13dfd 165ifneq ($(findstring pulseaudio,$(SOUND_DRIVERS)),)
166plugins/dfsound/out.o: CFLAGS += -DHAVE_PULSE
167OBJS += plugins/dfsound/pulseaudio.o
168endif
169ifneq ($(findstring libretro,$(SOUND_DRIVERS)),)
170plugins/dfsound/out.o: CFLAGS += -DHAVE_LIBRETRO
de38f20e 171endif
172
61bc6d40 173# builtin gpu
174OBJS += plugins/gpulib/gpu.o plugins/gpulib/vout_pl.o
61bc6d40 175ifeq "$(BUILTIN_GPU)" "neon"
2d17de26 176CFLAGS += -DGPU_NEON
1fce6ce8 177OBJS += plugins/gpu_neon/psx_gpu_if.o
178ifeq "$(HAVE_NEON)" "1"
179OBJS += plugins/gpu_neon/psx_gpu/psx_gpu_arm_neon.o
90ca4913 180plugins/gpu_neon/psx_gpu_if.o: CFLAGS += -DNEON_BUILD -DTEXTURE_CACHE_4BPP -DTEXTURE_CACHE_8BPP
1fce6ce8 181else
182plugins/gpu_neon/psx_gpu_if.o: CFLAGS += -DTEXTURE_CACHE_4BPP -DTEXTURE_CACHE_8BPP
183endif
90ca4913 184plugins/gpu_neon/psx_gpu_if.o: plugins/gpu_neon/psx_gpu/*.c
61bc6d40 185endif
186ifeq "$(BUILTIN_GPU)" "peops"
2d17de26 187CFLAGS += -DGPU_PEOPS
2ef486ee 188# note: code is not safe for strict-aliasing? (Castlevania problems)
62d7fa95 189plugins/dfxvideo/gpulib_if.o: CFLAGS += -fno-strict-aliasing
190plugins/dfxvideo/gpulib_if.o: plugins/dfxvideo/prim.c plugins/dfxvideo/soft.c
191OBJS += plugins/dfxvideo/gpulib_if.o
8105c29f
JW
192ifeq "$(THREAD_RENDERING)" "1"
193CFLAGS += -DTHREAD_RENDERING
194OBJS += plugins/gpulib/gpulib_thread_if.o
195endif
90ca4913 196endif
61bc6d40 197ifeq "$(BUILTIN_GPU)" "unai"
2d17de26 198CFLAGS += -DGPU_UNAI
030d1121 199CFLAGS += -DUSE_GPULIB=1
200#CFLAGS += -DINLINE="static __inline__"
201#CFLAGS += -Dasm="__asm__ __volatile__"
61bc6d40 202OBJS += plugins/gpu_unai/gpulib_if.o
203ifeq "$(ARCH)" "arm"
204OBJS += plugins/gpu_unai/gpu_arm.o
205endif
a903b131
JW
206ifeq "$(THREAD_RENDERING)" "1"
207CFLAGS += -DTHREAD_RENDERING
208OBJS += plugins/gpulib/gpulib_thread_if.o
209endif
8105c29f
JW
210plugins/gpu_unai/gpulib_if.o: CFLAGS += -DREARMED -O3
211CC_LINK = $(CXX)
212endif
e0c692d9 213
47bf65ab 214# cdrcimg
47bf65ab 215OBJS += plugins/cdrcimg/cdrcimg.o
e906c010 216
ce188d4d 217# libchdr
b0ec2e6d 218ifeq "$(HAVE_CHD)" "1"
2ff0b512 219CFLAGS += -Ideps/libchdr/include
220CFLAGS += -Ideps/libchdr/include/libchdr
f07738df 221OBJS += deps/libchdr/deps/lzma-19.00/src/Alloc.o
222OBJS += deps/libchdr/deps/lzma-19.00/src/Bra86.o
223OBJS += deps/libchdr/deps/lzma-19.00/src/BraIA64.o
224OBJS += deps/libchdr/deps/lzma-19.00/src/CpuArch.o
225OBJS += deps/libchdr/deps/lzma-19.00/src/Delta.o
226OBJS += deps/libchdr/deps/lzma-19.00/src/LzFind.o
227OBJS += deps/libchdr/deps/lzma-19.00/src/Lzma86Dec.o
228OBJS += deps/libchdr/deps/lzma-19.00/src/LzmaDec.o
229OBJS += deps/libchdr/deps/lzma-19.00/src/LzmaEnc.o
230OBJS += deps/libchdr/deps/lzma-19.00/src/Sort.o
2ff0b512 231OBJS += deps/libchdr/src/libchdr_bitstream.o
232OBJS += deps/libchdr/src/libchdr_cdrom.o
233OBJS += deps/libchdr/src/libchdr_chd.o
234OBJS += deps/libchdr/src/libchdr_flac.o
235OBJS += deps/libchdr/src/libchdr_huffman.o
f07738df 236CFLAGS += -Ideps/libchdr/deps/lzma-19.00/include
2ff0b512 237CFLAGS += -DHAVE_CHD -D_7ZIP_ST
ce188d4d 238LDFLAGS += -lm
b0ec2e6d 239endif
ce188d4d 240
384f5f43 241# dfinput
8b9b4c9f 242ifneq "$(PLATFORM)" "libretro"
4c08b9e7 243OBJS += plugins/dfinput/main.o plugins/dfinput/pad.o plugins/dfinput/guncon.o
8b9b4c9f 244endif
384f5f43 245
cc56203b 246# frontend/gui
c82f907a 247OBJS += frontend/cspace.o
248ifeq "$(HAVE_NEON)" "1"
249OBJS += frontend/cspace_neon.o
d57557c0 250else
251ifeq "$(ARCH)" "arm"
252OBJS += frontend/cspace_arm.o
253endif
c82f907a 254endif
255
4132e8ca 256ifeq "$(PLATFORM)" "generic"
5b9aa749 257OBJS += frontend/libpicofe/in_sdl.o
258OBJS += frontend/libpicofe/plat_sdl.o
cc56203b 259OBJS += frontend/libpicofe/plat_dummy.o
260OBJS += frontend/libpicofe/linux/in_evdev.o
5b9aa749 261OBJS += frontend/plat_sdl.o
262ifeq "$(HAVE_GLES)" "1"
2c616080 263OBJS += frontend/libpicofe/gl.o frontend/libpicofe/gl_platform.o
5b9aa749 264LDLIBS += $(LDLIBS_GLES)
265frontend/libpicofe/plat_sdl.o: CFLAGS += -DHAVE_GLES $(CFLAGS_GLES)
2c616080 266frontend/libpicofe/gl_platform.o: CFLAGS += -DHAVE_GLES $(CFLAGS_GLES)
5b9aa749 267frontend/libpicofe/gl.o: CFLAGS += -DHAVE_GLES $(CFLAGS_GLES)
268frontend/plat_sdl.o: CFLAGS += -DHAVE_GLES $(CFLAGS_GLES)
269endif
cc56203b 270USE_PLUGIN_LIB = 1
38c2028e 271USE_FRONTEND = 1
4132e8ca 272endif
55b0eeea 273ifeq "$(PLATFORM)" "pandora"
cc56203b 274OBJS += frontend/libpicofe/pandora/plat.o
275OBJS += frontend/libpicofe/linux/fbdev.o frontend/libpicofe/linux/xenv.o
276OBJS += frontend/libpicofe/linux/in_evdev.o
277OBJS += frontend/plat_pandora.o frontend/plat_omap.o
da710571 278frontend/main.o frontend/menu.o: CFLAGS += -include frontend/pandora/ui_feat.h
3aba4185 279frontend/libpicofe/linux/plat.o: CFLAGS += -DPANDORA
cc56203b 280USE_PLUGIN_LIB = 1
38c2028e 281USE_FRONTEND = 1
4132e8ca 282endif
55b0eeea 283ifeq "$(PLATFORM)" "caanoo"
cc56203b 284OBJS += frontend/libpicofe/gp2x/in_gp2x.o frontend/warm/warm.o
285OBJS += frontend/libpicofe/gp2x/soc_pollux.o
286OBJS += frontend/libpicofe/linux/in_evdev.o
faf2b2aa 287OBJS += frontend/plat_pollux.o frontend/in_tsbutton.o frontend/blit320.o
da710571 288frontend/main.o frontend/menu.o: CFLAGS += -include frontend/320240/ui_gp2x.h
cc56203b 289USE_PLUGIN_LIB = 1
38c2028e 290USE_FRONTEND = 1
291endif
292ifeq "$(PLATFORM)" "maemo"
baaef67b 293OBJS += maemo/hildon.o maemo/main.o maemo/maemo_xkb.o frontend/pl_gun_ts.o
38c2028e 294maemo/%.o: maemo/%.c
cc56203b 295USE_PLUGIN_LIB = 1
a76fd953 296LDFLAGS += $(shell pkg-config --libs hildon-1 libpulse)
7010034e 297CFLAGS += $(shell pkg-config --cflags hildon-1) -DHAVE_TSLIB
a76fd953
PI
298CFLAGS += `pkg-config --cflags glib-2.0 libosso dbus-1 hildon-fm-2`
299LDFLAGS += `pkg-config --libs glib-2.0 libosso dbus-1 hildon-fm-2`
38c2028e 300endif
301ifeq "$(PLATFORM)" "libretro"
226a5691 302ifeq "$(USE_LIBRETRO_VFS)" "1"
303OBJS += libretro-common/compat/compat_posix_string.o
270c6dd1 304OBJS += libretro-common/compat/fopen_utf8.o
07a88422 305OBJS += libretro-common/encodings/compat_strl.o
306OBJS += libretro-common/encodings/encoding_utf.o
226a5691 307OBJS += libretro-common/file/file_path.o
308OBJS += libretro-common/streams/file_stream.o
309OBJS += libretro-common/streams/file_stream_transforms.o
310OBJS += libretro-common/string/stdstring.o
311OBJS += libretro-common/time/rtime.o
312OBJS += libretro-common/vfs/vfs_implementation.o
313CFLAGS += -DUSE_LIBRETRO_VFS
314endif
7a811716 315ifeq "$(ENABLE_ICACHE_EMULATION)" "1"
316CFLAGS += -DICACHE_EMULATION
317endif
38c2028e 318OBJS += frontend/libretro.o
919cac88 319CFLAGS += -Ilibretro-common/include
46aa5b98 320CFLAGS += -DFRONTEND_SUPPORTS_RGB565
f40e483e 321CFLAGS += -DHAVE_LIBRETRO
ce0e7ac9 322
6f1edc3c 323ifneq ($(DYNAREC),lightrec)
ce0e7ac9 324ifeq ($(MMAP_WIN32),1)
325OBJS += libpcsxcore/memmap_win32.o
326endif
38c2028e 327endif
6f1edc3c 328endif
cc56203b 329
330ifeq "$(USE_PLUGIN_LIB)" "1"
38c2028e 331OBJS += frontend/plugin_lib.o
cc56203b 332OBJS += frontend/libpicofe/linux/plat.o
333OBJS += frontend/libpicofe/readpng.o frontend/libpicofe/fonts.o
334ifeq "$(HAVE_NEON)" "1"
335OBJS += frontend/libpicofe/arm/neon_scale2x.o
336OBJS += frontend/libpicofe/arm/neon_eagle2x.o
337frontend/libpicofe/arm/neon_scale2x.o: CFLAGS += -DDO_BGR_TO_RGB
338frontend/libpicofe/arm/neon_eagle2x.o: CFLAGS += -DDO_BGR_TO_RGB
339endif
340endif
341ifeq "$(USE_FRONTEND)" "1"
342OBJS += frontend/menu.o
343OBJS += frontend/libpicofe/input.o
344frontend/menu.o: frontend/libpicofe/menu.c
38c2028e 345ifeq "$(HAVE_TSLIB)" "1"
346frontend/%.o: CFLAGS += -DHAVE_TSLIB
347OBJS += frontend/pl_gun_ts.o
348endif
349else
350CFLAGS += -DNO_FRONTEND
55b0eeea 351endif
a80ae4a0 352
cc56203b 353# misc
354OBJS += frontend/main.o frontend/plugin.o
355
e0aec5ee 356
a1a232ad 357frontend/menu.o frontend/main.o: frontend/revision.h
358frontend/plat_sdl.o frontend/libretro.o: frontend/revision.h
3c70c47b 359
cc56203b 360frontend/libpicofe/%.c:
fa56d360 361 @echo "libpicofe module is missing, please run:"
362 @echo "git submodule init && git submodule update"
363 @exit 1
364
59774ed0 365libpcsxcore/gte_nf.o: libpcsxcore/gte.c
366 $(CC) -c -o $@ $^ $(CFLAGS) -DFLAGLESS
367
3c70c47b 368frontend/revision.h: FORCE
369 @(git describe || echo) | sed -e 's/.*/#define REV "\0"/' > $@_
370 @diff -q $@_ $@ > /dev/null 2>&1 || cp $@_ $@
371 @rm $@_
3c70c47b 372
90ca4913 373%.o: %.S
9aff1963 374 $(CC_AS) $(CFLAGS) -c $^ -o $@
80c2304e 375
fc99395c 376%.o: %.cpp
377 $(CXX) $(CXXFLAGS) -c -o $@ $<
378
7795edd6
JAS
379%.o: %.c
380 $(CC) $(CFLAGS) -c -o $@ $<
e0aec5ee 381
38c2028e 382target_: $(TARGET)
383
80c2304e 384$(TARGET): $(OBJS)
fc99395c 385ifeq ($(STATIC_LINKING), 1)
386 $(AR) rcs $@ $(OBJS)
387else
9aff1963 388 $(CC_LINK) -o $@ $^ $(LDFLAGS) $(LDLIBS) $(EXTRA_LDFLAGS)
fc99395c 389endif
80c2304e 390
dd4d5a35 391clean: $(PLAT_CLEAN) clean_plugins
a1a232ad 392 $(RM) $(TARGET) $(OBJS) $(TARGET).map frontend/revision.h
0d464c77 393
4132e8ca 394ifneq ($(PLUGINS),)
dd4d5a35 395plugins_: $(PLUGINS)
396
ee78346e 397$(PLUGINS):
398 make -C $(dir $@)
f932e54b 399
ee78346e 400clean_plugins:
ea1f6f2f 401 make -C plugins/gpulib/ clean
ee78346e 402 for dir in $(PLUGINS) ; do \
403 $(MAKE) -C $$(dirname $$dir) clean; done
dd4d5a35 404else
405plugins_:
406clean_plugins:
4132e8ca 407endif
80c2304e 408
fa56d360 409.PHONY: all clean target_ plugins_ clean_plugins FORCE
410
303ee308 411# ----------- release -----------
412
cd5abe38 413VER ?= $(shell git describe HEAD)
4132e8ca 414
dd4d5a35 415ifeq "$(PLATFORM)" "generic"
416OUT = pcsx_rearmed_$(VER)
417
418rel: pcsx $(PLUGINS) \
419 frontend/pandora/skin readme.txt COPYING
420 rm -rf $(OUT)
421 mkdir -p $(OUT)/plugins
422 mkdir -p $(OUT)/bios
423 cp -r $^ $(OUT)/
424 mv $(OUT)/*.so* $(OUT)/plugins/
425 zip -9 -r $(OUT).zip $(OUT)
426endif
427
4132e8ca 428ifeq "$(PLATFORM)" "pandora"
303ee308 429PND_MAKE ?= $(HOME)/dev/pnd/src/pandora-libraries/testdata/scripts/pnd_make.sh
430
8886a808 431rel: pcsx plugins/dfsound/pcsxr_spu_area3.out $(PLUGINS) \
9e0630ab 432 frontend/pandora/pcsx.sh frontend/pandora/pcsx.pxml.templ frontend/pandora/pcsx.png \
433 frontend/pandora/picorestore frontend/pandora/skin readme.txt COPYING
303ee308 434 rm -rf out
bbd837c6 435 mkdir -p out/plugins
303ee308 436 cp -r $^ out/
3938f69a 437 sed -e 's/%PR%/$(VER)/g' out/pcsx.pxml.templ > out/pcsx.pxml
438 rm out/pcsx.pxml.templ
bbd837c6 439 mv out/*.so out/plugins/
9e0630ab 440 $(PND_MAKE) -p pcsx_rearmed_$(VER).pnd -d out -x out/pcsx.pxml -i frontend/pandora/pcsx.png -c
4132e8ca 441endif
442
443ifeq "$(PLATFORM)" "caanoo"
444PLAT_CLEAN = caanoo_clean
445
446caanoo_clean:
447 $(RM) frontend/320240/pollux_set
448
4132e8ca 449rel: pcsx $(PLUGINS) \
450 frontend/320240/caanoo.gpe frontend/320240/pcsx26.png \
451 frontend/320240/pcsxb.png frontend/320240/skin \
452 frontend/warm/bin/warm_2.6.24.ko frontend/320240/pollux_set \
453 frontend/320240/pcsx_rearmed.ini frontend/320240/haptic_w.cfg \
454 frontend/320240/haptic_s.cfg \
455 readme.txt COPYING
456 rm -rf out
457 mkdir -p out/pcsx_rearmed/plugins
458 cp -r $^ out/pcsx_rearmed/
4132e8ca 459 mv out/pcsx_rearmed/*.so out/pcsx_rearmed/plugins/
460 mv out/pcsx_rearmed/caanoo.gpe out/pcsx_rearmed/pcsx.gpe
461 mv out/pcsx_rearmed/pcsx_rearmed.ini out/
462 mkdir out/pcsx_rearmed/lib/
463 cp ./lib/libbz2.so.1 out/pcsx_rearmed/lib/
464 mkdir out/pcsx_rearmed/bios/
465 cd out && zip -9 -r ../pcsx_rearmed_$(VER)_caanoo.zip *
466endif