Update make files and fix build for the various options (Harry Tuttle)

This commit is contained in:
Ian Curtis 2018-01-22 21:01:35 +00:00
parent b5bbda67d0
commit 04758e38b6
13 changed files with 396 additions and 299 deletions

View file

@ -27,16 +27,13 @@
###############################################################################
# Build Options
###############################################################################
#
# Include console-based debugger in emulator ('yes' or 'no')
#
ENABLE_DEBUGGER = no
###############################################################################
# Build Options
###############################################################################
DELETE = rm -d -r -f
###############################################################################
# Platform Configuration
#
# Edit library and include paths as needed.
@ -51,27 +48,26 @@ LD = gcc
#
# SDL
#
SDL_CFLAGS =
SDL_LDFLAGS = -framework SDL -framework AGL -framework OpenGL -framework GLUT -framework Cocoa
#
# OSX-specific
#
PLATFORM_CFLAGS = -DSUPERMODEL_OSX -DUSE_FILE32API -F/Library/Frameworks/
PLATFORM_LDFLAGS = -lz -lm -lstdc++ -F/Library/Frameworks/
###############################################################################
# Core Makefile
###############################################################################
MUSASHI_OUTFILE = $(OBJ_DIR)/m68kmake
include Makefiles/Makefile.inc
clean:
rm $(OUTFILE)
rm -f $(OBJ_DIR)/*
#
SDL_CFLAGS =
SDL_LIBS = -framework SDL -framework AGL -framework OpenGL -framework GLUT -framework Cocoa
#
# OSX-specific
#
PLATFORM_CFLAGS = $(SDL_CFLAGS) -DSUPERMODEL_OSX -DUSE_FILE32API -F/Library/Frameworks/
PLATFORM_LDFLAGS = $(SDL_LIBS) -lz -lm -lstdc++ -F/Library/Frameworks/
###############################################################################
# Core Makefile
###############################################################################
include Makefiles/Makefile.inc
clean:
$(SILENT)echo Cleaning up \"$(BIN_DIR)\" and \"$(OBJ_DIR)\"...
$(SILENT)$(DELETE) $(BIN_DIR)
$(SILENT)$(DELETE) $(OBJ_DIR)

View file

@ -27,16 +27,13 @@
###############################################################################
# Build Options
###############################################################################
#
# Include console-based debugger in emulator ('yes' or 'no')
#
ENABLE_DEBUGGER = no
###############################################################################
# Build Options
###############################################################################
DELETE = rm -d -r -f
###############################################################################
# Platform Configuration
#
# Edit library and include paths as needed.
@ -51,27 +48,26 @@ LD = gcc
#
# SDL
#
SDL_CFLAGS = `sdl-config --cflags`
SDL_LDFLAGS = `sdl-config --libs`
#
# UNIX-specific
#
PLATFORM_CFLAGS =
PLATFORM_LDFLAGS = -lGL -lGLU -lz -lm -lstdc++
###############################################################################
# Core Makefile
###############################################################################
MUSASHI_OUTFILE = $(OBJ_DIR)/m68kmake
include Makefiles/Makefile.inc
clean:
rm $(OUTFILE)
rm -f $(OBJ_DIR)/*
#
SDL_CFLAGS = `sdl-config --cflags`
SDL_LIBS = `sdl-config --libs`
#
# UNIX-specific
#
PLATFORM_CFLAGS = $(SDL_CFLAGS)
PLATFORM_LDFLAGS = $(SDL_LIBS) -lGL -lGLU -lz -lm -lstdc++
###############################################################################
# Core Makefile
###############################################################################
include Makefiles/Makefile.inc
clean:
$(SILENT)echo Cleaning up \"$(BIN_DIR)\" and \"$(OBJ_DIR)\"...
$(SILENT)$(DELETE) $(BIN_DIR)
$(SILENT)$(DELETE) $(OBJ_DIR)

View file

@ -31,85 +31,97 @@
###############################################################################
#
# Bitness of build ('32' or '64')
#
BITS = 64
#
# Include console-based debugger in emulator ('yes' or 'no')
#
ENABLE_DEBUGGER = no
###############################################################################
# Bitness of build ('32' or '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))),)
BITS = 32
endif
else
ifeq ($(findstring 32,$(strip $(MSYSTEM_CARCH))),32)
BITS = 32
endif
endif
# 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
ifeq ($(strip $(MSYSTEM)),)
DELETE = rmdir /s /q
endif
###############################################################################
# Platform Configuration
#
# Edit library and include paths as needed.
###############################################################################
#
# Toolchain
#
CC_64 = gcc
CXX_64 = g++
LD_64 = g++
CC_32 = gcc
CXX_32 = g++
LD_32 = g++
#
# SDL
#
SDL_INCLUDE_DIR_64 = c:\tdm-gcc-64\include\SDL
SDL_LIB_DIR_64 = c:\tdm-gcc-64\lib
SDL_INCLUDE_DIR_32 =
SDL_LIB_DIR_32 =
#
# MinGW/Windows-specific
#
PLATFORM_CFLAGS_64 = -DSUPERMODEL_WIN32
PLATFORM_LDFLAGS_64 = -lmingw32 -lopengl32 -lglu32 -ldinput8 -ldxguid -lole32 -loleaut32 -lwbemuuid -lz
PLATFORM_CFLAGS_32 = -DSUPERMODEL_WIN32
PLATFORM_LDFLAGS_32 = -lmingw32 -lopengl32 -lglu32 -ldinput8 -ldxguid -lole32 -loleaut32 -lwbemuuid -lz
###############################################################################
# Core Makefile
###############################################################################
ifeq ($(strip $(BITS)),64)
CC = $(CC_64)
CXX = $(CXX_64)
LD = $(LD_64)
PLATFORM_CFLAGS = $(PLATFORM_CFLAGS_64)
PLATFORM_LDFLAGS = $(PLATFORM_LDFLAGS_64)
SDL_LDFLAGS = -L$(SDL_LIB_DIR_64) -lSDLmain -lSDL
SDL_CFLAGS = -I$(SDL_INCLUDE_DIR_64)
else
CC = $(CC_32)
CXX = $(CXX_32)
LD = $(LD_32)
PLATFORM_CFLAGS = $(PLATFORM_CFLAGS_32)
PLATFORM_LDFLAGS = $(PLATFORM_LDFLAGS_32)
SDL_LDFLAGS = -L$(SDL_LIB_DIR_32) -lSDLmain -lSDL
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 $(BIN_DIR)\$(OUTFILE).exe
del $(OBJ_DIR)\*.d
del $(OBJ_DIR)\*.o
del $(OBJ_DIR)\*.c
del $(OBJ_DIR)\*.h
del $(OBJ_DIR)\*.exe
###############################################################################
#
# 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
#
#
# (At least for SDL) The linked libs order is fundamental for a successful compiling!
# https://stackoverflow.com/questions/24596596/sdl-doesnt-compile-in-native-enviroment
# http://www.cplusplus.com/forum/beginner/110753/
#
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
#
# MinGW/Windows-specific
#
PLATFORM_INCLUDE_DIR = $(SDL_INCLUDE_DIR) $(MINGW_DIR)/include
PLATFORM_LIB_DIR = $(SDL_LIB_DIR)
PLATFORM_LIBS = -ldinput8 -lglew32 -lglu32 -lole32 -loleaut32 -lopengl32 -lwbemuuid -lws2_32 -lz
PLATFORM_CFLAGS = $(SDL_CFLAGS) -DSUPERMODEL_WIN32 $(addprefix -I,$(sort $(PLATFORM_INCLUDE_DIR)))
PLATFORM_LDFLAGS = -static -L$(sort $(PLATFORM_LIB_DIR)) $(SDL_LIBS) $(PLATFORM_LIBS)
###############################################################################
# Core Makefile
###############################################################################
PLATFORM_SRC_FILES = \
Src/OSD/Windows/DirectInputSystem.cpp \
Src/OSD/Windows/WinOutputs.cpp
include Makefiles/Makefile.inc
clean:
$(SILENT)echo Cleaning up \"$(BIN_DIR)\" and \"$(OBJ_DIR)\"...
$(SILENT)$(DELETE) $(BIN_DIR)
$(SILENT)$(DELETE) $(OBJ_DIR)

View file

@ -24,12 +24,61 @@
#
# Core GNU Makefile, included by all (platform-specific) top-level Makefiles.
#
###############################################################################
# Source Files
###############################################################################
###############################################################################
# Build Options
###############################################################################
#
# Verbose progression
#
VERBOSE =
ifneq ($(filter $(strip $(VERBOSE)),0 1),$(strip $(VERBOSE)))
override VERBOSE =
endif
SILENT = @
ifeq ($(strip $(VERBOSE)),1)
SILENT =
endif
#
# Enable render state analyser for the legacy 3D engine (will slow down emulation!)
#
DEBUG =
ifneq ($(filter $(strip $(DEBUG)),0 1),$(strip $(DEBUG)))
override DEBUG =
endif
#
# Enable support for Model3 Net Board emulation
#
NET_BOARD =
ifneq ($(filter $(strip $(NET_BOARD)),0 1),$(strip $(NET_BOARD)))
override NET_BOARD =
endif
#
# Enable Bart's new (experimental) Real3D frame timing
#
NEW_FRAME_TIMING =
ifneq ($(filter $(strip $(NEW_FRAME_TIMING)),0 1),$(strip $(NEW_FRAME_TIMING)))
override NEW_FRAME_TIMING =
endif
#
# Include console-based debugger in emulator ('yes' or 'no')
#
ENABLE_DEBUGGER =
ifneq ($(filter $(strip $(ENABLE_DEBUGGER)),0 1),$(strip $(ENABLE_DEBUGGER)))
override ENABLE_DEBUGGER =
endif
###############################################################################
# Source Files
###############################################################################
SRC_FILES = \
Src/CPU/PowerPC/PPCDisasm.cpp \
Src/BlockFile.cpp \
@ -106,96 +155,128 @@ SRC_FILES = \
Src/Util/ByteSwap.cpp \
Src/Util/ConfigBuilders.cpp \
Src/GameLoader.cpp \
Src/Pkgs/tinyxml2.cpp \
Src/ROMSet.cpp \
$(PLATFORM_SRC_FILES)
ifeq ($(strip $(ENABLE_DEBUGGER)),yes)
SRC_FILES += \
Src/Debugger/Debugger.cpp \
Src/Debug/ConsoleDebugger.cpp \
Src/Debugger/SupermodelDebugger.cpp \
Src/Debugger/CPUDebug.cpp \
Src/Debugger/AddressTable.cpp \
Src/Pkgs/tinyxml2.cpp \
Src/ROMSet.cpp \
$(PLATFORM_SRC_FILES)
ifeq ($(strip $(NET_BOARD)),1)
SRC_FILES += \
Src/Network/UDPReceive.cpp \
Src/Network/UDPSend.cpp \
Src/Network/WinSockWrap.cpp \
Src/Network/NetBoard.cpp
endif
ifeq ($(strip $(ENABLE_DEBUGGER)),1)
SRC_FILES += \
Src/Debugger/Debugger.cpp \
Src/Debugger/ConsoleDebugger.cpp \
Src/Debugger/SupermodelDebugger.cpp \
Src/Debugger/CPUDebug.cpp \
Src/Debugger/AddressTable.cpp \
Src/Debugger/Breakpoint.cpp \
Src/Debugger/CodeAnalyser.cpp \
Src/Debugger/Exception.cpp \
Src/Debugger/Interrupt.cpp \
Src/Debugger/IO.cpp \
Src/Debugger/Label.cpp \
Src/Debugger/Register.cpp \
Src/Debugger/Watch.cpp \
Src/Debugger/CodeAnalyser.cpp \
Src/Debugger/Exception.cpp \
Src/Debugger/Interrupt.cpp \
Src/Debugger/DebuggerIO.cpp \
Src/Debugger/Label.cpp \
Src/Debugger/Register.cpp \
Src/Debugger/Watch.cpp \
Src/Debugger/CPU/PPCDebug.cpp \
Src/Debugger/CPU/68KDebug.cpp \
Src/Debugger/CPU/Musashi68KDebug.cpp \
Src/Debugger/CPU/Z80Debug.cpp
endif
OBJ_FILES = $(foreach file,$(SRC_FILES),$(OBJ_DIR)/$(basename $(notdir $(file))).o)
#
# Deduce include directories from the source file list. The sort function
Src/Debugger/CPU/Z80Debug.cpp
endif
#
# Sorted-path compile order
#
OBJ_FILES = $(foreach file,$(sort $(SRC_FILES)),$(OBJ_DIR)/$(basename $(notdir $(file))).o)
#
# Deduce include directories from the source file list. The sort function
# removes duplicates and is used to construct a set.
#
INCLUDE_DIRS = $(sort $(foreach file,$(SRC_FILES),$(dir $(file))))
###############################################################################
# Output Locations
###############################################################################
ifeq ($(strip $(BITS)),64)
OBJ_DIR = obj64
BIN_DIR = bin64
else ifeq ($(strip $(BITS)),32)
OBJ_DIR = obj32
BIN_DIR = bin32
else
OBJ_DIR = obj
BIN_DIR = bin
endif
OUTFILE = Supermodel
###############################################################################
# Compiler Flags
###############################################################################
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 $(BIN_DIR)/$(OUTFILE) $(PLATFORM_LDFLAGS) $(SDL_LDFLAGS) -s
# If built-in debugger enabled, need to define SUPERMODEL_DEBUGGER
ifeq ($(strip $(ENABLE_DEBUGGER)),yes)
PLATFORM_CFLAGS += -DSUPERMODEL_DEBUGGER
endif
# Output Locations
###############################################################################
OBJ_DIR = obj$(strip $(BITS))
BIN_DIR = bin$(strip $(BITS))
OUTFILE = supermodel
MUSASHI_OUTFILE = m68kmake
###############################################################################
# Compiler Flags
###############################################################################
ARCH = -march=native -mfpmath=sse
BUILD_CFLAGS =
OPT = -O3
#WARN = -Wall
WARN = -w
CSTD = -std=iso9899:2011
CXXSTD = -std=c++11
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
###############################################################################
#
# Default target: build Supermodel binary. Must be specified *before* the auto-
# generated dependencies because otherwise, make gets confused for some reason
# and thinks the default target is just one of the object files.
#
all: $(BIN_DIR) $(OBJ_DIR) $(OBJ_FILES)
$(info Linking Supermodel : $(BIN_DIR)/$(OUTFILE))
@$(LD) $(OBJ_FILES) $(LDFLAGS)
$(BIN_DIR):
$(info Creating directory : $(BIN_DIR))
@mkdir $(BIN_DIR)
$(OBJ_DIR):
$(info Creating directory : $(OBJ_DIR))
@mkdir $(OBJ_DIR)
###############################################################################
# generated dependencies because otherwise, make gets confused for some reason
# and thinks the default target is just one of the object files.
#
all: $(BIN_DIR)/$(OUTFILE)
$(BIN_DIR)/$(OUTFILE): $(BIN_DIR) $(OBJ_DIR) $(OBJ_FILES)
$(info --------------------------------------------------------------------------------)
$(info Linking Supermodel : $(BIN_DIR)/$(OUTFILE))
$(SILENT)$(LD) $(OBJ_FILES) $(LDFLAGS)
$(info --------------------------------------------------------------------------------)
$(BIN_DIR):
$(info Creating directory : $(BIN_DIR))
$(SILENT)mkdir $(BIN_DIR)
$(OBJ_DIR):
$(info Creating directory : $(OBJ_DIR))
$(SILENT)mkdir $(OBJ_DIR)
###############################################################################
# Rules
###############################################################################
@ -216,55 +297,59 @@ VPATH = $(INCLUDE_DIRS)
# 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:
# https://stackoverflow.com/questions/8025766/makefile-auto-dependency-generation
#
$(OBJ_DIR)/%.o: %.cpp
$(info Generating dependencies: $< -> $(OBJ_DIR)/$(*F).d)
@$(CXX) -MM -MP -MT $(OBJ_DIR)/$(*F).o -MT $(OBJ_DIR)/$(*F).d $(CXXFLAGS) $< > $(OBJ_DIR)/$(*F).d
$(info Compiling : $< -> $@)
@$(CXX) $(CXXFLAGS) $< -o $@
$(OBJ_DIR)/%.o: %.c
$(info Generating dependencies: $< -> $(OBJ_DIR)/$(*F).d)
@$(CC) -MM -MP -MT $(OBJ_DIR)/$(*F).o -MT $(OBJ_DIR)/$(*F).d $(CPPFLAGS) $< > $(OBJ_DIR)/$(*F).d
$(info Compiling : $< -> $@)
@$(CC) $(CFLAGS) $< -o $@
#
# Musashi 68K emulator
#
$(OBJ_DIR)/%.o: %.cpp
$(info Generating dependencies: $< -> $(OBJ_DIR)/$(*F).d)
$(SILENT)$(CXX) -MM -MP -MT $(OBJ_DIR)/$(*F).o -MT $(OBJ_DIR)/$(*F).d $(CXXFLAGS) $< > $(OBJ_DIR)/$(*F).d
$(info Compiling : $< -> $@)
$(SILENT)$(CXX) $(CXXFLAGS) $< -o $@
$(OBJ_DIR)/%.o: %.c
$(info Generating dependencies: $< -> $(OBJ_DIR)/$(*F).d)
$(SILENT)$(CC) -MM -MP -MT $(OBJ_DIR)/$(*F).o -MT $(OBJ_DIR)/$(*F).d $(CFLAGS) $< > $(OBJ_DIR)/$(*F).d
$(info Compiling : $< -> $@)
$(SILENT)$(CC) $(CFLAGS) $< -o $@
#
# Musashi 68K emulator
#
# 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.
#
MUSASHI_CFLAGS = -ISrc/CPU/68K/Musashi -I$(OBJ_DIR) -DINLINE="static inline" -Wno-unused-variable
MUSASHI_LDFLAGS = -o $(MUSASHI_OUTFILE) $(OBJ_DIR)/m68kmake.o
$(MUSASHI_OUTFILE): Src/CPU/68K/Musashi/m68kmake.c Src/CPU/68K/Musashi/m68k_in.c
$(info Compiling : $< -> $(OBJ_DIR)/m68kmake.o)
@$(CC) $< $(CFLAGS) -o $(OBJ_DIR)/m68kmake.o
$(info Linking : $(MUSASHI_OUTFILE))
@$(LD) $(MUSASHI_LDFLAGS)
$(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: $@)
@$(MUSASHI_OUTFILE) $(OBJ_DIR) Src/CPU/68K/Musashi/m68k_in.c
$(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 : $< -> $@)
@$(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 $(MUSASHI_OUTFILE)
$(info Compiling : $< -> $@)
@$(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 $(MUSASHI_OUTFILE)
$(info Compiling : $< -> $@)
@$(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 $(MUSASHI_OUTFILE)
$(info Compiling : $< -> $@)
@$(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 $(MUSASHI_OUTFILE)
$(info Compiling : $< -> $@)
@$(CC) $< $(CFLAGS) $(MUSASHI_CFLAGS) -o $@
#
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
$(OBJ_DIR)/$(MUSASHI_OUTFILE): Src/CPU/68K/Musashi/m68kmake.c
$(info --------------------------------------------------------------------------------)
$(info Compiling : $< -> $(OBJ_DIR)/m68kmake.o)
$(SILENT)$(CC) $< $(CFLAGS) -o $(OBJ_DIR)/m68kmake.o
$(info Linking : $(MUSASHI_OUTFILE))
$(SILENT)$(LD) $(MUSASHI_LDFLAGS)
$(OBJ_DIR)/m68kops.h: $(OBJ_DIR)/$(MUSASHI_OUTFILE) Src/CPU/68K/Musashi/m68k_in.c
$(info Generating 68K emulator: $@)
$(SILENT)$(OBJ_DIR)/$(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
$(info Compiling : $< -> $@)
$(SILENT)$(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
$(info Compiling : $< -> $@)
$(SILENT)$(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
$(info Compiling : $< -> $@)
$(SILENT)$(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
$(info Compiling : $< -> $@)
$(SILENT)$(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
$(info Compiling : $< -> $@)
$(SILENT)$(CC) $< $(CFLAGS) $(MUSASHI_CFLAGS) -o $@

View file

@ -25,6 +25,7 @@
#ifdef SUPERMODEL_DEBUGGER
#include "Supermodel.h"
#include "CPUDebug.h"
#include "CodeAnalyser.h"
#include "Label.h"

View file

@ -35,13 +35,13 @@
#include "CodeAnalyser.h"
#include "AddressTable.h"
#include "Breakpoint.h"
#include "Debugger.h"
#include "Exception.h"
#include "Interrupt.h"
#include "IO.h"
#include "Register.h"
#include "Watch.h"
#include "Debugger.h"
#include "Exception.h"
#include "Interrupt.h"
#include "DebuggerIO.h"
#include "Register.h"
#include "Watch.h"
#ifdef DEBUGGER_HASBLOCKFILE
#include "BlockFile.h"
#endif // DEBUGGER_HASBLOCKFILE

View file

@ -25,6 +25,7 @@
#ifdef SUPERMODEL_DEBUGGER
#include "Supermodel.h"
#include "Debugger.h"
#include "CPUDebug.h"

View file

@ -26,7 +26,7 @@
#ifdef SUPERMODEL_DEBUGGER
#include "CPUDebug.h"
#include "IO.h"
#include "DebuggerIO.h"
#include "Watch.h"
namespace Debugger

View file

@ -24,13 +24,13 @@
*/
#ifdef SUPERMODEL_DEBUGGER
#include "CPUDebug.h"
#include "Debugger.h"
#include "IO.h"
#include "Watch.h"
#include <string>
#include "CPUDebug.h"
#include "Debugger.h"
#include "DebuggerIO.h"
#include "Watch.h"
#include <string>
using namespace std;
namespace Debugger

