X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=Makefile;h=e694818dbedec5b52044c8f4816654db6c7256ed;hb=f4c049fddb2613c5837db83daa2babb3fdf78f70;hp=3d718268f7bda656024f23a29a851bb3f75184fc;hpb=226a5691296bfb4f22d916348821b0eed6399a89;p=pcsx_rearmed.git diff --git a/Makefile b/Makefile index 3d718268..e694818d 100644 --- a/Makefile +++ b/Makefile @@ -16,6 +16,9 @@ CXXFLAGS += $(CFLAGS) #DRC_DBG = 1 #PCNT = 1 +# Suppress minor warnings for dependencies +deps/%: CFLAGS += -Wno-unused -Wno-unused-function + all: config.mak target_ plugins_ ifndef NO_CONFIG_MAK @@ -45,13 +48,18 @@ CFLAGS += -DPCNT endif # core -OBJS += libpcsxcore/cdriso.o libpcsxcore/cdrom.o libpcsxcore/cheat.o libpcsxcore/debug.o \ - libpcsxcore/decode_xa.o libpcsxcore/disr3000a.o libpcsxcore/mdec.o \ +OBJS += libpcsxcore/cdriso.o libpcsxcore/cdrom.o libpcsxcore/cheat.o libpcsxcore/database.o \ + libpcsxcore/decode_xa.o libpcsxcore/mdec.o \ libpcsxcore/misc.o libpcsxcore/plugins.o libpcsxcore/ppf.o libpcsxcore/psxbios.o \ libpcsxcore/psxcommon.o libpcsxcore/psxcounters.o libpcsxcore/psxdma.o libpcsxcore/psxhle.o \ libpcsxcore/psxhw.o libpcsxcore/psxinterpreter.o libpcsxcore/psxmem.o libpcsxcore/r3000a.o \ - libpcsxcore/sio.o libpcsxcore/socket.o libpcsxcore/spu.o + libpcsxcore/sio.o libpcsxcore/spu.o OBJS += libpcsxcore/gte.o libpcsxcore/gte_nf.o libpcsxcore/gte_divider.o + +ifeq ($(DEBUG), 1) +#OBJS += libpcsxcore/debug.o libpcsxcore/socket.o libpcsxcore/disr3000a.o +endif + ifeq ($(WANT_ZLIB),1) CFLAGS += -Ideps/libchdr/deps/zlib-1.2.11 OBJS += deps/libchdr/deps/zlib-1.2.11/adler32.o \ @@ -73,15 +81,29 @@ endif ifeq "$(ARCH)" "arm" OBJS += libpcsxcore/gte_arm.o endif -ifeq "$(HAVE_NEON)" "1" +ifeq "$(HAVE_NEON_ASM)" "1" OBJS += libpcsxcore/gte_neon.o endif libpcsxcore/psxbios.o: CFLAGS += -Wno-nonnull # dynarec ifeq "$(DYNAREC)" "lightrec" -CFLAGS += -Ideps/lightning/include -Ideps/lightrec \ +CFLAGS += -Ideps/lightning/include -Ideps/lightrec -Iinclude/lightning -Iinclude/lightrec \ -DLIGHTREC -DLIGHTREC_STATIC +LIGHTREC_CUSTOM_MAP ?= 0 +LIGHTREC_THREADED_COMPILER ?= 0 +CFLAGS += -DLIGHTREC_CUSTOM_MAP=$(LIGHTREC_CUSTOM_MAP) \ + -DLIGHTREC_ENABLE_THREADED_COMPILER=$(LIGHTREC_THREADED_COMPILER) +deps/lightning/lib/%.o: CFLAGS += -DHAVE_MMAP +ifeq ($(LIGHTREC_CUSTOM_MAP),1) +LDLIBS += -lrt +OBJS += libpcsxcore/lightrec/mem.o +endif +ifeq ($(LIGHTREC_THREADED_COMPILER),1) +OBJS += deps/lightrec/recompiler.o \ + deps/lightrec/reaper.o +endif +OBJS += deps/lightrec/tlsf/tlsf.o OBJS += libpcsxcore/lightrec/plugin.o OBJS += deps/lightning/lib/jit_disasm.o \ deps/lightning/lib/jit_memory.o \ @@ -97,34 +119,35 @@ OBJS += deps/lightning/lib/jit_disasm.o \ deps/lightrec/lightrec.o \ deps/lightrec/memmanager.o \ deps/lightrec/optimizer.o \ - deps/lightrec/regcache.o \ - deps/lightrec/recompiler.o \ - deps/lightrec/reaper.o + deps/lightrec/regcache.o +libpcsxcore/lightrec/mem.o: CFLAGS += -D_GNU_SOURCE ifeq ($(MMAP_WIN32),1) -CFLAGS += -Ideps/mman +CFLAGS += -Iinclude/mman -I deps/mman OBJS += deps/mman/mman.o endif else ifeq "$(DYNAREC)" "ari64" -CFLAGS += -DNEW_DYNAREC -OBJS += libpcsxcore/new_dynarec/backends/psx/emu_if.o \ - libpcsxcore/new_dynarec/new_dynarec.o \ - libpcsxcore/new_dynarec/arm/linkage_arm.o \ - libpcsxcore/new_dynarec/backends/psx/pcsxmem.o -libpcsxcore/new_dynarec/new_dynarec.o: libpcsxcore/new_dynarec/arm/assem_arm.c \ - libpcsxcore/new_dynarec/backends/psx/pcsxmem_inline.c +OBJS += libpcsxcore/new_dynarec/new_dynarec.o +OBJS += libpcsxcore/new_dynarec/pcsxmem.o + ifeq "$(ARCH)" "arm" + OBJS += libpcsxcore/new_dynarec/linkage_arm.o + libpcsxcore/new_dynarec/new_dynarec.o: libpcsxcore/new_dynarec/assem_arm.c + else ifneq (,$(findstring $(ARCH),aarch64 arm64)) + OBJS += libpcsxcore/new_dynarec/linkage_arm64.o + libpcsxcore/new_dynarec/new_dynarec.o: libpcsxcore/new_dynarec/assem_arm64.c + else + $(error no dynarec support for architecture $(ARCH)) + endif else -OBJS += libpcsxcore/new_dynarec/backends/psx/emu_if.o -libpcsxcore/new_dynarec/backends/psx/emu_if.o: CFLAGS += -DDRC_DISABLE -frontend/libretro.o: CFLAGS += -DDRC_DISABLE +CFLAGS += -DDRC_DISABLE endif +OBJS += libpcsxcore/new_dynarec/emu_if.o +libpcsxcore/new_dynarec/new_dynarec.o: libpcsxcore/new_dynarec/pcsxmem_inline.c ifdef DRC_DBG -libpcsxcore/new_dynarec/backends/psx/emu_if.o: CFLAGS += -D_FILE_OFFSET_BITS=64 +libpcsxcore/new_dynarec/emu_if.o: CFLAGS += -D_FILE_OFFSET_BITS=64 CFLAGS += -DDRC_DBG endif -ifeq "$(DRC_CACHE_BASE)" "1" -libpcsxcore/new_dynarec/%.o: CFLAGS += -DBASE_ADDR_FIXED=1 -libpcsxcore/new_dynarec/backends/psx/%.o: CFLAGS += -DBASE_ADDR_FIXED=1 -libpcsxcore/new_dynarec/arm/%.o: CFLAGS += -DBASE_ADDR_FIXED=1 +ifeq "$(BASE_ADDR_DYNAMIC)" "1" +libpcsxcore/new_dynarec/%.o: CFLAGS += -DBASE_ADDR_DYNAMIC=1 endif # spu @@ -167,13 +190,16 @@ OBJS += plugins/gpulib/gpu.o plugins/gpulib/vout_pl.o ifeq "$(BUILTIN_GPU)" "neon" CFLAGS += -DGPU_NEON OBJS += plugins/gpu_neon/psx_gpu_if.o -ifeq "$(HAVE_NEON)" "1" -OBJS += plugins/gpu_neon/psx_gpu/psx_gpu_arm_neon.o plugins/gpu_neon/psx_gpu_if.o: CFLAGS += -DNEON_BUILD -DTEXTURE_CACHE_4BPP -DTEXTURE_CACHE_8BPP -else -plugins/gpu_neon/psx_gpu_if.o: CFLAGS += -DTEXTURE_CACHE_4BPP -DTEXTURE_CACHE_8BPP -endif plugins/gpu_neon/psx_gpu_if.o: plugins/gpu_neon/psx_gpu/*.c +frontend/menu.o frontend/plugin_lib.o: CFLAGS += -DBUILTIN_GPU_NEON + ifeq "$(HAVE_NEON_ASM)" "1" + OBJS += plugins/gpu_neon/psx_gpu/psx_gpu_arm_neon.o + else + OBJS += plugins/gpu_neon/psx_gpu/psx_gpu_simd.o + plugins/gpu_neon/psx_gpu_if.o: CFLAGS += -DSIMD_BUILD + plugins/gpu_neon/psx_gpu/psx_gpu_simd.o: CFLAGS += -DSIMD_BUILD + endif endif ifeq "$(BUILTIN_GPU)" "peops" CFLAGS += -DGPU_PEOPS @@ -237,11 +263,13 @@ endif # frontend/gui OBJS += frontend/cspace.o -ifeq "$(HAVE_NEON)" "1" +ifeq "$(HAVE_NEON_ASM)" "1" OBJS += frontend/cspace_neon.o +frontend/cspace.o: CFLAGS += -DHAVE_bgr555_to_rgb565 -DHAVE_bgr888_to_x else ifeq "$(ARCH)" "arm" OBJS += frontend/cspace_arm.o +frontend/cspace.o: CFLAGS += -DHAVE_bgr555_to_rgb565 endif endif @@ -320,7 +348,8 @@ ifeq "$(USE_PLUGIN_LIB)" "1" OBJS += frontend/plugin_lib.o OBJS += frontend/libpicofe/linux/plat.o OBJS += frontend/libpicofe/readpng.o frontend/libpicofe/fonts.o -ifeq "$(HAVE_NEON)" "1" +frontend/libpicofe/linux/plat.o: CFLAGS += -DNO_HOME_DIR +ifeq "$(HAVE_NEON_ASM)" "1" OBJS += frontend/libpicofe/arm/neon_scale2x.o OBJS += frontend/libpicofe/arm/neon_eagle2x.o frontend/libpicofe/arm/neon_scale2x.o: CFLAGS += -DDO_BGR_TO_RGB @@ -355,7 +384,7 @@ libpcsxcore/gte_nf.o: libpcsxcore/gte.c $(CC) -c -o $@ $^ $(CFLAGS) -DFLAGLESS frontend/revision.h: FORCE - @(git describe || echo) | sed -e 's/.*/#define REV "\0"/' > $@_ + @(git describe --always || echo) | sed -e 's/.*/#define REV "\0"/' > $@_ @diff -q $@_ $@ > /dev/null 2>&1 || cp $@_ $@ @rm $@_ @@ -399,7 +428,7 @@ endif # ----------- release ----------- -VER ?= $(shell git describe HEAD) +VER ?= $(shell git describe --always HEAD) ifeq "$(PLATFORM)" "generic" OUT = pcsx_rearmed_$(VER)