diff options
author | Aaron Giles <aaron@aarongiles.com> | 2010-01-13 16:27:27 +0000 |
---|---|---|
committer | Aaron Giles <aaron@aarongiles.com> | 2010-01-13 16:27:27 +0000 |
commit | 4169b811dbab789f9cda5d92af3605d943860c34 (patch) | |
tree | 7dc306bea9fc2ced669aa85209fd6888b0e91949 /makefile | |
parent | b53bb2c6acce9ab44b48d18c76a9059261e97548 (diff) |
Makefile changes:
1. If OSD is not defined, we look for the built-in Windows
environment variable 'OS' and if it is set to 'Windows_NT',
we assume OSD=windows; otherwise we assume OSD=sdl.
2. If TARGETOS is not defined, we look for the same variable
and set TARGETOS=win32 if it is set to 'Windows_NT'.
3. Windows SDL builds have an 'sdl' prefix on the executable
so they can live side-by-side.
The upshot of this is that on Windows systems:
make -> standard Windows build producing mame.exe
make OSD=sdl -> SDL Windows builds producing sdlmame.exe
On non-Windows systems:
make -> SDL build by default (don't need to say OSD=sdl)
Diffstat (limited to 'makefile')
-rw-r--r-- | makefile | 22 |
1 files changed, 20 insertions, 2 deletions
@@ -40,7 +40,12 @@ endif #------------------------------------------------- ifndef OSD +ifeq ($(OS),Windows_NT) OSD = windows +TARGETOS = win32 +else +OSD = sdl +endif endif ifndef CROSS_BUILD_OSD @@ -56,7 +61,7 @@ endif #------------------------------------------------- ifndef TARGETOS -ifeq ($(OSD),windows) +ifeq ($(OS),Windows_NT) TARGETOS = win32 else TARGETOS = unix @@ -113,6 +118,7 @@ endif # MACOSX_USE_LIBSDL = 1 + #------------------------------------------------- # specify build options; see each option below # for details @@ -205,6 +211,18 @@ RM = @rm -f # form the name of the executable #------------------------------------------------- +# reset all internal prefixes/suffixes +PREFIXSDL = +SUFFIX64 = +SUFFIXDEBUG = + +# Windows SDL builds get an SDL prefix +ifeq ($(OSD),sdl) +ifeq ($(TARGETOS),win32) +PREFIXSDL = sdl +endif +endif + # 64-bit builds get a '64' suffix ifdef PTR64 SUFFIX64 = 64 @@ -224,7 +242,7 @@ NAME = $(TARGET)$(SUBTARGET) endif # fullname is prefix+name+suffix+suffix64+suffixdebug -FULLNAME = $(PREFIX)$(NAME)$(SUFFIX)$(SUFFIX64)$(SUFFIXDEBUG) +FULLNAME = $(PREFIX)$(PREFIXSDL)$(NAME)$(SUFFIX)$(SUFFIX64)$(SUFFIXDEBUG) # add an EXE suffix to get the final emulator name EMULATOR = $(FULLNAME)$(EXE) |