[libretro] improved Makefiles

This commit is contained in:
EkeEke 2014-11-28 12:09:43 +01:00
parent b805e7d1be
commit b5a30b82c2
3 changed files with 51 additions and 98 deletions

View File

@ -1,79 +0,0 @@
SOURCES_C := $(GENPLUS_SRC_DIR)/genesis.c \
$(GENPLUS_SRC_DIR)/vdp_ctrl.c \
$(GENPLUS_SRC_DIR)/vdp_render.c \
$(GENPLUS_SRC_DIR)/system.c \
$(GENPLUS_SRC_DIR)/io_ctrl.c \
$(GENPLUS_SRC_DIR)/loadrom.c \
$(GENPLUS_SRC_DIR)/mem68k.c \
$(GENPLUS_SRC_DIR)/state.c \
$(GENPLUS_SRC_DIR)/memz80.c \
$(GENPLUS_SRC_DIR)/membnk.c \
$(GENPLUS_SRC_DIR)/input_hw/activator.c \
$(GENPLUS_SRC_DIR)/input_hw/gamepad.c \
$(GENPLUS_SRC_DIR)/input_hw/input.c \
$(GENPLUS_SRC_DIR)/input_hw/lightgun.c \
$(GENPLUS_SRC_DIR)/input_hw/mouse.c \
$(GENPLUS_SRC_DIR)/input_hw/paddle.c \
$(GENPLUS_SRC_DIR)/input_hw/sportspad.c \
$(GENPLUS_SRC_DIR)/input_hw/teamplayer.c \
$(GENPLUS_SRC_DIR)/input_hw/xe_1ap.c \
$(GENPLUS_SRC_DIR)/input_hw/terebi_oekaki.c \
$(GENPLUS_SRC_DIR)/input_hw/graphic_board.c \
$(GENPLUS_SRC_DIR)/cd_hw/cd_cart.c \
$(GENPLUS_SRC_DIR)/cd_hw/cdc.c \
$(GENPLUS_SRC_DIR)/cd_hw/cdd.c \
$(GENPLUS_SRC_DIR)/cd_hw/gfx.c \
$(GENPLUS_SRC_DIR)/cd_hw/pcm.c \
$(GENPLUS_SRC_DIR)/cd_hw/scd.c \
$(GENPLUS_SRC_DIR)/cart_hw/areplay.c \
$(GENPLUS_SRC_DIR)/cart_hw/md_cart.c \
$(GENPLUS_SRC_DIR)/cart_hw/sms_cart.c \
$(GENPLUS_SRC_DIR)/cart_hw/eeprom_93c.c \
$(GENPLUS_SRC_DIR)/cart_hw/eeprom_i2c.c \
$(GENPLUS_SRC_DIR)/cart_hw/eeprom_spi.c \
$(GENPLUS_SRC_DIR)/cart_hw/ggenie.c \
$(GENPLUS_SRC_DIR)/cart_hw/sram.c \
$(GENPLUS_SRC_DIR)/cart_hw/svp/ssp16.c \
$(GENPLUS_SRC_DIR)/cart_hw/svp/svp.c \
$(GENPLUS_SRC_DIR)/ntsc/md_ntsc.c \
$(GENPLUS_SRC_DIR)/ntsc/sms_ntsc.c \
$(GENPLUS_SRC_DIR)/sound/eq.c \
$(GENPLUS_SRC_DIR)/sound/sound.c \
$(GENPLUS_SRC_DIR)/sound/ym2612.c \
$(GENPLUS_SRC_DIR)/sound/ym2413.c \
$(GENPLUS_SRC_DIR)/sound/sn76489.c \
$(GENPLUS_SRC_DIR)/sound/blip_buf.c \
$(GENPLUS_SRC_DIR)/z80/z80.c \
$(GENPLUS_SRC_DIR)/m68k/m68kcpu.c \
$(GENPLUS_SRC_DIR)/m68k/s68kcpu.c \
$(TREMOR_SRC_DIR)/bitwise.c \
$(TREMOR_SRC_DIR)/block.c \
$(TREMOR_SRC_DIR)/codebook.c \
$(TREMOR_SRC_DIR)/floor0.c \
$(TREMOR_SRC_DIR)/floor1.c \
$(TREMOR_SRC_DIR)/framing.c \
$(TREMOR_SRC_DIR)/info.c \
$(TREMOR_SRC_DIR)/mapping0.c \
$(TREMOR_SRC_DIR)/mdct.c \
$(TREMOR_SRC_DIR)/registry.c \
$(TREMOR_SRC_DIR)/res012.c \
$(TREMOR_SRC_DIR)/sharedbook.c \
$(TREMOR_SRC_DIR)/synthesis.c \
$(TREMOR_SRC_DIR)/vorbisfile.c \
$(TREMOR_SRC_DIR)/window.c \
$(LIBRETRO_DIR)/libretro.c
ifeq ($(WANT_CRC32), 1)
SOURCES_C += $(LIBRETRO_DIR)/scrc32.c
endif
INCFLAGS += -I$(GENPLUS_SRC_DIR) \
-I$(GENPLUS_SRC_DIR)/sound \
-I$(GENPLUS_SRC_DIR)/input_hw \
-I$(GENPLUS_SRC_DIR)/cart_hw \
-I$(GENPLUS_SRC_DIR)/cd_hw \
-I$(GENPLUS_SRC_DIR)/cart_hw/svp \
-I$(GENPLUS_SRC_DIR)/m68k \
-I$(GENPLUS_SRC_DIR)/z80 \
-I$(GENPLUS_SRC_DIR)/ntsc \
-I$(LIBRETRO_DIR)

