mirror of
https://github.com/ekeeke/Genesis-Plus-GX.git
synced 2024-12-26 03:01:50 +01:00
commit
3bf08d48c2
@ -40,20 +40,29 @@ else ifneq ($(findstring MINGW,$(shell uname -a)),)
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
TARGET_NAME := genesis_plus_gx
|
TARGET_NAME := genesis_plus_gx
|
||||||
|
LIBM := -lm
|
||||||
|
|
||||||
# Unix
|
# Unix
|
||||||
ifeq ($(platform), unix)
|
ifeq ($(platform), unix)
|
||||||
TARGET := $(TARGET_NAME)_libretro.so
|
TARGET := $(TARGET_NAME)_libretro.so
|
||||||
fpic := -fPIC
|
fpic := -fPIC
|
||||||
SHARED := -shared -Wl,--version-script=libretro/link.T -Wl,--no-undefined -lz
|
SHARED := -shared -Wl,--version-script=libretro/link.T -Wl,--no-undefined
|
||||||
ENDIANNESS_DEFINES := -DLSB_FIRST -DBYTE_ORDER=LITTLE_ENDIAN
|
ENDIANNESS_DEFINES := -DLSB_FIRST -DBYTE_ORDER=LITTLE_ENDIAN
|
||||||
PLATFORM_DEFINES := -DHAVE_ZLIB
|
PLATFORM_DEFINES := -DHAVE_ZLIB
|
||||||
|
|
||||||
|
# Portable Linux
|
||||||
|
else ifeq ($(platform), linux-portable)
|
||||||
|
TARGET := $(TARGET_NAME)_libretro.so
|
||||||
|
fpic := -fPIC -nostdlib
|
||||||
|
SHARED := -shared -Wl,--version-script=libretro/link.T
|
||||||
|
ENDIANNESS_DEFINES := -DLSB_FIRST -DBYTE_ORDER=LITTLE_ENDIAN
|
||||||
|
PLATFORM_DEFINES := -DHAVE_ZLIB
|
||||||
|
LIBM :=
|
||||||
# OS X
|
# OS X
|
||||||
else ifeq ($(platform), osx)
|
else ifeq ($(platform), osx)
|
||||||
TARGET := $(TARGET_NAME)_libretro.dylib
|
TARGET := $(TARGET_NAME)_libretro.dylib
|
||||||
fpic := -fPIC
|
fpic := -fPIC
|
||||||
SHARED := -dynamiclib -lz
|
SHARED := -dynamiclib
|
||||||
ifeq ($(arch),ppc)
|
ifeq ($(arch),ppc)
|
||||||
ENDIANNESS_DEFINES := -DBYTE_ORDER=BIG_ENDIAN
|
ENDIANNESS_DEFINES := -DBYTE_ORDER=BIG_ENDIAN
|
||||||
else
|
else
|
||||||
@ -75,7 +84,7 @@ else ifeq ($(platform), osx)
|
|||||||
else ifeq ($(platform), ios)
|
else ifeq ($(platform), ios)
|
||||||
TARGET := $(TARGET_NAME)_libretro_ios.dylib
|
TARGET := $(TARGET_NAME)_libretro_ios.dylib
|
||||||
fpic := -fPIC
|
fpic := -fPIC
|
||||||
SHARED := -dynamiclib -lz
|
SHARED := -dynamiclib
|
||||||
ENDIANNESS_DEFINES := -DLSB_FIRST -DBYTE_ORDER=LITTLE_ENDIAN
|
ENDIANNESS_DEFINES := -DLSB_FIRST -DBYTE_ORDER=LITTLE_ENDIAN
|
||||||
PLATFORM_DEFINES := -DHAVE_ZLIB
|
PLATFORM_DEFINES := -DHAVE_ZLIB
|
||||||
|
|
||||||
@ -109,7 +118,7 @@ else ifeq ($(platform), theos_ios)
|
|||||||
else ifeq ($(platform), qnx)
|
else ifeq ($(platform), qnx)
|
||||||
TARGET := $(TARGET_NAME)_libretro_qnx.so
|
TARGET := $(TARGET_NAME)_libretro_qnx.so
|
||||||
fpic := -fPIC
|
fpic := -fPIC
|
||||||
SHARED := -lm -shared -Wl,--version-script=libretro/link.T -Wl,--no-undefined -lz
|
SHARED := -shared -Wl,--version-script=libretro/link.T -Wl,--no-undefined
|
||||||
ENDIANNESS_DEFINES := -DLSB_FIRST -DBYTE_ORDER=LITTLE_ENDIAN
|
ENDIANNESS_DEFINES := -DLSB_FIRST -DBYTE_ORDER=LITTLE_ENDIAN
|
||||||
PLATFORM_DEFINES := -DHAVE_ZLIB
|
PLATFORM_DEFINES := -DHAVE_ZLIB
|
||||||
CC = qcc -Vgcc_ntoarmv7le
|
CC = qcc -Vgcc_ntoarmv7le
|
||||||
@ -181,7 +190,7 @@ else ifeq ($(platform), wii)
|
|||||||
else ifneq (,$(findstring armv,$(platform)))
|
else ifneq (,$(findstring armv,$(platform)))
|
||||||
TARGET := $(TARGET_NAME)_libretro.so
|
TARGET := $(TARGET_NAME)_libretro.so
|
||||||
fpic := -fPIC
|
fpic := -fPIC
|
||||||
SHARED := -shared -Wl,--version-script=libretro/link.T -Wl,--no-undefined -lz
|
SHARED := -shared -Wl,--version-script=libretro/link.T -Wl,--no-undefined
|
||||||
ENDIANNESS_DEFINES := -DLSB_FIRST -DBYTE_ORDER=LITTLE_ENDIAN
|
ENDIANNESS_DEFINES := -DLSB_FIRST -DBYTE_ORDER=LITTLE_ENDIAN
|
||||||
PLATFORM_DEFINES := -DHAVE_ZLIB
|
PLATFORM_DEFINES := -DHAVE_ZLIB
|
||||||
ifneq (,$(findstring cortexa5,$(platform)))
|
ifneq (,$(findstring cortexa5,$(platform)))
|
||||||
@ -211,13 +220,15 @@ else ifeq ($(platform), emscripten)
|
|||||||
else
|
else
|
||||||
TARGET := $(TARGET_NAME)_libretro.dll
|
TARGET := $(TARGET_NAME)_libretro.dll
|
||||||
CC = gcc
|
CC = gcc
|
||||||
SHARED := -shared -static-libgcc -static-libstdc++ -Wl,--version-script=libretro/link.T -Wl,--no-undefined -lz
|
SHARED := -shared -static-libgcc -static-libstdc++ -Wl,--version-script=libretro/link.T -Wl,--no-undefined
|
||||||
|
|
||||||
ENDIANNESS_DEFINES := -DLSB_FIRST -DBYTE_ORDER=LITTLE_ENDIAN
|
ENDIANNESS_DEFINES := -DLSB_FIRST -DBYTE_ORDER=LITTLE_ENDIAN
|
||||||
PLATFORM_DEFINES := -DHAVE_ZLIB
|
PLATFORM_DEFINES := -DHAVE_ZLIB
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
LDFLAGS += $(LIBM)
|
||||||
|
|
||||||
ifeq ($(DEBUG), 1)
|
ifeq ($(DEBUG), 1)
|
||||||
CFLAGS += -O0 -g
|
CFLAGS += -O0 -g
|
||||||
else ifeq ($(platform),qnx)
|
else ifeq ($(platform),qnx)
|
||||||
@ -264,8 +275,6 @@ else
|
|||||||
LIBRETRO_CFLAGS += -DINLINE="static inline"
|
LIBRETRO_CFLAGS += -DINLINE="static inline"
|
||||||
endif
|
endif
|
||||||
|
|
||||||
LIBRETRO_LIBS := -lm
|
|
||||||
|
|
||||||
ifeq ($(platform), theos_ios)
|
ifeq ($(platform), theos_ios)
|
||||||
COMMON_FLAGS := $(COMMON_DEFINES) $(INCFLAGS) -I$(THEOS_INCLUDE_PATH) -Wno-error
|
COMMON_FLAGS := $(COMMON_DEFINES) $(INCFLAGS) -I$(THEOS_INCLUDE_PATH) -Wno-error
|
||||||
$(LIBRARY_NAME)_CFLAGS += $(CFLAGS) $(LIBRETRO_CFLAGS) $(COMMON_FLAGS)
|
$(LIBRARY_NAME)_CFLAGS += $(CFLAGS) $(LIBRETRO_CFLAGS) $(COMMON_FLAGS)
|
||||||
@ -282,7 +291,7 @@ $(TARGET): $(OBJECTS)
|
|||||||
ifeq ($(STATIC_LINKING), 1)
|
ifeq ($(STATIC_LINKING), 1)
|
||||||
$(AR) rcs $@ $(OBJECTS)
|
$(AR) rcs $@ $(OBJECTS)
|
||||||
else
|
else
|
||||||
$(CC) -o $(TARGET) $(fpic) $(OBJECTS) $(LDFLAGS) $(LIBRETRO_LIBS) $(SHARED)
|
$(CC) -o $(TARGET) $(fpic) $(OBJECTS) $(LDFLAGS) $(SHARED)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
clean-objs:
|
clean-objs:
|
||||||
|
@ -12,8 +12,6 @@ SOURCES_C = $(foreach dir,$(GENPLUS_SRC_DIR),$(wildcard $(dir)/*.c)) \
|
|||||||
$(foreach dir,$(TREMOR_SRC_DIR),$(wildcard $(dir)/*.c)) \
|
$(foreach dir,$(TREMOR_SRC_DIR),$(wildcard $(dir)/*.c)) \
|
||||||
$(LIBRETRO_DIR)/libretro.c
|
$(LIBRETRO_DIR)/libretro.c
|
||||||
|
|
||||||
ifeq ($(WANT_CRC32), 1)
|
SOURCES_C += $(LIBRETRO_DIR)/scrc32.c
|
||||||
SOURCES_C += $(LIBRETRO_DIR)/scrc32.c
|
|
||||||
endif
|
|
||||||
|
|
||||||
INCFLAGS += $(foreach dir,$(GENPLUS_SRC_DIR),-I$(dir)) -I$(LIBRETRO_DIR)
|
INCFLAGS += $(foreach dir,$(GENPLUS_SRC_DIR),-I$(dir)) -I$(LIBRETRO_DIR)
|
||||||
|
Loading…
Reference in New Issue
Block a user