musashi Windows build using nmake compatible makefile

This commit is contained in:
Jaakko Haakana 2012-10-30 16:19:19 +02:00
parent 14e1bea5b7
commit 8bc7a5284c
13 changed files with 56 additions and 286 deletions

2
.gitignore vendored
View File

@ -3,3 +3,5 @@
Debug/
*.user
ipch/
*.sdf
*.suo

1
musashi/.gitignore vendored
View File

@ -6,3 +6,4 @@ m68kopdm.c
m68kopnz.c
m68kops.c
m68kops.h
*.obj

Binary file not shown.

53
musashi/makefile.win Normal file
View File

@ -0,0 +1,53 @@
# Makefile for musashi Windows
CC = cl
SO_EXT = dll
CFLAGS =
SRC = mem.c m68kcpu.c m68kdasm.c
HDR = mem.h m68k.h m68kcpu.h m68kconf.h
OBJ = mem.obj m68kcpu.obj m68kdasm.obj
GEN_INPUT = m68k_in.c
GEN_SRC = m68kopac.c m68kopdm.c m68kopnz.c m68kops.c
GEN_HDR = m68kops.h
GEN_FILES = $(GEN_SRC) $(GEN_HDR)
GEN_OBJ = m68kopac.obj m68kopdm.obj m68kopnz.obj m68kops.obj
GEN_TOOL_SRC = m68kmake.c
GEN_TOOL_OBJ = m68kmake.obj
GEN_TOOL = m68kmake.exe
ALL_SRC = $(SRC) $(GEN_SRC)
ALL_OBJ = $(OBJ) $(GEN_OBJ)
LIB_FILE = musashi.$(SO_EXT)
all: build
build: $(LIB_FILE)
$(LIB_FILE): $(ALL_OBJ) musashi.def
$(CC) $(ALL_OBJ) musashi.def /Femusashi.dll /link /dll
#$(SRC): $(GEN_HDR) $(HDR)
#gen: $(GEN_TOOL)
#$(GEN_TOOL): $(GEN_OBJ)
# $(CC) $(GEN_TOOL_SRC)
$(GEN_FILES): $(GEN_TOOL) $(GEN_INPUT)
.\$(GEN_TOOL)
$(ALL_OBJ): $(ALL_SRC)
$(CC) /c $(ALL_SRC)
clean: clean_gen
del /q $(GEN_TOOL)
del /q $(ALL_OBJ)
del /q $(LIB_FILE)
clean_gen:
del $(GEN_FILES)

View File

@ -1,40 +0,0 @@
========================================================================
DYNAMIC LINK LIBRARY : musashiWin Project Overview
========================================================================
AppWizard has created this musashiWin DLL for you.
This file contains a summary of what you will find in each of the files that
make up your musashiWin application.
musashiWin.vcxproj
This is the main project file for VC++ projects generated using an Application Wizard.
It contains information about the version of Visual C++ that generated the file, and
information about the platforms, configurations, and project features selected with the
Application Wizard.
musashiWin.vcxproj.filters
This is the filters file for VC++ projects generated using an Application Wizard.
It contains information about the association between the files in your project
and the filters. This association is used in the IDE to show grouping of files with
similar extensions under a specific node (for e.g. ".cpp" files are associated with the
"Source Files" filter).
musashiWin.cpp
This is the main DLL source file.
/////////////////////////////////////////////////////////////////////////////
Other standard files:
StdAfx.h, StdAfx.cpp
These files are used to build a precompiled header (PCH) file
named musashiWin.pch and a precompiled types file named StdAfx.obj.
/////////////////////////////////////////////////////////////////////////////
Other notes:
AppWizard uses "TODO:" comments to indicate parts of the source code you
should add to or customize.
/////////////////////////////////////////////////////////////////////////////

View File

@ -1,22 +0,0 @@
// The following ifdef block is the standard way of creating macros which make exporting
// from a DLL simpler. All files within this DLL are compiled with the MUSASHIWIN_EXPORTS
// symbol defined on the command line. This symbol should not be defined on any project
// that uses this DLL. This way any other project whose source files include this file see
// MUSASHIWIN_API functions as being imported from a DLL, whereas this DLL sees symbols
// defined with this macro as being exported.
#ifdef MUSASHIWIN_EXPORTS
#define MUSASHIWIN_API __declspec(dllexport)
#else
#define MUSASHIWIN_API __declspec(dllimport)
#endif
// This class is exported from the musashiWin.dll
class MUSASHIWIN_API CmusashiWin {
public:
CmusashiWin(void);
// TODO: add your methods here.
};
extern MUSASHIWIN_API int nmusashiWin;
MUSASHIWIN_API int fnmusashiWin(void);

