Move definition of -DOSD_WINDOWS, -DOSD_SDL and -DOSD_MINI into

$(OSD).mak. Added sanity check to makefile. [Couriersud]
This commit is contained in:
couriersud 2015-01-09 03:25:46 +01:00
parent ac27a0991c
commit 799d10beb3
4 changed files with 15 additions and 20 deletions

View File

@ -490,26 +490,6 @@ ifdef FASTDEBUG
DEFS += -DMAME_DEBUG_FAST
endif
# add a define identifying the target osd
ifeq ($(OSD),sdl)
DEFS += -DOSD_SDL
else
ifeq ($(OSD),windows)
DEFS += -DOSD_WINDOWS
else
ifeq ($(OSD),winui)
DEFS += -DOSD_WINDOWS
else
ifeq ($(OSD),osdmini)
DEFS += -DOSD_MINI
else
$(warning Please add -DOSD_[SDL|WINDOWS|MINI] in $(OSD).mak)
endif
endif
endif
endif
#-------------------------------------------------
# compile flags
# CCOMFLAGS are common flags
@ -885,6 +865,13 @@ CDEFS = $(DEFS)
# TODO: -x c++ should not be hard-coded
CPPCHECKFLAGS = $(CDEFS) $(INCPATH) -x c++ --enable=style
#-------------------------------------------------
# sanity check OSD additions
#-------------------------------------------------
ifeq (,$(findstring -DOSD_,$(CDEFS)))
$(error $(OSD).mak should have defined -DOSD_)
endif
#-------------------------------------------------
# primary targets

View File

@ -37,6 +37,8 @@
#
###########################################################################
# add a define identifying the target osd
DEFS += -DOSD_MINI
#-------------------------------------------------
# object and source roots

View File

@ -86,6 +86,9 @@ SDL_FRAMEWORK_PATH = /Library/Frameworks/
OSDSRC = $(SRC)/osd
OSDOBJ = $(OBJ)/osd
# add a define identifying the target osd
DEFS += -DOSD_SDL
# default to SDL2 for non-OS/2, non-Emscripten builds now
ifndef SDL_LIBVER
ifneq ($(TARGETOS),os2)

View File

@ -73,6 +73,9 @@
################## END USER-CONFIGURABLE OPTIONS ######################
###########################################################################
# add a define identifying the target osd
DEFS += -DOSD_WINDOWS
#-------------------------------------------------
# object and source roots