2018-05-06 18:52:23 +00:00
|
|
|
##
|
|
|
|
## Supermodel
|
|
|
|
## A Sega Model 3 Arcade Emulator.
|
2022-06-23 19:34:02 +00:00
|
|
|
## Copyright 2003-2022 The Supermodel Team
|
2018-05-06 18:52:23 +00:00
|
|
|
##
|
|
|
|
## This file is part of Supermodel.
|
|
|
|
##
|
|
|
|
## Supermodel is free software: you can redistribute it and/or modify it under
|
2020-07-27 10:28:48 +00:00
|
|
|
## the terms of the GNU General Public License as published by the Free
|
2018-05-06 18:52:23 +00:00
|
|
|
## Software Foundation, either version 3 of the License, or (at your option)
|
|
|
|
## any later version.
|
|
|
|
##
|
|
|
|
## Supermodel is distributed in the hope that it will be useful, but WITHOUT
|
|
|
|
## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
|
|
## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
|
|
|
## more details.
|
|
|
|
##
|
|
|
|
## You should have received a copy of the GNU General Public License along
|
|
|
|
## with Supermodel. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
##
|
2018-01-22 21:01:35 +00:00
|
|
|
|
|
|
|
#
|
2018-05-06 18:52:23 +00:00
|
|
|
# Makefile.Win32
|
|
|
|
#
|
|
|
|
# Makefile for Windows systems using gcc and the standard Command Prompt.
|
|
|
|
#
|
|
|
|
# Set variables in the "Configuration" section as required by your system
|
|
|
|
# configuration.
|
2018-01-22 21:01:35 +00:00
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
|
###############################################################################
|
2018-05-06 18:52:23 +00:00
|
|
|
# Configuration
|
|
|
|
#
|
|
|
|
# Edit as necessary. Some users may need to edit the "Platform Configuration"
|
2020-04-19 08:34:58 +00:00
|
|
|
# section as well, namely SDL2_LIBS and PLATFORM_LIBS.
|
2018-01-22 21:01:35 +00:00
|
|
|
###############################################################################
|
|
|
|
|
2020-07-27 10:28:48 +00:00
|
|
|
#
|
|
|
|
# Must be included first
|
|
|
|
#
|
|
|
|
include Makefiles/Options.inc
|
|
|
|
|
2018-01-22 21:01:35 +00:00
|
|
|
#
|
2018-05-06 18:52:23 +00:00
|
|
|
# Bitness of build ('32' or '64')
|
2018-01-22 21:01:35 +00:00
|
|
|
#
|
2018-05-06 18:52:23 +00:00
|
|
|
BITS = 64
|
2018-01-22 21:01:35 +00:00
|
|
|
|
2018-05-06 18:52:23 +00:00
|
|
|
#
|
2020-04-19 08:34:58 +00:00
|
|
|
# Path to SDL2
|
2018-05-06 18:52:23 +00:00
|
|
|
#
|
2020-11-06 09:24:16 +00:00
|
|
|
SDL2_INCLUDE_DIR = \msys64\mingw64\include\SDL2
|
|
|
|
SDL2_LIB_DIR = \msys64\mingw64\lib
|
2018-01-22 21:01:35 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# Toolchain
|
|
|
|
#
|
|
|
|
CC = gcc
|
|
|
|
CXX = g++
|
|
|
|
LD = g++
|
|
|
|
|
2018-05-06 18:52:23 +00:00
|
|
|
|
|
|
|
###############################################################################
|
|
|
|
# Platform Configuration
|
|
|
|
###############################################################################
|
|
|
|
|
|
|
|
# Safety check: can be only '32' or '64' otherwise defaults to '64'
|
|
|
|
ifneq ($(filter $(strip $(BITS)),32 64),$(strip $(BITS)))
|
|
|
|
override BITS = 64
|
|
|
|
endif
|
|
|
|
|
|
|
|
#
|
|
|
|
# Use Bash or Windows Prompt shell commands?
|
|
|
|
#
|
|
|
|
DELETE = rm -d -r -f
|
2022-11-13 03:16:45 +00:00
|
|
|
ifeq ($(strip $(MSYSTEM)),1)
|
2018-05-06 18:52:23 +00:00
|
|
|
DELETE = rmdir /s /q
|
|
|
|
endif
|
|
|
|
|
2018-01-22 21:01:35 +00:00
|
|
|
#
|
2020-04-19 08:34:58 +00:00
|
|
|
# SDL2
|
2018-01-22 21:01:35 +00:00
|
|
|
#
|
2020-09-04 05:48:41 +00:00
|
|
|
SDL2_LIBS = -lmingw32 -lSDL2main -lSDL2 -Wl,--no-undefined -lshell32 -lsetupapi -ladvapi32 -luuid -lversion -limm32 -lwinmm -lgdi32 -luser32 -lm -pipe
|
2020-07-27 10:28:48 +00:00
|
|
|
SDL2_CFLAGS =
|
|
|
|
ifeq ($(strip $(NET_BOARD)),1)
|
2020-09-04 05:48:41 +00:00
|
|
|
SDL2_LIBS += -lSDL2_net -liphlpapi
|
2020-07-27 10:28:48 +00:00
|
|
|
endif
|
2018-01-22 21:01:35 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# MinGW/Windows-specific
|
|
|
|
#
|
|
|
|
|
2020-04-19 08:34:58 +00:00
|
|
|
PLATFORM_INCLUDE_DIR = $(SDL2_INCLUDE_DIR)
|
|
|
|
PLATFORM_LIB_DIR = $(SDL2_LIB_DIR)
|
2020-11-06 09:24:16 +00:00
|
|
|
PLATFORM_LIBS = -ldxerr8 -ldinput8 -lglu32 -lole32 -loleaut32 -lopengl32 -lwbemuuid -lws2_32 -lz
|
|
|
|
PLATFORM_CXXFLAGS = $(SDL2_CFLAGS) -DSUPERMODEL_WIN32 $(addprefix -I,$(sort $(PLATFORM_INCLUDE_DIR)))
|
2020-04-19 08:34:58 +00:00
|
|
|
PLATFORM_LDFLAGS = -static -L$(sort $(PLATFORM_LIB_DIR)) $(SDL2_LIBS) $(PLATFORM_LIBS)
|
2018-01-22 21:01:35 +00:00
|
|
|
|
|
|
|
|
|
|
|
###############################################################################
|
|
|
|
# Core Makefile
|
|
|
|
###############################################################################
|
|
|
|
|
|
|
|
PLATFORM_SRC_FILES = \
|
|
|
|
Src/OSD/Windows/DirectInputSystem.cpp \
|
2022-11-14 19:06:09 +00:00
|
|
|
Src/OSD/Windows/FileSystemPath.cpp \
|
2018-01-22 21:01:35 +00:00
|
|
|
Src/OSD/Windows/WinOutputs.cpp
|
|
|
|
|
2020-12-24 10:20:26 +00:00
|
|
|
.PHONY: clean
|
|
|
|
|
2020-07-27 10:28:48 +00:00
|
|
|
include Makefiles/Rules.inc
|
2018-01-22 21:01:35 +00:00
|
|
|
|
2020-07-27 10:28:48 +00:00
|
|
|
clean:
|
2018-05-06 18:52:23 +00:00
|
|
|
$(SILENT)echo Cleaning up $(BIN_DIR) and $(OBJ_DIR)...
|
2018-01-22 21:01:35 +00:00
|
|
|
$(SILENT)$(DELETE) $(BIN_DIR)
|
|
|
|
$(SILENT)$(DELETE) $(OBJ_DIR)
|