Binary file not shown.

View File

@ -1,29 +0,0 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2012
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "musashiWin", "musashiWin.vcxproj", "{6AE3DA9C-EC21-4DAB-81EB-03DC5EECB718}"
ProjectSection(ProjectDependencies) = postProject
{FEB811BD-18AC-455C-94C5-AF49EC1E7A1F} = {FEB811BD-18AC-455C-94C5-AF49EC1E7A1F}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "m68kmake", "..\m68kmake\m68kmake.vcxproj", "{FEB811BD-18AC-455C-94C5-AF49EC1E7A1F}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Release|Win32 = Release|Win32
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{6AE3DA9C-EC21-4DAB-81EB-03DC5EECB718}.Debug|Win32.ActiveCfg = Debug|Win32
{6AE3DA9C-EC21-4DAB-81EB-03DC5EECB718}.Debug|Win32.Build.0 = Debug|Win32
{6AE3DA9C-EC21-4DAB-81EB-03DC5EECB718}.Release|Win32.ActiveCfg = Release|Win32
{6AE3DA9C-EC21-4DAB-81EB-03DC5EECB718}.Release|Win32.Build.0 = Release|Win32
{FEB811BD-18AC-455C-94C5-AF49EC1E7A1F}.Debug|Win32.ActiveCfg = Debug|Win32
{FEB811BD-18AC-455C-94C5-AF49EC1E7A1F}.Debug|Win32.Build.0 = Debug|Win32
{FEB811BD-18AC-455C-94C5-AF49EC1E7A1F}.Release|Win32.ActiveCfg = Release|Win32
{FEB811BD-18AC-455C-94C5-AF49EC1E7A1F}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

View File

@ -1,119 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{6AE3DA9C-EC21-4DAB-81EB-03DC5EECB718}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>musashiWin</RootNamespace>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v110</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v110</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>true</LinkIncremental>
<TargetName>musashi</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<PrecompiledHeader>Use</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;MUSASHIWIN_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ModuleDefinitionFile>musashiWin.def</ModuleDefinitionFile>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>Use</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;MUSASHIWIN_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<ModuleDefinitionFile>musashiWin.def</ModuleDefinitionFile>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<Text Include="ReadMe.txt" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\m68k.h" />
<ClInclude Include="..\m68kconf.h" />
<ClInclude Include="..\m68kcpu.h" />
<ClInclude Include="..\mem.h" />
<ClInclude Include="musashiWin.h" />
<ClInclude Include="targetver.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\m68kcpu.c">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
</ClCompile>
<ClCompile Include="..\m68kdasm.c">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
</ClCompile>
<ClCompile Include="..\m68kopac.c">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
</ClCompile>
<ClCompile Include="..\m68kopdm.c">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
</ClCompile>
<ClCompile Include="..\m68kopnz.c">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
</ClCompile>
<ClCompile Include="..\m68kops.c">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
</ClCompile>
<ClCompile Include="..\mem.c">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
</ClCompile>
</ItemGroup>
<ItemGroup>
<None Include="musashiWin.def" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@ -1,68 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<Text Include="ReadMe.txt" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="targetver.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="musashiWin.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\m68k.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\m68kconf.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\m68kcpu.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\mem.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\m68kcpu.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\m68kdasm.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\mem.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\m68kopac.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\m68kopdm.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\m68kopnz.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\m68kops.c">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<None Include="musashiWin.def">
<Filter>Source Files</Filter>
</None>
</ItemGroup>
</Project>

View File

@ -1,8 +0,0 @@
#pragma once
// Including SDKDDKVer.h defines the highest available Windows platform.
// If you wish to build your application for a previous Windows platform, include WinSDKVer.h and
// set the _WIN32_WINNT macro to the platform you wish to support before including SDKDDKVer.h.
#include <SDKDDKVer.h>