View File

@ -182,12 +182,30 @@ else
CFLAGS += -O3 -DNDEBUG
endif
CORE_DIR := .
GENPLUS_SRC_DIR := $(CORE_DIR)/core
TREMOR_SRC_DIR := $(GENPLUS_SRC_DIR)/tremor
LIBRETRO_DIR := $(CORE_DIR)/libretro
include Makefile.common
CORE_DIR := ./core
GENPLUS_SRC_DIR := $(CORE_DIR) \
$(CORE_DIR)/sound \
$(CORE_DIR)/input_hw \
$(CORE_DIR)/cart_hw \
$(CORE_DIR)/cart_hw/svp \
$(CORE_DIR)/cd_hw \
$(CORE_DIR)/m68k \
$(CORE_DIR)/z80 \
$(CORE_DIR)/ntsc
TREMOR_SRC_DIR := $(CORE_DIR)/tremor
LIBRETRO_DIR := ./libretro
INCFLAGS := $(foreach dir,$(GENPLUS_SRC_DIR),-I$(dir)) \
-I$(TREMOR_SRC_DIR) \
-I$(LIBRETRO_DIR)
SOURCES_C := $(foreach dir,$(GENPLUS_SRC_DIR),$(wildcard $(dir)/*.c)) \
$(foreach dir,$(TREMOR_SRC_DIR),$(wildcard $(dir)/*.c)) \
$(LIBRETRO_DIR)/libretro.c
ifeq ($(WANT_CRC32), 1)
SOURCES_C += $(LIBRETRO_DIR)/scrc32.c
endif
OBJECTS := $(SOURCES_C:.c=.o)

View File

@ -4,9 +4,17 @@ include $(CLEAR_VARS)
WANT_CRC32 := 1
CORE_DIR := ../..
GENPLUS_SRC_DIR := $(CORE_DIR)/core
TREMOR_SRC_DIR := $(GENPLUS_SRC_DIR)/tremor
CORE_DIR := ../../core
GENPLUS_SRC_DIR := $(CORE_DIR) \
$(CORE_DIR)/sound \
$(CORE_DIR)/input_hw \
$(CORE_DIR)/cart_hw \
$(CORE_DIR)/cart_hw/svp \
$(CORE_DIR)/cd_hw \
$(CORE_DIR)/m68k \
$(CORE_DIR)/z80 \
$(CORE_DIR)/ntsc
TREMOR_SRC_DIR := $(CORE_DIR)/tremor
LIBRETRO_DIR := ..
LOCAL_MODULE := retro
@ -16,19 +24,25 @@ LOCAL_CFLAGS += -DANDROID_ARM
LOCAL_ARM_MODE := arm
endif
include $(CORE_DIR)/Makefile.common
SOURCES_C := $(foreach dir,$(GENPLUS_SRC_DIR),$(wildcard $(dir)/*.c)) \
$(foreach dir,$(TREMOR_SRC_DIR),$(wildcard $(dir)/*.c)) \
$(LIBRETRO_DIR)/libretro.c
ifeq ($(WANT_CRC32), 1)
SOURCES_C += $(LIBRETRO_DIR)/scrc32.c
endif
LOCAL_SRC_FILES := $(SOURCES_C)
LOCAL_C_INCLUDES = $(LOCAL_PATH)/$(GENPLUS_SRC_DIR) \
$(LOCAL_PATH)/$(GENPLUS_SRC_DIR)/sound \
$(LOCAL_PATH)/$(GENPLUS_SRC_DIR)/input_hw \
$(LOCAL_PATH)/$(GENPLUS_SRC_DIR)/cd_hw \
$(LOCAL_PATH)/$(GENPLUS_SRC_DIR)/cart_hw \
$(LOCAL_PATH)/$(GENPLUS_SRC_DIR)/cart_hw/svp \
$(LOCAL_PATH)/$(GENPLUS_SRC_DIR)/m68k \
$(LOCAL_PATH)/$(GENPLUS_SRC_DIR)/z80 \
$(LOCAL_PATH)/$(GENPLUS_SRC_DIR)/ntsc \
LOCAL_C_INCLUDES = $(CORE_DIR) \
$(LOCAL_PATH)/$(CORE_DIR)/sound \
$(LOCAL_PATH)/$(CORE_DIR)/input_hw \
$(LOCAL_PATH)/$(CORE_DIR)/cd_hw \
$(LOCAL_PATH)/$(CORE_DIR)/cart_hw \
$(LOCAL_PATH)/$(CORE_DIR)/cart_hw/svp \
$(LOCAL_PATH)/$(CORE_DIR)/m68k \
$(LOCAL_PATH)/$(CORE_DIR)/z80 \
$(LOCAL_PATH)/$(CORE_DIR)/ntsc \
$(LOCAL_PATH)/$(TREMOR_SRC_DIR) \
$(LOCAL_PATH)/$(LIBRETRO_DIR)