Tupfile for super-repositories

- Revert Genode Make rules
- Tweak Makefile.common for compatiblity
- Allow LIBRETRO_COMM_DIR override
This commit is contained in:
Emery Hemingway 2019-02-24 17:29:49 +01:00
parent 3259e34303
commit 74e43dbd02
3 changed files with 23 additions and 27 deletions

View File

@ -1,19 +1,8 @@
ifeq ($(LIBRETRO_COMM_DIR),)
LIBRETRO_COMM_DIR := $(CORE_DIR)/drivers/libretro/libretro-common
endif
INCFLAGS := -I$(CORE_DIR)/drivers/libretro -I$(LIBRETRO_COMM_DIR)/include -I$(CORE_DIR) -I$(CORE_DIR)/input -I$(CORE_DIR)/boards
COREDEFINES = -D__LIBRETRO__ -DSOUND_QUALITY=0 -DPATH_MAX=1024 -DFCEU_VERSION_NUMERIC=9813 -DFRONTEND_SUPPORTS_RGB565
INCLUDE_STDINT = 0
ifneq (,$(findstring msvc200,$(platform)))
INCLUDE_STDINT = 1
endif
ifeq ($(INCLUDE_STDINT), 1)
INCFLAGS += -I$(LIBRETRO_COMM_DIR)/include/compat/msvc
endif
ifneq (,$(findstring msvc,$(platform)))
COREDEFINES += -DINLINE=_inline
endif
COREDEFINES = -D__LIBRETRO__ -DSOUND_QUALITY=0 -DPATH_MAX=1024 -DFCEU_VERSION_NUMERIC=9813 -DFRONTEND_SUPPORTS_RGB565
ifeq ($(PSS_STYLE),2)
COREDEFINES += -DPSS_STYLE=2
@ -21,8 +10,12 @@ else
COREDEFINES += -DPSS_STYLE=1
endif
ifeq ($(TUP_CWD),)
FCEU_SRC_DIRS := $(CORE_DIR)/boards $(CORE_DIR)/input
SOURCES_C := $(foreach dir,$(FCEU_SRC_DIRS),$(wildcard $(dir)/*.c))
else
SOURCES_C = $(CORE_DIR)/boards/*.c $(CORE_DIR)/input/*.c
endif
ifeq ($(HAVE_GRIFFIN),1)
SOURCES_C += $(CORE_DIR)/drivers/libretro/griffin.c

View File

@ -386,16 +386,6 @@ else ifeq ($(platform), gcw0)
PLATFORM_DEFINES += -ffast-math -march=mips32 -mtune=mips32r2 -mhard-float
EXTERNAL_ZLIB = 1
# Genode
else ifeq ($(platform), genode)
TARGET := $(TARGET_NAME)_libretro.lib.so
CC := $(shell pkg-config genode-base --variable=cc)
LD := $(shell pkg-config genode-base --variable=ld)
CFLAGS += $(shell pkg-config --cflags genode-libc)
LDFLAGS += -shared --version-script=src/drivers/libretro/link.T
LDFLAGS += $(shell pkg-config --libs genode-lib genode-libc)
LIBM =
# Windows MSVC 2017 all architectures
else ifneq (,$(findstring windows_msvc2017,$(platform)))
CC = cl.exe
@ -673,6 +663,19 @@ CORE_DIR := src
include Makefile.common
INCLUDE_STDINT = 0
ifneq (,$(findstring msvc200,$(platform)))
INCLUDE_STDINT = 1
endif
ifeq ($(INCLUDE_STDINT), 1)
INCFLAGS += -I$(LIBRETRO_COMM_DIR)/include/compat/msvc
endif
ifneq (,$(findstring msvc,$(platform)))
COREDEFINES += -DINLINE=_inline
endif
CFLAGS += -DWANT_GRIFFIN
OBJECTS := $(SOURCES_C:.c=.o)
@ -714,9 +717,6 @@ else ifeq ($(platform), switch)
OBJOUT = -o
LINKOUT = -o
# libtransistor.mk sets LD for us
else ifeq ($(platform), genode)
OBJOUT = -o
LINKOUT = -o
else
OBJOUT = -o
LINKOUT = -o

3
Tupfile Normal file
View File

@ -0,0 +1,3 @@
TARGET_NAME=fceumm
CORE_DIR=$(TUP_CWD)/src
include_rules