mirror of
https://github.com/RetroDECK/Supermodel.git
synced 2024-11-22 05:45:38 +00:00
Fixed Makefiles for non-MSYS builds. Unfortunately had to revert a lot of the automated configuration that Harry had inserted. Users will again need to hand-edit Makefile.Win32 for their configuration. Verbose warnings (-Wall) have been restored.
This commit is contained in:
parent
4d275ba49e
commit
4d5c9e7231
|
@ -1,49 +1,65 @@
|
||||||
##
|
##
|
||||||
## Supermodel
|
## Supermodel
|
||||||
## A Sega Model 3 Arcade Emulator.
|
## A Sega Model 3 Arcade Emulator.
|
||||||
## Copyright 2011-2017 Bart Trzynadlowski, Nik Henson, Ian Curtis
|
## Copyright 2011-2017 Bart Trzynadlowski, Nik Henson, Ian Curtis
|
||||||
##
|
##
|
||||||
## This file is part of Supermodel.
|
## This file is part of Supermodel.
|
||||||
##
|
##
|
||||||
## Supermodel is free software: you can redistribute it and/or modify it under
|
## Supermodel is free software: you can redistribute it and/or modify it under
|
||||||
## the terms of the GNU General Public License as published by the Free
|
## the terms of the GNU General Public License as published by the Free
|
||||||
## Software Foundation, either version 3 of the License, or (at your option)
|
## Software Foundation, either version 3 of the License, or (at your option)
|
||||||
## any later version.
|
## any later version.
|
||||||
##
|
##
|
||||||
## Supermodel is distributed in the hope that it will be useful, but WITHOUT
|
## Supermodel is distributed in the hope that it will be useful, but WITHOUT
|
||||||
## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||||
## more details.
|
## more details.
|
||||||
##
|
##
|
||||||
## You should have received a copy of the GNU General Public License along
|
## You should have received a copy of the GNU General Public License along
|
||||||
## with Supermodel. If not, see <http://www.gnu.org/licenses/>.
|
## with Supermodel. If not, see <http://www.gnu.org/licenses/>.
|
||||||
##
|
##
|
||||||
|
|
||||||
#
|
#
|
||||||
# Makefile.Win32
|
# Makefile.Win32
|
||||||
#
|
#
|
||||||
# Makefile for Windows systems using gcc and the standard Command Prompt.
|
# Makefile for Windows systems using gcc and the standard Command Prompt.
|
||||||
#
|
#
|
||||||
|
# Set variables in the "Configuration" section as required by your system
|
||||||
|
# configuration.
|
||||||
###############################################################################
|
#
|
||||||
# Build Options
|
|
||||||
###############################################################################
|
|
||||||
|
###############################################################################
|
||||||
#
|
# Configuration
|
||||||
|
#
|
||||||
|
# Edit as necessary. Some users may need to edit the "Platform Configuration"
|
||||||
|
# section as well, namely SDL_LIBS and PLATFORM_LIBS.
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
|
#
|
||||||
# Bitness of build ('32' or '64')
|
# Bitness of build ('32' or '64')
|
||||||
#
|
#
|
||||||
BITS = 64
|
BITS = 64
|
||||||
# First check if we're under MSYS2 or not, and then get bitness of CPU
|
|
||||||
ifeq ($(strip $(MSYSTEM)),)
|
#
|
||||||
ifeq ($(findstring 64,$(strip $(PROCESSOR_ARCHITECTURE))),)
|
# Path to SDL
|
||||||
BITS = 32
|
#
|
||||||
endif
|
SDL_INCLUDE_DIR = c:/tdm-gcc-64/include/SDL
|
||||||
else
|
SDL_LIB_DIR = c:/tdm-gcc-64/lib
|
||||||
ifeq ($(findstring 32,$(strip $(MSYSTEM_CARCH))),32)
|
|
||||||
BITS = 32
|
#
|
||||||
endif
|
# Toolchain
|
||||||
endif
|
#
|
||||||
|
|
||||||
|
CC = gcc
|
||||||
|
CXX = g++
|
||||||
|
LD = g++
|
||||||
|
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
# Platform Configuration
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
# Safety check: can be only '32' or '64' otherwise defaults to '64'
|
# Safety check: can be only '32' or '64' otherwise defaults to '64'
|
||||||
ifneq ($(filter $(strip $(BITS)),32 64),$(strip $(BITS)))
|
ifneq ($(filter $(strip $(BITS)),32 64),$(strip $(BITS)))
|
||||||
override BITS = 64
|
override BITS = 64
|
||||||
|
@ -57,35 +73,6 @@ ifeq ($(strip $(MSYSTEM)),)
|
||||||
DELETE = rmdir /s /q
|
DELETE = rmdir /s /q
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
||||||
###############################################################################
|
|
||||||
# Platform Configuration
|
|
||||||
#
|
|
||||||
# Edit library and include paths as needed.
|
|
||||||
###############################################################################
|
|
||||||
|
|
||||||
#
|
|
||||||
# Build environment
|
|
||||||
#
|
|
||||||
|
|
||||||
# Leave empty if 'mingwXX' folder is located on the root filesystem
|
|
||||||
MINGW_ROOT =
|
|
||||||
|
|
||||||
# 'mingw64' or 'mingw32' for respectively 64 or 32 bits builds.
|
|
||||||
# MSYS2 uses that scheme, customize it if necessary
|
|
||||||
MINGW_BASE = mingw$(strip $(BITS))
|
|
||||||
|
|
||||||
# The resulting 'mingwXX' base name for includes and libs
|
|
||||||
MINGW_DIR = $(strip $(MINGW_ROOT))/$(strip $(MINGW_BASE))
|
|
||||||
|
|
||||||
#
|
|
||||||
# Toolchain
|
|
||||||
#
|
|
||||||
|
|
||||||
CC = gcc
|
|
||||||
CXX = g++
|
|
||||||
LD = g++
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# SDL
|
# SDL
|
||||||
#
|
#
|
||||||
|
@ -94,19 +81,16 @@ LD = g++
|
||||||
# https://stackoverflow.com/questions/24596596/sdl-doesnt-compile-in-native-enviroment
|
# https://stackoverflow.com/questions/24596596/sdl-doesnt-compile-in-native-enviroment
|
||||||
# http://www.cplusplus.com/forum/beginner/110753/
|
# http://www.cplusplus.com/forum/beginner/110753/
|
||||||
#
|
#
|
||||||
|
SDL_LIBS = -lmingw32 -static-libgcc -static-libstdc++ -lSDLmain -lSDL -lm -luser32 -lgdi32 -lwinmm -ldxguid
|
||||||
SDL_INCLUDE_DIR = $(MINGW_DIR)/include/SDL
|
|
||||||
SDL_LIB_DIR = $(MINGW_DIR)/lib
|
|
||||||
SDL_LIBS = -lmingw32 -static-libgcc -static-libstdc++ -lSDLmain -lSDL -liconv -lm -luser32 -lgdi32 -lwinmm -ldxguid
|
|
||||||
SDL_CFLAGS = -D_GNU_SOURCE=1 -Dmain=SDL_main
|
SDL_CFLAGS = -D_GNU_SOURCE=1 -Dmain=SDL_main
|
||||||
|
|
||||||
#
|
#
|
||||||
# MinGW/Windows-specific
|
# MinGW/Windows-specific
|
||||||
#
|
#
|
||||||
|
|
||||||
PLATFORM_INCLUDE_DIR = $(SDL_INCLUDE_DIR) $(MINGW_DIR)/include
|
PLATFORM_INCLUDE_DIR = $(SDL_INCLUDE_DIR)
|
||||||
PLATFORM_LIB_DIR = $(SDL_LIB_DIR)
|
PLATFORM_LIB_DIR = $(SDL_LIB_DIR)
|
||||||
PLATFORM_LIBS = -ldinput8 -lglew32 -lglu32 -lole32 -loleaut32 -lopengl32 -lwbemuuid -lws2_32 -lz
|
PLATFORM_LIBS = -ldinput8 -lglu32 -lole32 -loleaut32 -lopengl32 -lwbemuuid -lws2_32 -lz
|
||||||
PLATFORM_CFLAGS = $(SDL_CFLAGS) -DSUPERMODEL_WIN32 $(addprefix -I,$(sort $(PLATFORM_INCLUDE_DIR)))
|
PLATFORM_CFLAGS = $(SDL_CFLAGS) -DSUPERMODEL_WIN32 $(addprefix -I,$(sort $(PLATFORM_INCLUDE_DIR)))
|
||||||
PLATFORM_LDFLAGS = -static -L$(sort $(PLATFORM_LIB_DIR)) $(SDL_LIBS) $(PLATFORM_LIBS)
|
PLATFORM_LDFLAGS = -static -L$(sort $(PLATFORM_LIB_DIR)) $(SDL_LIBS) $(PLATFORM_LIBS)
|
||||||
|
|
||||||
|
@ -122,6 +106,6 @@ PLATFORM_SRC_FILES = \
|
||||||
include Makefiles/Makefile.inc
|
include Makefiles/Makefile.inc
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
$(SILENT)echo Cleaning up \"$(BIN_DIR)\" and \"$(OBJ_DIR)\"...
|
$(SILENT)echo Cleaning up $(BIN_DIR) and $(OBJ_DIR)...
|
||||||
$(SILENT)$(DELETE) $(BIN_DIR)
|
$(SILENT)$(DELETE) $(BIN_DIR)
|
||||||
$(SILENT)$(DELETE) $(OBJ_DIR)
|
$(SILENT)$(DELETE) $(OBJ_DIR)
|
||||||
|
|
|
@ -1,29 +1,29 @@
|
||||||
##
|
##
|
||||||
## Supermodel
|
## Supermodel
|
||||||
## A Sega Model 3 Arcade Emulator.
|
## A Sega Model 3 Arcade Emulator.
|
||||||
## Copyright 2011-2017 Bart Trzynadlowski, Nik Henson, Ian Curtis
|
## Copyright 2011-2017 Bart Trzynadlowski, Nik Henson, Ian Curtis
|
||||||
##
|
##
|
||||||
## This file is part of Supermodel.
|
## This file is part of Supermodel.
|
||||||
##
|
##
|
||||||
## Supermodel is free software: you can redistribute it and/or modify it under
|
## Supermodel is free software: you can redistribute it and/or modify it under
|
||||||
## the terms of the GNU General Public License as published by the Free
|
## the terms of the GNU General Public License as published by the Free
|
||||||
## Software Foundation, either version 3 of the License, or (at your option)
|
## Software Foundation, either version 3 of the License, or (at your option)
|
||||||
## any later version.
|
## any later version.
|
||||||
##
|
##
|
||||||
## Supermodel is distributed in the hope that it will be useful, but WITHOUT
|
## Supermodel is distributed in the hope that it will be useful, but WITHOUT
|
||||||
## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||||
## more details.
|
## more details.
|
||||||
##
|
##
|
||||||
## You should have received a copy of the GNU General Public License along
|
## You should have received a copy of the GNU General Public License along
|
||||||
## with Supermodel. If not, see <http://www.gnu.org/licenses/>.
|
## with Supermodel. If not, see <http://www.gnu.org/licenses/>.
|
||||||
##
|
##
|
||||||
|
|
||||||
#
|
#
|
||||||
# Makefile.inc
|
# Makefile.inc
|
||||||
#
|
#
|
||||||
# Core GNU Makefile, included by all (platform-specific) top-level Makefiles.
|
# Core GNU Makefile, included by all (platform-specific) top-level Makefiles.
|
||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
@ -79,82 +79,82 @@ endif
|
||||||
# Source Files
|
# Source Files
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
SRC_FILES = \
|
SRC_FILES = \
|
||||||
Src/CPU/PowerPC/PPCDisasm.cpp \
|
Src/CPU/PowerPC/PPCDisasm.cpp \
|
||||||
Src/BlockFile.cpp \
|
Src/BlockFile.cpp \
|
||||||
Src/Pkgs/unzip.cpp \
|
Src/Pkgs/unzip.cpp \
|
||||||
Src/Pkgs/ioapi.cpp \
|
Src/Pkgs/ioapi.cpp \
|
||||||
Src/Model3/93C46.cpp \
|
Src/Model3/93C46.cpp \
|
||||||
Src/Util/BitRegister.cpp \
|
Src/Util/BitRegister.cpp \
|
||||||
Src/JTAG.cpp \
|
Src/JTAG.cpp \
|
||||||
Src/Graphics/Legacy3D/Error.cpp \
|
Src/Graphics/Legacy3D/Error.cpp \
|
||||||
Src/Pkgs/glew.cpp \
|
Src/Pkgs/glew.cpp \
|
||||||
Src/Graphics/Shader.cpp \
|
Src/Graphics/Shader.cpp \
|
||||||
Src/Model3/Real3D.cpp \
|
Src/Model3/Real3D.cpp \
|
||||||
Src/Graphics/Legacy3D/Legacy3D.cpp \
|
Src/Graphics/Legacy3D/Legacy3D.cpp \
|
||||||
Src/Graphics/Legacy3D/Models.cpp \
|
Src/Graphics/Legacy3D/Models.cpp \
|
||||||
Src/Graphics/Legacy3D/TextureRefs.cpp \
|
Src/Graphics/Legacy3D/TextureRefs.cpp \
|
||||||
Src/Graphics/New3D/New3D.cpp \
|
Src/Graphics/New3D/New3D.cpp \
|
||||||
Src/Graphics/New3D/Mat4.cpp \
|
Src/Graphics/New3D/Mat4.cpp \
|
||||||
Src/Graphics/New3D/Model.cpp \
|
Src/Graphics/New3D/Model.cpp \
|
||||||
Src/Graphics/New3D/PolyHeader.cpp \
|
Src/Graphics/New3D/PolyHeader.cpp \
|
||||||
Src/Graphics/New3D/Texture.cpp \
|
Src/Graphics/New3D/Texture.cpp \
|
||||||
Src/Graphics/New3D/TextureSheet.cpp \
|
Src/Graphics/New3D/TextureSheet.cpp \
|
||||||
Src/Graphics/New3D/VBO.cpp \
|
Src/Graphics/New3D/VBO.cpp \
|
||||||
Src/Graphics/New3D/Vec.cpp \
|
Src/Graphics/New3D/Vec.cpp \
|
||||||
Src/Graphics/New3D/R3DShader.cpp \
|
Src/Graphics/New3D/R3DShader.cpp \
|
||||||
Src/Graphics/New3D/R3DFloat.cpp \
|
Src/Graphics/New3D/R3DFloat.cpp \
|
||||||
Src/Graphics/New3D/R3DScrollFog.cpp \
|
Src/Graphics/New3D/R3DScrollFog.cpp \
|
||||||
Src/Graphics/Render2D.cpp \
|
Src/Graphics/Render2D.cpp \
|
||||||
Src/Model3/TileGen.cpp \
|
Src/Model3/TileGen.cpp \
|
||||||
Src/Model3/Model3.cpp \
|
Src/Model3/Model3.cpp \
|
||||||
Src/CPU/PowerPC/ppc.cpp \
|
Src/CPU/PowerPC/ppc.cpp \
|
||||||
Src/OSD/SDL/Main.cpp \
|
Src/OSD/SDL/Main.cpp \
|
||||||
Src/OSD/SDL/Audio.cpp \
|
Src/OSD/SDL/Audio.cpp \
|
||||||
Src/OSD/SDL/Thread.cpp \
|
Src/OSD/SDL/Thread.cpp \
|
||||||
Src/Model3/SoundBoard.cpp \
|
Src/Model3/SoundBoard.cpp \
|
||||||
Src/Sound/SCSP.cpp \
|
Src/Sound/SCSP.cpp \
|
||||||
Src/Sound/SCSPDSP.cpp \
|
Src/Sound/SCSPDSP.cpp \
|
||||||
Src/CPU/68K/68K.cpp \
|
Src/CPU/68K/68K.cpp \
|
||||||
$(OBJ_DIR)/m68kcpu.c \
|
$(OBJ_DIR)/m68kcpu.c \
|
||||||
$(OBJ_DIR)/m68kopnz.c \
|
$(OBJ_DIR)/m68kopnz.c \
|
||||||
$(OBJ_DIR)/m68kopdm.c \
|
$(OBJ_DIR)/m68kopdm.c \
|
||||||
$(OBJ_DIR)/m68kopac.c \
|
$(OBJ_DIR)/m68kopac.c \
|
||||||
$(OBJ_DIR)/m68kops.c \
|
$(OBJ_DIR)/m68kops.c \
|
||||||
Src/Model3/DSB.cpp \
|
Src/Model3/DSB.cpp \
|
||||||
Src/CPU/Z80/Z80.cpp \
|
Src/CPU/Z80/Z80.cpp \
|
||||||
Src/Model3/IRQ.cpp \
|
Src/Model3/IRQ.cpp \
|
||||||
Src/Model3/53C810.cpp \
|
Src/Model3/53C810.cpp \
|
||||||
Src/Model3/PCI.cpp \
|
Src/Model3/PCI.cpp \
|
||||||
Src/Model3/RTC72421.cpp \
|
Src/Model3/RTC72421.cpp \
|
||||||
Src/Model3/DriveBoard.cpp \
|
Src/Model3/DriveBoard.cpp \
|
||||||
Src/Model3/MPC10x.cpp \
|
Src/Model3/MPC10x.cpp \
|
||||||
Src/Inputs/Input.cpp \
|
Src/Inputs/Input.cpp \
|
||||||
Src/Inputs/Inputs.cpp \
|
Src/Inputs/Inputs.cpp \
|
||||||
Src/Inputs/InputSource.cpp \
|
Src/Inputs/InputSource.cpp \
|
||||||
Src/Inputs/InputSystem.cpp \
|
Src/Inputs/InputSystem.cpp \
|
||||||
Src/Inputs/InputTypes.cpp \
|
Src/Inputs/InputTypes.cpp \
|
||||||
Src/Inputs/MultiInputSource.cpp \
|
Src/Inputs/MultiInputSource.cpp \
|
||||||
Src/OSD/SDL/SDLInputSystem.cpp \
|
Src/OSD/SDL/SDLInputSystem.cpp \
|
||||||
Src/OSD/Outputs.cpp \
|
Src/OSD/Outputs.cpp \
|
||||||
Src/Sound/MPEG/amp_audio.cpp \
|
Src/Sound/MPEG/amp_audio.cpp \
|
||||||
Src/Sound/MPEG/dump.cpp \
|
Src/Sound/MPEG/dump.cpp \
|
||||||
Src/Sound/MPEG/getbits.cpp \
|
Src/Sound/MPEG/getbits.cpp \
|
||||||
Src/Sound/MPEG/getdata.cpp \
|
Src/Sound/MPEG/getdata.cpp \
|
||||||
Src/Sound/MPEG/huffman.cpp \
|
Src/Sound/MPEG/huffman.cpp \
|
||||||
Src/Sound/MPEG/layer2.cpp \
|
Src/Sound/MPEG/layer2.cpp \
|
||||||
Src/Sound/MPEG/layer3.cpp \
|
Src/Sound/MPEG/layer3.cpp \
|
||||||
Src/Sound/MPEG/misc2.cpp \
|
Src/Sound/MPEG/misc2.cpp \
|
||||||
Src/Sound/MPEG/position.cpp \
|
Src/Sound/MPEG/position.cpp \
|
||||||
Src/Sound/MPEG/transform.cpp \
|
Src/Sound/MPEG/transform.cpp \
|
||||||
Src/Sound/MPEG/util.cpp \
|
Src/Sound/MPEG/util.cpp \
|
||||||
Src/Model3/Crypto.cpp \
|
Src/Model3/Crypto.cpp \
|
||||||
Src/OSD/Logger.cpp \
|
Src/OSD/Logger.cpp \
|
||||||
Src/Util/Format.cpp \
|
Src/Util/Format.cpp \
|
||||||
Src/Util/NewConfig.cpp \
|
Src/Util/NewConfig.cpp \
|
||||||
Src/Util/ByteSwap.cpp \
|
Src/Util/ByteSwap.cpp \
|
||||||
Src/Util/ConfigBuilders.cpp \
|
Src/Util/ConfigBuilders.cpp \
|
||||||
Src/GameLoader.cpp \
|
Src/GameLoader.cpp \
|
||||||
Src/Pkgs/tinyxml2.cpp \
|
Src/Pkgs/tinyxml2.cpp \
|
||||||
Src/ROMSet.cpp \
|
Src/ROMSet.cpp \
|
||||||
$(PLATFORM_SRC_FILES)
|
$(PLATFORM_SRC_FILES)
|
||||||
|
@ -174,7 +174,7 @@ ifeq ($(strip $(ENABLE_DEBUGGER)),1)
|
||||||
Src/Debugger/SupermodelDebugger.cpp \
|
Src/Debugger/SupermodelDebugger.cpp \
|
||||||
Src/Debugger/CPUDebug.cpp \
|
Src/Debugger/CPUDebug.cpp \
|
||||||
Src/Debugger/AddressTable.cpp \
|
Src/Debugger/AddressTable.cpp \
|
||||||
Src/Debugger/Breakpoint.cpp \
|
Src/Debugger/Breakpoint.cpp \
|
||||||
Src/Debugger/CodeAnalyser.cpp \
|
Src/Debugger/CodeAnalyser.cpp \
|
||||||
Src/Debugger/Exception.cpp \
|
Src/Debugger/Exception.cpp \
|
||||||
Src/Debugger/Interrupt.cpp \
|
Src/Debugger/Interrupt.cpp \
|
||||||
|
@ -182,25 +182,25 @@ ifeq ($(strip $(ENABLE_DEBUGGER)),1)
|
||||||
Src/Debugger/Label.cpp \
|
Src/Debugger/Label.cpp \
|
||||||
Src/Debugger/Register.cpp \
|
Src/Debugger/Register.cpp \
|
||||||
Src/Debugger/Watch.cpp \
|
Src/Debugger/Watch.cpp \
|
||||||
Src/Debugger/CPU/PPCDebug.cpp \
|
Src/Debugger/CPU/PPCDebug.cpp \
|
||||||
Src/Debugger/CPU/68KDebug.cpp \
|
Src/Debugger/CPU/68KDebug.cpp \
|
||||||
Src/Debugger/CPU/Musashi68KDebug.cpp \
|
Src/Debugger/CPU/Musashi68KDebug.cpp \
|
||||||
Src/Debugger/CPU/Z80Debug.cpp
|
Src/Debugger/CPU/Z80Debug.cpp
|
||||||
endif
|
endif
|
||||||
|
|
||||||
#
|
#
|
||||||
# Sorted-path compile order
|
# Sorted-path compile order
|
||||||
#
|
#
|
||||||
OBJ_FILES = $(foreach file,$(sort $(SRC_FILES)),$(OBJ_DIR)/$(basename $(notdir $(file))).o)
|
OBJ_FILES = $(foreach file,$(SRC_FILES),$(OBJ_DIR)/$(basename $(notdir $(file))).o)
|
||||||
|
|
||||||
#
|
#
|
||||||
# Deduce include directories from the source file list. The sort function
|
# Deduce include directories from the source file list. The sort function
|
||||||
# removes duplicates and is used to construct a set.
|
# removes duplicates and is used to construct a set.
|
||||||
#
|
#
|
||||||
INCLUDE_DIRS = $(sort $(foreach file,$(SRC_FILES),$(dir $(file))))
|
INCLUDE_DIRS = $(sort $(foreach file,$(SRC_FILES),$(dir $(file))))
|
||||||
|
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
# Output Locations
|
# Output Locations
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
|
@ -208,7 +208,6 @@ OBJ_DIR = obj$(strip $(BITS))
|
||||||
BIN_DIR = bin$(strip $(BITS))
|
BIN_DIR = bin$(strip $(BITS))
|
||||||
|
|
||||||
OUTFILE = supermodel
|
OUTFILE = supermodel
|
||||||
MUSASHI_OUTFILE = m68kmake
|
|
||||||
|
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
@ -218,8 +217,7 @@ MUSASHI_OUTFILE = m68kmake
|
||||||
ARCH = -march=native -mfpmath=sse
|
ARCH = -march=native -mfpmath=sse
|
||||||
BUILD_CFLAGS =
|
BUILD_CFLAGS =
|
||||||
OPT = -O3
|
OPT = -O3
|
||||||
#WARN = -Wall
|
WARN = -Wall
|
||||||
WARN = -w
|
|
||||||
CSTD = -std=iso9899:2011
|
CSTD = -std=iso9899:2011
|
||||||
CXXSTD = -std=c++11
|
CXXSTD = -std=c++11
|
||||||
|
|
||||||
|
@ -250,12 +248,12 @@ ifeq ($(strip $(ENABLE_DEBUGGER)),1)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
# Targets
|
# Targets
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
#
|
#
|
||||||
# Default target: build Supermodel binary. Must be specified *before* the auto-
|
# Default target: build Supermodel binary. Must be specified *before* the auto-
|
||||||
# generated dependencies because otherwise, make gets confused for some reason
|
# generated dependencies because otherwise, make gets confused for some reason
|
||||||
# and thinks the default target is just one of the object files.
|
# and thinks the default target is just one of the object files.
|
||||||
#
|
#
|
||||||
|
@ -277,26 +275,26 @@ $(OBJ_DIR):
|
||||||
|
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
# Rules
|
# Rules
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
#
|
#
|
||||||
# Create list of auto-generated dependency files (which contain rules that make
|
# Create list of auto-generated dependency files (which contain rules that make
|
||||||
# understands) and include them all.
|
# understands) and include them all.
|
||||||
#
|
#
|
||||||
AUTODEPS := $(patsubst %.o,%.d,$(OBJ_FILES))
|
AUTODEPS := $(patsubst %.o,%.d,$(OBJ_FILES))
|
||||||
-include $(AUTODEPS)
|
-include $(AUTODEPS)
|
||||||
|
|
||||||
#
|
#
|
||||||
# VPATH is the search path for files. This trick allows a single %.cpp rule to
|
# VPATH is the search path for files. This trick allows a single %.cpp rule to
|
||||||
# be matched against files in sub-directories of Src/.
|
# be matched against files in sub-directories of Src/.
|
||||||
#
|
#
|
||||||
VPATH = $(INCLUDE_DIRS)
|
VPATH = $(INCLUDE_DIRS)
|
||||||
|
|
||||||
#
|
#
|
||||||
# Compilation rules that both auto-generate the dependency files and compile
|
# Compilation rules that both auto-generate the dependency files and compile
|
||||||
# the source code. This technique is described in the reply by user "rr-" at:
|
# the source code. This technique is described in the reply by user "rr-" at:
|
||||||
# https://stackoverflow.com/questions/8025766/makefile-auto-dependency-generation
|
# https://stackoverflow.com/questions/8025766/makefile-auto-dependency-generation
|
||||||
#
|
#
|
||||||
$(OBJ_DIR)/%.o: %.cpp
|
$(OBJ_DIR)/%.o: %.cpp
|
||||||
$(info Generating dependencies: $< -> $(OBJ_DIR)/$(*F).d)
|
$(info Generating dependencies: $< -> $(OBJ_DIR)/$(*F).d)
|
||||||
|
@ -313,43 +311,44 @@ $(OBJ_DIR)/%.o: %.c
|
||||||
|
|
||||||
#
|
#
|
||||||
# Musashi 68K emulator
|
# Musashi 68K emulator
|
||||||
#
|
#
|
||||||
# All generated source files are emitted to the object directory. For MSVC,
|
# All generated source files are emitted to the object directory. For MSVC,
|
||||||
# INLINE must be redefined as "static __inline", which is the syntax in C mode.
|
# INLINE must be redefined as "static __inline", which is the syntax in C mode.
|
||||||
|
#
|
||||||
|
# The .exe suffix is absolutely required for native Windows non-MSYS builds!
|
||||||
#
|
#
|
||||||
|
|
||||||
|
MUSASHI_OUTFILE = $(OBJ_DIR)/m68kmake.exe # do not remove the .exe suffix!
|
||||||
MUSASHI_CFLAGS = -ISrc/CPU/68K/Musashi -I$(OBJ_DIR) -DINLINE="static inline" -Wno-unused-variable
|
MUSASHI_CFLAGS = -ISrc/CPU/68K/Musashi -I$(OBJ_DIR) -DINLINE="static inline" -Wno-unused-variable
|
||||||
MUSASHI_LDFLAGS = -o $(OBJ_DIR)/$(MUSASHI_OUTFILE) $(OBJ_DIR)/m68kmake.o -s
|
MUSASHI_LDFLAGS = -o $(MUSASHI_OUTFILE) $(OBJ_DIR)/m68kmake.o -s
|
||||||
|
|
||||||
$(OBJ_DIR)/$(MUSASHI_OUTFILE): Src/CPU/68K/Musashi/m68kmake.c
|
$(MUSASHI_OUTFILE): Src/CPU/68K/Musashi/m68kmake.c Src/CPU/68K/Musashi/m68k_in.c
|
||||||
$(info --------------------------------------------------------------------------------)
|
$(info --------------------------------------------------------------------------------)
|
||||||
$(info Compiling : $< -> $(OBJ_DIR)/m68kmake.o)
|
$(info Compiling : $< -> $(OBJ_DIR)/m68kmake.o)
|
||||||
$(SILENT)$(CC) $< $(CFLAGS) -o $(OBJ_DIR)/m68kmake.o
|
$(SILENT)$(CC) $< $(CFLAGS) -o $(OBJ_DIR)/m68kmake.o
|
||||||
$(info Linking : $(MUSASHI_OUTFILE))
|
$(info Linking : $(MUSASHI_OUTFILE))
|
||||||
$(SILENT)$(LD) $(MUSASHI_LDFLAGS)
|
$(SILENT)$(LD) $(MUSASHI_LDFLAGS)
|
||||||
|
|
||||||
$(OBJ_DIR)/m68kops.h: $(OBJ_DIR)/$(MUSASHI_OUTFILE) Src/CPU/68K/Musashi/m68k_in.c
|
$(OBJ_DIR)/m68kops.h $(OBJ_DIR)/m68kops.c $(OBJ_DIR)/m68kopac.c $(OBJ_DIR)/m68kopdm.c $(OBJ_DIR)/m68kopnz.c: $(MUSASHI_OUTFILE) Src/CPU/68K/Musashi/m68k_in.c Src/CPU/68K/Musashi/m68k.h Src/CPU/68K/Musashi/m68kconf.h
|
||||||
$(info Generating 68K emulator: $@)
|
$(info Generating 68K emulator: $@)
|
||||||
$(SILENT)$(OBJ_DIR)/$(MUSASHI_OUTFILE) $(OBJ_DIR) Src/CPU/68K/Musashi/m68k_in.c
|
@$(MUSASHI_OUTFILE) $(OBJ_DIR) Src/CPU/68K/Musashi/m68k_in.c
|
||||||
|
|
||||||
$(OBJ_DIR)/m68kops.c $(OBJ_DIR)/m68kopac.c $(OBJ_DIR)/m68kopdm.c $(OBJ_DIR)/m68kopnz.c: $(OBJ_DIR)/m68kops.h
|
|
||||||
|
|
||||||
$(OBJ_DIR)/m68kcpu.o: Src/CPU/68K/Musashi/m68kcpu.c $(OBJ_DIR)/m68kops.h Src/CPU/68K/Musashi/m68k.h Src/CPU/68K/Musashi/m68kconf.h
|
$(OBJ_DIR)/m68kcpu.o: Src/CPU/68K/Musashi/m68kcpu.c $(OBJ_DIR)/m68kops.h Src/CPU/68K/Musashi/m68k.h Src/CPU/68K/Musashi/m68kconf.h
|
||||||
$(info Compiling : $< -> $@)
|
$(info Compiling : $< -> $@)
|
||||||
$(SILENT)$(CC) $< $(CFLAGS) $(MUSASHI_CFLAGS) -o $(OBJ_DIR)/m68kcpu.o
|
@$(CC) $< $(CFLAGS) $(MUSASHI_CFLAGS) -o $(OBJ_DIR)/m68kcpu.o
|
||||||
|
|
||||||
$(OBJ_DIR)/m68kops.o: $(OBJ_DIR)/m68kops.c $(OBJ_DIR)/m68kops.h Src/CPU/68K/Musashi/m68k.h Src/CPU/68K/Musashi/m68kconf.h
|
$(OBJ_DIR)/m68kops.o: $(OBJ_DIR)/m68kops.c $(OBJ_DIR)/m68kops.h Src/CPU/68K/Musashi/m68k.h Src/CPU/68K/Musashi/m68kconf.h $(MUSASHI_OUTFILE)
|
||||||
$(info Compiling : $< -> $@)
|
$(info Compiling : $< -> $@)
|
||||||
$(SILENT)$(CC) $< $(CFLAGS) $(MUSASHI_CFLAGS) -o $@
|
@$(CC) $< $(CFLAGS) $(MUSASHI_CFLAGS) -o $@
|
||||||
|
|
||||||
$(OBJ_DIR)/m68kopac.o: $(OBJ_DIR)/m68kopac.c $(OBJ_DIR)/m68kops.h Src/CPU/68K/Musashi/m68k.h Src/CPU/68K/Musashi/m68kconf.h
|
$(OBJ_DIR)/m68kopac.o: $(OBJ_DIR)/m68kopac.c $(OBJ_DIR)/m68kops.h Src/CPU/68K/Musashi/m68k.h Src/CPU/68K/Musashi/m68kconf.h $(MUSASHI_OUTFILE)
|
||||||
$(info Compiling : $< -> $@)
|
$(info Compiling : $< -> $@)
|
||||||
$(SILENT)$(CC) $< $(CFLAGS) $(MUSASHI_CFLAGS) -o $@
|
@$(CC) $< $(CFLAGS) $(MUSASHI_CFLAGS) -o $@
|
||||||
|
|
||||||
$(OBJ_DIR)/m68kopdm.o: $(OBJ_DIR)/m68kopdm.c $(OBJ_DIR)/m68kops.h Src/CPU/68K/Musashi/m68k.h Src/CPU/68K/Musashi/m68kconf.h
|
$(OBJ_DIR)/m68kopdm.o: $(OBJ_DIR)/m68kopdm.c $(OBJ_DIR)/m68kops.h Src/CPU/68K/Musashi/m68k.h Src/CPU/68K/Musashi/m68kconf.h $(MUSASHI_OUTFILE)
|
||||||
$(info Compiling : $< -> $@)
|
$(info Compiling : $< -> $@)
|
||||||
$(SILENT)$(CC) $< $(CFLAGS) $(MUSASHI_CFLAGS) -o $@
|
@$(CC) $< $(CFLAGS) $(MUSASHI_CFLAGS) -o $@
|
||||||
|
|
||||||
$(OBJ_DIR)/m68kopnz.o: $(OBJ_DIR)/m68kopnz.c $(OBJ_DIR)/m68kops.h Src/CPU/68K/Musashi/m68k.h Src/CPU/68K/Musashi/m68kconf.h
|
$(OBJ_DIR)/m68kopnz.o: $(OBJ_DIR)/m68kopnz.c $(OBJ_DIR)/m68kops.h Src/CPU/68K/Musashi/m68k.h Src/CPU/68K/Musashi/m68kconf.h $(MUSASHI_OUTFILE)
|
||||||
$(info Compiling : $< -> $@)
|
$(info Compiling : $< -> $@)
|
||||||
$(SILENT)$(CC) $< $(CFLAGS) $(MUSASHI_CFLAGS) -o $@
|
@$(CC) $< $(CFLAGS) $(MUSASHI_CFLAGS) -o $@
|
||||||
|
|
Loading…
Reference in a new issue