View file

@ -4,6 +4,12 @@
#include <WS2tcpip.h>
#include <stdio.h>
#ifdef __GNUC__
extern "C" {
WINSOCK_API_LINKAGE INT WSAAPI inet_pton(INT Family, PCSTR pszAddrString, PVOID pAddrBuf);
}
#endif
namespace SMUDP
{

View file

@ -301,7 +301,7 @@ xcopy /D /Y "$(ProjectDir)\SDL\$(Platform)\$(Configuration)\SDL.dll" "$(TargetDi
<ClCompile Include="..\Src\Debugger\Debugger.cpp" />
<ClCompile Include="..\Src\Debugger\Exception.cpp" />
<ClCompile Include="..\Src\Debugger\Interrupt.cpp" />
<ClCompile Include="..\Src\Debugger\IO.cpp" />
<ClCompile Include="..\Src\Debugger\DebuggerIO.cpp" />
<ClCompile Include="..\Src\Debugger\Label.cpp" />
<ClCompile Include="..\Src\Debugger\Register.cpp" />
<ClCompile Include="..\Src\Debugger\SupermodelDebugger.cpp" />
@ -527,7 +527,7 @@ xcopy /D /Y "$(ProjectDir)\SDL\$(Platform)\$(Configuration)\SDL.dll" "$(TargetDi
<ClInclude Include="..\Src\Debugger\Debugger.h" />
<ClInclude Include="..\Src\Debugger\Exception.h" />
<ClInclude Include="..\Src\Debugger\Interrupt.h" />
<ClInclude Include="..\Src\Debugger\IO.h" />
<ClInclude Include="..\Src\Debugger\DebuggerIO.h" />
<ClInclude Include="..\Src\Debugger\Label.h" />
<ClInclude Include="..\Src\Debugger\Register.h" />
<ClInclude Include="..\Src\Debugger\SupermodelDebugger.h" />

View file

@ -335,9 +335,6 @@
<ClCompile Include="..\Src\Debugger\Interrupt.cpp">
<Filter>Source Files\Debugger</Filter>
</ClCompile>
<ClCompile Include="..\Src\Debugger\IO.cpp">
<Filter>Source Files\Debugger</Filter>
</ClCompile>
<ClCompile Include="..\Src\Debugger\Label.cpp">
<Filter>Source Files\Debugger</Filter>
</ClCompile>
@ -464,6 +461,9 @@
<ClCompile Include="..\Src\Network\NetBoard.cpp">
<Filter>Source Files\Network</Filter>
</ClCompile>
<ClCompile Include="..\Src\Debugger\DebuggerIO.cpp">
<Filter>Source Files\Debugger</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<MASM Include="..\Src\CPU\68K\Turbo68K\Turbo68K.asm">
@ -718,9 +718,6 @@
<ClInclude Include="..\Src\Debugger\Interrupt.h">
<Filter>Header Files\Debugger</Filter>
</ClInclude>
<ClInclude Include="..\Src\Debugger\IO.h">
<Filter>Header Files\Debugger</Filter>
</ClInclude>
<ClInclude Include="..\Src\Debugger\Label.h">
<Filter>Header Files\Debugger</Filter>
</ClInclude>
@ -862,6 +859,9 @@
<ClInclude Include="..\Src\Network\NetBoard.h">
<Filter>Header Files\Network</Filter>
</ClInclude>
<ClInclude Include="..\Src\Debugger\DebuggerIO.h">
<Filter>Header Files\Debugger</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<CustomBuild Include="..\Src\Debugger\ReadMe.txt">