mirror of
https://github.com/ekeeke/Genesis-Plus-GX.git
synced 2024-12-26 11:11:48 +01:00
Add linux-portable target
This commit is contained in:
parent
08c955f612
commit
4b829b638c
@ -40,6 +40,7 @@ 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)
|
||||||
@ -49,6 +50,16 @@ ifeq ($(platform), unix)
|
|||||||
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 -Wl,--no-undefined
|
||||||
|
ENDIANNESS_DEFINES := -DLSB_FIRST -DBYTE_ORDER=LITTLE_ENDIAN
|
||||||
|
PLATFORM_DEFINES := -DHAVE_ZLIB
|
||||||
|
LIBM :=
|
||||||
|
LDFLAGS += -L. -lmusl
|
||||||
|
|
||||||
# OS X
|
# OS X
|
||||||
else ifeq ($(platform), osx)
|
else ifeq ($(platform), osx)
|
||||||
TARGET := $(TARGET_NAME)_libretro.dylib
|
TARGET := $(TARGET_NAME)_libretro.dylib
|
||||||
@ -109,7 +120,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
|
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
|
||||||
@ -218,6 +229,8 @@ else
|
|||||||
|
|
||||||
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 +277,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 +293,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:
|
||||||
|
Loading…
Reference in New Issue
Block a user