mirror of
https://github.com/RetroDECK/Supermodel.git
synced 2024-11-22 05:45:38 +00:00
Makefiles update
This commit is contained in:
parent
5143669cb9
commit
d70a79a127
|
@ -66,7 +66,7 @@ endif
|
||||||
# OSX-specific
|
# OSX-specific
|
||||||
#
|
#
|
||||||
|
|
||||||
PLATFORM_CFLAGS = $(SDL_CFLAGS) -DSUPERMODEL_OSX -F/Library/Frameworks/
|
PLATFORM_CXXFLAGS = $(SDL_CFLAGS) -DSUPERMODEL_OSX -F/Library/Frameworks/
|
||||||
PLATFORM_LDFLAGS = $(SDL_LIBS) -lz -lm -lstdc++ -F/Library/Frameworks/
|
PLATFORM_LDFLAGS = $(SDL_LIBS) -lz -lm -lstdc++ -F/Library/Frameworks/
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -63,7 +63,7 @@ SDL2_LIBS = `sdl2-config --libs`
|
||||||
# UNIX-specific
|
# UNIX-specific
|
||||||
#
|
#
|
||||||
|
|
||||||
PLATFORM_CFLAGS = $(SDL2_CFLAGS)
|
PLATFORM_CXXFLAGS = $(SDL2_CFLAGS) -Ofast
|
||||||
PLATFORM_LDFLAGS = $(SDL2_LIBS) -lGL -lGLU -lz -lm -lstdc++ -lpthread -lSDL2_net
|
PLATFORM_LDFLAGS = $(SDL2_LIBS) -lGL -lGLU -lz -lm -lstdc++ -lpthread -lSDL2_net
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -50,8 +50,8 @@ BITS = 64
|
||||||
#
|
#
|
||||||
# Path to SDL2
|
# Path to SDL2
|
||||||
#
|
#
|
||||||
SDL2_INCLUDE_DIR = \msys64\mingw64\include\SDL2 #C:\TDM-GCC-64\x86_64-w64-mingw32\include\SDL2
|
SDL2_INCLUDE_DIR = \msys64\mingw64\include\SDL2
|
||||||
SDL2_LIB_DIR = \msys64\mingw64\lib #C:\TDM-GCC-64\x86_64-w64-mingw32\lib
|
SDL2_LIB_DIR = \msys64\mingw64\lib
|
||||||
|
|
||||||
#
|
#
|
||||||
# Toolchain
|
# Toolchain
|
||||||
|
@ -93,8 +93,8 @@ endif
|
||||||
|
|
||||||
PLATFORM_INCLUDE_DIR = $(SDL2_INCLUDE_DIR)
|
PLATFORM_INCLUDE_DIR = $(SDL2_INCLUDE_DIR)
|
||||||
PLATFORM_LIB_DIR = $(SDL2_LIB_DIR)
|
PLATFORM_LIB_DIR = $(SDL2_LIB_DIR)
|
||||||
PLATFORM_LIBS = -ldxerr8 -ldinput8 -lglu32 -lole32 -loleaut32 -lopengl32 -lwbemuuid -lws2_32 -lz
|
PLATFORM_LIBS = -ldxerr8 -ldinput8 -lglu32 -lole32 -loleaut32 -lopengl32 -lwbemuuid -lws2_32 -lz
|
||||||
PLATFORM_CFLAGS = $(SDL2_CFLAGS) -DSUPERMODEL_WIN32 $(addprefix -I,$(sort $(PLATFORM_INCLUDE_DIR))) -O2
|
PLATFORM_CXXFLAGS = $(SDL2_CFLAGS) -DSUPERMODEL_WIN32 $(addprefix -I,$(sort $(PLATFORM_INCLUDE_DIR)))
|
||||||
PLATFORM_LDFLAGS = -static -L$(sort $(PLATFORM_LIB_DIR)) $(SDL2_LIBS) $(PLATFORM_LIBS)
|
PLATFORM_LDFLAGS = -static -L$(sort $(PLATFORM_LIB_DIR)) $(SDL2_LIBS) $(PLATFORM_LIBS)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -27,6 +27,64 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
# Output Locations
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
|
OBJ_DIR = obj$(strip $(BITS))
|
||||||
|
BIN_DIR = bin$(strip $(BITS))
|
||||||
|
|
||||||
|
OUTFILE = supermodel
|
||||||
|
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
# Compiler Flags
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
|
#
|
||||||
|
# Construct Supermodel build options
|
||||||
|
#
|
||||||
|
SUPERMODEL_BUILD_FLAGS =
|
||||||
|
|
||||||
|
# If render state analyser is enabled, need to define DEBUG
|
||||||
|
ifeq ($(strip $(DEBUG)),1)
|
||||||
|
SUPERMODEL_BUILD_FLAGS += -DDEBUG
|
||||||
|
endif
|
||||||
|
|
||||||
|
# If Net Board support is enabled, need to define NET_BOARD
|
||||||
|
ifeq ($(strip $(NET_BOARD)),1)
|
||||||
|
SUPERMODEL_BUILD_FLAGS += -DNET_BOARD
|
||||||
|
endif
|
||||||
|
|
||||||
|
# If Bart's new frame timing is enabled, need to define NEW_FRAME_TIMING
|
||||||
|
ifeq ($(strip $(NEW_FRAME_TIMING)),1)
|
||||||
|
SUPERMODEL_BUILD_FLAGS += -DNEW_FRAME_TIMING
|
||||||
|
endif
|
||||||
|
|
||||||
|
# If built-in debugger enabled, need to define SUPERMODEL_DEBUGGER
|
||||||
|
ifeq ($(strip $(ENABLE_DEBUGGER)),1)
|
||||||
|
SUPERMODEL_BUILD_FLAGS += -DSUPERMODEL_DEBUGGER
|
||||||
|
endif
|
||||||
|
|
||||||
|
#
|
||||||
|
# Compiler options
|
||||||
|
#
|
||||||
|
ARCH =
|
||||||
|
OPT = -Ofast
|
||||||
|
WARN = -Wall
|
||||||
|
CSTD = -std=iso9899:2011
|
||||||
|
CXXSTD = -std=c++14
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
# Construct the compiler (C and C++) and linker flags
|
||||||
|
#
|
||||||
|
COMMON_CFLAGS = -c $(ARCH) $(OPT) $(WARN) $(addprefix -I,$(sort $(INCLUDE_DIRS))) -DGLEW_STATIC $(SUPERMODEL_BUILD_FLAGS)
|
||||||
|
CFLAGS = $(COMMON_CFLAGS) $(CSTD)
|
||||||
|
CXXFLAGS = $(PLATFORM_CXXFLAGS) $(COMMON_CFLAGS) $(CXXSTD)
|
||||||
|
LDFLAGS = -o $(BIN_DIR)/$(OUTFILE) $(PLATFORM_LDFLAGS) -s
|
||||||
|
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
# Source Files
|
# Source Files
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
@ -143,54 +201,6 @@ OBJ_FILES = $(foreach file,$(SRC_FILES),$(OBJ_DIR)/$(basename $(notdir $(file)))
|
||||||
INCLUDE_DIRS = $(sort $(foreach file,$(SRC_FILES),$(dir $(file))))
|
INCLUDE_DIRS = $(sort $(foreach file,$(SRC_FILES),$(dir $(file))))
|
||||||
|
|
||||||
|
|
||||||
###############################################################################
|
|
||||||
# Output Locations
|
|
||||||
###############################################################################
|
|
||||||
|
|
||||||
OBJ_DIR = obj$(strip $(BITS))
|
|
||||||
BIN_DIR = bin$(strip $(BITS))
|
|
||||||
|
|
||||||
OUTFILE = supermodel
|
|
||||||
|
|
||||||
|
|
||||||
###############################################################################
|
|
||||||
# Compiler Flags
|
|
||||||
###############################################################################
|
|
||||||
|
|
||||||
ARCH = -march=native -mfpmath=sse
|
|
||||||
BUILD_CFLAGS =
|
|
||||||
OPT = -O3
|
|
||||||
WARN = -Wall
|
|
||||||
CSTD = -std=iso9899:2011
|
|
||||||
CXXSTD = -std=c++14
|
|
||||||
|
|
||||||
COMMON_CFLAGS = -c $(ARCH) $(OPT) $(WARN) $(addprefix -I,$(sort $(INCLUDE_DIRS))) -DGLEW_STATIC
|
|
||||||
|
|
||||||
CFLAGS = $(COMMON_CFLAGS) $(CSTD)
|
|
||||||
CXXFLAGS = $(PLATFORM_CFLAGS) $(COMMON_CFLAGS) $(BUILD_CFLAGS) $(CXXSTD)
|
|
||||||
LDFLAGS = -o $(BIN_DIR)/$(OUTFILE) $(PLATFORM_LDFLAGS) -s
|
|
||||||
|
|
||||||
# If render state analyser is enabled, need to define DEBUG
|
|
||||||
ifeq ($(strip $(DEBUG)),1)
|
|
||||||
BUILD_CFLAGS += -DDEBUG
|
|
||||||
endif
|
|
||||||
|
|
||||||
# If Net Board support is enabled, need to define NET_BOARD
|
|
||||||
ifeq ($(strip $(NET_BOARD)),1)
|
|
||||||
BUILD_CFLAGS += -DNET_BOARD
|
|
||||||
endif
|
|
||||||
|
|
||||||
# If Bart's new frame timing is enabled, need to define NEW_FRAME_TIMING
|
|
||||||
ifeq ($(strip $(NEW_FRAME_TIMING)),1)
|
|
||||||
BUILD_CFLAGS += -DNEW_FRAME_TIMING
|
|
||||||
endif
|
|
||||||
|
|
||||||
# If built-in debugger enabled, need to define SUPERMODEL_DEBUGGER
|
|
||||||
ifeq ($(strip $(ENABLE_DEBUGGER)),1)
|
|
||||||
BUILD_CFLAGS += -DSUPERMODEL_DEBUGGER
|
|
||||||
endif
|
|
||||||
|
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
# Targets
|
# Targets
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
Loading…
Reference in a new issue