Makefile fixes: Moved Windows-specific source files out of Makefile.inc, using 'bin' and 'obj' when bits are not explicitly set, and changed output file to Supermodel rather than Supermodel.exe, which works on all platforms.

This commit is contained in:
Bart Trzynadlowski 2017-10-06 01:04:49 +00:00
parent eb798ed15e
commit 4d685e0750
2 changed files with 15 additions and 10 deletions

View file

@ -57,7 +57,6 @@ CC_32 = gcc
CXX_32 = g++
LD_32 = g++
#
# SDL
#
@ -99,12 +98,16 @@ else
SDL_CFLAGS = -I$(SDL_INCLUDE_DIR_32)
endif
PLATFORM_SRC_FILES = \
Src/OSD/Windows/DirectInputSystem.cpp \
Src/OSD/Windows/WinOutputs.cpp
MUSASHI_OUTFILE = $(OBJ_DIR)/m68kmake.exe
include Makefiles/Makefile.inc
clean:
del $(OUTFILE)
del $(BIN_DIR)\$(OUTFILE).exe
del $(OBJ_DIR)\*.d
del $(OBJ_DIR)\*.o
del $(OBJ_DIR)\*.c

View file

@ -87,9 +87,7 @@ SRC_FILES = \
Src/Inputs/InputTypes.cpp \
Src/Inputs/MultiInputSource.cpp \
Src/OSD/SDL/SDLInputSystem.cpp \
Src/OSD/Windows/DirectInputSystem.cpp \
Src/OSD/Outputs.cpp \
Src/OSD/Windows/WinOutputs.cpp \
Src/Sound/MPEG/amp_audio.cpp \
Src/Sound/MPEG/dump.cpp \
Src/Sound/MPEG/getbits.cpp \
@ -109,7 +107,8 @@ SRC_FILES = \
Src/Util/ConfigBuilders.cpp \
Src/GameLoader.cpp \
Src/Pkgs/tinyxml2.cpp \
Src/ROMSet.cpp
Src/ROMSet.cpp \
$(PLATFORM_SRC_FILES)
ifeq ($(strip $(ENABLE_DEBUGGER)),yes)
SRC_FILES += \
@ -148,12 +147,15 @@ INCLUDE_DIRS = $(sort $(foreach file,$(SRC_FILES),$(dir $(file))))
ifeq ($(strip $(BITS)),64)
OBJ_DIR = obj64
BIN_DIR = bin64
else
else ifeq ($(strip $(BITS)),32)
OBJ_DIR = obj32
BIN_DIR = bin32
else
OBJ_DIR = obj
BIN_DIR = bin
endif
OUTFILE = $(BIN_DIR)\Supermodel.exe
OUTFILE = Supermodel
###############################################################################
@ -163,7 +165,7 @@ OUTFILE = $(BIN_DIR)\Supermodel.exe
CPPFLAGS = $(addprefix -I,$(INCLUDE_DIRS)) -DGLEW_STATIC -O3 #-DNEW_FRAME_TIMING
CFLAGS = $(SDL_CFLAGS) $(PLATFORM_CFLAGS) $(CPPFLAGS) -c -Wall -O3
CXXFLAGS = $(CFLAGS) -std=c++11
LDFLAGS = -o $(OUTFILE) $(PLATFORM_LDFLAGS) $(SDL_LDFLAGS) -s
LDFLAGS = -o $(BIN_DIR)/$(OUTFILE) $(PLATFORM_LDFLAGS) $(SDL_LDFLAGS) -s
# If built-in debugger enabled, need to define SUPERMODEL_DEBUGGER
ifeq ($(strip $(ENABLE_DEBUGGER)),yes)
@ -181,7 +183,7 @@ endif
# and thinks the default target is just one of the object files.
#
all: $(BIN_DIR) $(OBJ_DIR) $(OBJ_FILES)
$(info Linking Supermodel : $(OUTFILE))
$(info Linking Supermodel : $(BIN_DIR)/$(OUTFILE))
@$(LD) $(OBJ_FILES) $(LDFLAGS)
$(BIN_DIR):