summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author couriersud <couriersud@arcor.de>2015-01-09 03:25:46 +0100
committer couriersud <couriersud@arcor.de>2015-01-09 03:25:46 +0100
commit799d10beb3990f12bfada276b9810d901b02e18f (patch)
tree80515172eb12fd1c96452121406a5387e3174ee2
parentac27a0991ce6c5a4fe97680ad08cd5a97b8b2259 (diff)
Move definition of -DOSD_WINDOWS, -DOSD_SDL and -DOSD_MINI into
$(OSD).mak. Added sanity check to makefile. [Couriersud]
-rw-r--r--makefile27
-rw-r--r--src/osd/osdmini/osdmini.mak2
-rw-r--r--src/osd/sdl/sdl.mak3
-rw-r--r--src/osd/windows/windows.mak3
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