Cleanup makefile.

This commit is contained in:
Sérgio Benjamim 2014-11-15 20:08:58 -02:00
parent 67d86709a2
commit 1905629eff

View File

@ -41,12 +41,15 @@ endif
TARGET_NAME := genesis_plus_gx
# Unix
ifeq ($(platform), unix)
TARGET := $(TARGET_NAME)_libretro.so
fpic := -fPIC
SHARED := -shared -Wl,--version-script=libretro/link.T -Wl,--no-undefined -lz
ENDIANNESS_DEFINES := -DLSB_FIRST -DBYTE_ORDER=LITTLE_ENDIAN
PLATFORM_DEFINES := -DHAVE_ZLIB
# OS X
else ifeq ($(platform), osx)
TARGET := $(TARGET_NAME)_libretro.dylib
fpic := -fPIC
@ -63,6 +66,8 @@ endif
ifeq ($(OSX_LT_MAVERICKS),"YES")
fpic += -mmacosx-version-min=10.5
endif
# iOS
else ifeq ($(platform), ios)
TARGET := $(TARGET_NAME)_libretro_ios.dylib
fpic := -fPIC
@ -81,6 +86,8 @@ ifeq ($(OSX_LT_MAVERICKS),"YES")
CC += -miphoneos-version-min=5.0
PLATFORM_DEFINES += -miphoneos-version-min=5.0
endif
# QNX
else ifeq ($(platform), qnx)
TARGET := $(TARGET_NAME)_libretro_qnx.so
fpic := -fPIC
@ -90,24 +97,32 @@ else ifeq ($(platform), qnx)
CC = qcc -Vgcc_ntoarmv7le
AR = qcc -Vgcc_ntoarmv7le
PLATFORM_DEFINES := -D__BLACKBERRY_QNX__ -marm -mcpu=cortex-a9 -mfpu=neon -mfloat-abi=softfp
# PS3
else ifeq ($(platform), ps3)
TARGET := $(TARGET_NAME)_libretro_ps3.a
CC = $(CELL_SDK)/host-win32/ppu/bin/ppu-lv2-gcc.exe
AR = $(CELL_SDK)/host-win32/ppu/bin/ppu-lv2-ar.exe
PLATFORM_DEFINES := -D__CELLOS_LV2 -DALT_RENDER -DBYTE_ORDER=BIG_ENDIAN
STATIC_LINKING = 1
# sncps3
else ifeq ($(platform), sncps3)
TARGET := $(TARGET_NAME)_libretro_ps3.a
CC = $(CELL_SDK)/host-win32/sn/bin/ps3ppusnc.exe
AR = $(CELL_SDK)/host-win32/sn/bin/ps3snarl.exe
PLATFORM_DEFINES := -D__CELLOS_LV2 -DALT_RENDER -DBYTE_ORDER=BIG_ENDIAN
STATIC_LINKING = 1
# Lightweight PS3 Homebrew SDK
else ifeq ($(platform), psl1ght)
TARGET := $(TARGET_NAME)_libretro_psl1ght.a$(EXE_EXT)
CC = $(PS3DEV)/ppu/bin/ppu-gcc$(EXE_EXT)
AR = $(PS3DEV)/ppu/bin/ppu-ar$(EXE_EXT)
PLATFORM_DEFINES := -D__CELLOS_LV2 -DALT_RENDER
STATIC_LINKING = 1
# PSP
else ifeq ($(platform), psp1)
TARGET := $(TARGET_NAME)_libretro_psp1.a$(EXE_EXT)
CC = psp-gcc$(EXE_EXT)
@ -116,6 +131,8 @@ else ifeq ($(platform), psp1)
PLATFORM_DEFINES := -DPSP
CFLAGS += -G0
STATIC_LINKING = 1
# Xbox 360
else ifeq ($(platform), xenon)
TARGET := $(TARGET_NAME)_libretro_xenon360.a
CC = xenon-gcc$(EXE_EXT)
@ -123,6 +140,8 @@ else ifeq ($(platform), xenon)
PLATFORM_DEFINES := -D__LIBXENON__ -DALT_RENDER
ENDIANNESS_DEFINES := -DBYTE_ORDER=BIG_ENDIAN
STATIC_LINKING = 1
# Nintendo Game Cube
else ifeq ($(platform), ngc)
TARGET := $(TARGET_NAME)_libretro_ngc.a
CC = $(DEVKITPPC)/bin/powerpc-eabi-gcc$(EXE_EXT)
@ -130,6 +149,8 @@ else ifeq ($(platform), ngc)
ENDIANNESS_DEFINES := -DBYTE_ORDER=BIG_ENDIAN
PLATFORM_DEFINES := -DGEKKO -DHW_DOL -mrvl -mcpu=750 -meabi -mhard-float -DALT_RENDER
STATIC_LINKING = 1
# Nintendo Wii
else ifeq ($(platform), wii)
TARGET := $(TARGET_NAME)_libretro_wii.a
CC = $(DEVKITPPC)/bin/powerpc-eabi-gcc$(EXE_EXT)
@ -137,6 +158,8 @@ else ifeq ($(platform), wii)
PLATFORM_DEFINES := -DGEKKO -DHW_RVL -mrvl -mcpu=750 -meabi -mhard-float -DALT_RENDER
ENDIANNESS_DEFINES := -DBYTE_ORDER=BIG_ENDIAN
STATIC_LINKING = 1
# ARM
else ifneq (,$(findstring armv,$(platform)))
TARGET := $(TARGET_NAME)_libretro.so
fpic := -fPIC
@ -160,9 +183,13 @@ else ifneq (,$(findstring hardfloat,$(platform)))
PLATFORM_DEFINES += -mfloat-abi=hard
endif
PLATFORM_DEFINES += -DARM
# emscripten
else ifeq ($(platform), emscripten)
TARGET := $(TARGET_NAME)_libretro_emscripten.bc
ENDIANNESS_DEFINES := -DLSB_FIRST -DBYTE_ORDER=LITTLE_ENDIAN
# Windows
else
TARGET := $(TARGET_NAME)_libretro.dll
CC = gcc
@ -170,6 +197,7 @@ else
ENDIANNESS_DEFINES := -DLSB_FIRST -DBYTE_ORDER=LITTLE_ENDIAN
PLATFORM_DEFINES := -DHAVE_ZLIB
endif
ifeq ($(DEBUG), 1)
@ -241,4 +269,3 @@ clean:
rm -f $(TARGET)
.PHONY: clean clean-objs