Make advanced gpu options target actual gpu plugin used
[pcsx_rearmed.git] / Makefile
index 98498c8..06e4fcc 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -136,17 +136,20 @@ endif
 # builtin gpu
 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 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
 plugins/gpu_neon/psx_gpu_if.o: plugins/gpu_neon/psx_gpu/*.c
 endif
 ifeq "$(BUILTIN_GPU)" "peops"
+CFLAGS += -DGPU_PEOPS
 # note: code is not safe for strict-aliasing? (Castlevania problems)
 plugins/dfxvideo/gpulib_if.o: CFLAGS += -fno-strict-aliasing
 plugins/dfxvideo/gpulib_if.o: plugins/dfxvideo/prim.c plugins/dfxvideo/soft.c
 OBJS += plugins/dfxvideo/gpulib_if.o
 endif
 ifeq "$(BUILTIN_GPU)" "unai"
+CFLAGS += -DGPU_UNAI
 OBJS += plugins/gpu_unai/gpulib_if.o
 ifeq "$(ARCH)" "arm"
 OBJS += plugins/gpu_unai/gpu_arm.o
@@ -159,6 +162,7 @@ endif
 OBJS += plugins/cdrcimg/cdrcimg.o
 
 # libchdr
+ifeq "$(HAVE_CHD)" "1"
 CFLAGS += -Ideps/libchdr
 OBJS += deps/crypto/md5.o
 OBJS += deps/crypto/sha1.o
@@ -202,14 +206,16 @@ OBJS += deps/libchdr/flac.o
 OBJS += deps/libchdr/huffman.o
 
 ifneq (,$(findstring win,$(platform)))
+  CFLAGS += -DHAVE_FSEEKO
   OBJS += deps/flac-1.3.2/src/libFLAC/windows_unicode_filenames.o
 else
   CFLAGS += -DHAVE_SYS_PARAM_H
 endif
 
 CFLAGS += -Ideps/crypto -Ideps/flac-1.3.2/include -Ideps/flac-1.3.2/src/libFLAC/include -Ideps/flac-1.3.2/src/libFLAC/include -Ideps/lzma-16.04/C
-CFLAGS += -D'PACKAGE_VERSION="1.3.2"' -DFLAC__HAS_OGG=0 -DFLAC__NO_DLL -DHAVE_LROUND -DHAVE_STDINT_H -DHAVE_STDLIB_H -DFLAC__NO_DLL -D_7ZIP_ST
+CFLAGS += -DHAVE_CHD -D'PACKAGE_VERSION="1.3.2"' -DFLAC__HAS_OGG=0 -DFLAC__NO_DLL -DHAVE_LROUND -DHAVE_STDINT_H -DHAVE_STDLIB_H -DFLAC__NO_DLL -D_7ZIP_ST
 LDFLAGS += -lm
+endif
 
 # dfinput
 OBJS += plugins/dfinput/main.o plugins/dfinput/pad.o plugins/dfinput/guncon.o
@@ -271,6 +277,7 @@ LDFLAGS += `pkg-config --libs glib-2.0 libosso dbus-1 hildon-fm-2`
 endif
 ifeq "$(PLATFORM)" "libretro"
 OBJS += frontend/libretro.o
+CFLAGS += -Ilibretro-common/include
 CFLAGS += -DFRONTEND_SUPPORTS_RGB565
 CFLAGS += -DHAVE_LIBRETRO
 
@@ -334,13 +341,11 @@ frontend/revision.h: FORCE
 target_: $(TARGET)
 
 $(TARGET): $(OBJS)
-       @echo "** BUILDING $(TARGET) FOR PLATFORM $(PLATFORM) **"
 ifeq ($(STATIC_LINKING), 1)
        $(AR) rcs $@ $(OBJS)
 else
        $(CC_LINK) -o $@ $^ $(LDFLAGS) $(LDLIBS) $(EXTRA_LDFLAGS)
 endif
-       @echo "** BUILD SUCCESSFUL! GG NO RE **"
 
 clean: $(PLAT_CLEAN) clean_plugins
        $(RM) $(TARGET) $(OBJS) $(TARGET).map frontend/revision.h