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