From 799d10beb3990f12bfada276b9810d901b02e18f Mon Sep 17 00:00:00 2001 From: couriersud Date: Fri, 9 Jan 2015 03:25:46 +0100 Subject: Move definition of -DOSD_WINDOWS, -DOSD_SDL and -DOSD_MINI into $(OSD).mak. Added sanity check to makefile. [Couriersud] --- makefile | 27 +++++++-------------------- src/osd/osdmini/osdmini.mak | 2 ++ src/osd/sdl/sdl.mak | 3 +++ src/osd/windows/windows.mak | 3 +++ 4 files changed, 15 insertions(+), 20 deletions(-) diff --git a/makefile b/makefile index 46f3404def2..b2beab1296c 100644 --- a/makefile +++ b/makefile @@ -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 diff --git a/src/osd/osdmini/osdmini.mak b/src/osd/osdmini/osdmini.mak index 4efb0e36441..db78f4fce78 100644 --- a/src/osd/osdmini/osdmini.mak +++ b/src/osd/osdmini/osdmini.mak @@ -37,6 +37,8 @@ # ########################################################################### +# add a define identifying the target osd +DEFS += -DOSD_MINI #------------------------------------------------- # object and source roots diff --git a/src/osd/sdl/sdl.mak b/src/osd/sdl/sdl.mak index 48de1a5bf7f..96b407feda8 100644 --- a/src/osd/sdl/sdl.mak +++ b/src/osd/sdl/sdl.mak @@ -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) diff --git a/src/osd/windows/windows.mak b/src/osd/windows/windows.mak index aba8e5f5ef1..8705213cdd9 100644 --- a/src/osd/windows/windows.mak +++ b/src/osd/windows/windows.mak @@ -73,6 +73,9 @@ ################## END USER-CONFIGURABLE OPTIONS ###################### ########################################################################### +# add a define identifying the target osd +DEFS += -DOSD_WINDOWS + #------------------------------------------------- # object and source roots -- cgit v1.2.3