mirror of
https://github.com/yasm/yasm
synced 2026-08-26 22:26:05 -04:00
Fix up VC, flat, DJ build files to match build changes made in [1183].
svn path=/trunk/yasm/; revision=1187
This commit is contained in:
parent
7c23a1e805
commit
2ebbb43764
8 changed files with 203 additions and 38 deletions
|
|
@ -9,7 +9,7 @@
|
|||
# How to compile:
|
||||
# make -fMkfiles/Makefile.dj
|
||||
|
||||
CFLAGS=-DHAVE_CONFIG_H -DWIN32 -IMkfiles/dj -O2 -I. -Ifrontends/yasm
|
||||
CFLAGS=-DHAVE_CONFIG_H -IMkfiles/dj -O2 -I. -Ifrontends/yasm
|
||||
CC=gcc
|
||||
|
||||
all: yasm
|
||||
|
|
@ -34,7 +34,8 @@ LIBYASM_OBJS= \
|
|||
libyasm/symrec.o \
|
||||
libyasm/valparam.o \
|
||||
libyasm/xmalloc.o \
|
||||
libyasm/xstrdup.o
|
||||
libyasm/xstrdup.o \
|
||||
module.o
|
||||
|
||||
MODULES_ARCH_X86_OBJS= \
|
||||
modules/arch/x86/x86arch.o \
|
||||
|
|
@ -52,7 +53,8 @@ MODULES_ARCH_OBJS= \
|
|||
$(MODULES_ARCH_LC3B_OBJS)
|
||||
|
||||
MODULES_DBGFMTS_OBJS= \
|
||||
modules/dbgfmts/null/null-dbgfmt.o
|
||||
modules/dbgfmts/null/null-dbgfmt.o \
|
||||
modules/dbgfmts/stabs/stabs-dbgfmt.o
|
||||
|
||||
MODULES_LISTFMTS_OBJS= \
|
||||
modules/listfmts/nasm/nasm-listfmt.o
|
||||
|
|
@ -100,7 +102,6 @@ MODULES_OBJS = \
|
|||
|
||||
YASM_OBJS= \
|
||||
frontends/yasm/yasm.o \
|
||||
Mkfiles/vc/yasm-module.o \
|
||||
frontends/yasm/yasm-options.o \
|
||||
$(LIBYASM_OBJS) \
|
||||
$(MODULES_OBJS)
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
# CFLAGS appropriately, along with writing a config.h for the platform and
|
||||
# placing it in a libyasm subdirectory.
|
||||
|
||||
CFLAGS=-DHAVE_CONFIG_H -DWIN32 -IMkfiles -I. -Ifrontends/yasm
|
||||
CFLAGS=-DHAVE_CONFIG_H -IMkfiles -I. -Ifrontends/yasm
|
||||
CC=gcc
|
||||
|
||||
all: yasm
|
||||
|
|
@ -37,7 +37,8 @@ LIBYASM_OBJS= \
|
|||
libyasm/symrec.o \
|
||||
libyasm/valparam.o \
|
||||
libyasm/xmalloc.o \
|
||||
libyasm/xstrdup.o
|
||||
libyasm/xstrdup.o \
|
||||
module.o
|
||||
|
||||
MODULES_ARCH_X86_OBJS= \
|
||||
modules/arch/x86/x86arch.o \
|
||||
|
|
@ -55,7 +56,8 @@ MODULES_ARCH_OBJS= \
|
|||
$(MODULES_ARCH_LC3B_OBJS)
|
||||
|
||||
MODULES_DBGFMTS_OBJS= \
|
||||
modules/dbgfmts/null/null-dbgfmt.o
|
||||
modules/dbgfmts/null/null-dbgfmt.o \
|
||||
modules/dbgfmts/stabs/stabs-dbgfmt.o
|
||||
|
||||
MODULES_LISTFMTS_OBJS= \
|
||||
modules/listfmts/nasm/nasm-listfmt.o
|
||||
|
|
@ -103,7 +105,6 @@ MODULES_OBJS = \
|
|||
|
||||
YASM_OBJS= \
|
||||
frontends/yasm/yasm.o \
|
||||
Mkfiles/vc/yasm-module.o \
|
||||
frontends/yasm/yasm-options.o \
|
||||
$(LIBYASM_OBJS) \
|
||||
$(MODULES_OBJS)
|
||||
|
|
|
|||
133
Mkfiles/vc/genmodule/genmodule.vcproj
Normal file
133
Mkfiles/vc/genmodule/genmodule.vcproj
Normal file
|
|
@ -0,0 +1,133 @@
|
|||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="7.10"
|
||||
Name="genmodule"
|
||||
ProjectGUID="{F0E8B707-00C5-4FF2-B8EF-7C39817132A0}"
|
||||
Keyword="Win32Proj">
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"/>
|
||||
</Platforms>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="Debug"
|
||||
IntermediateDirectory="Debug"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
|
||||
MinimalRebuild="TRUE"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="5"
|
||||
UsePrecompiledHeader="3"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="TRUE"
|
||||
DebugInformationFormat="4"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
OutputFile="$(OutDir)/genmodule.exe"
|
||||
LinkIncremental="2"
|
||||
GenerateDebugInformation="TRUE"
|
||||
ProgramDatabaseFile="$(OutDir)/genmodule.pdb"
|
||||
SubSystem="1"
|
||||
TargetMachine="1"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"/>
|
||||
<Tool
|
||||
Name="VCManagedWrapperGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="Release"
|
||||
IntermediateDirectory="Release"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;FILTERMODE"
|
||||
RuntimeLibrary="4"
|
||||
UsePrecompiledHeader="2"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="TRUE"
|
||||
DebugInformationFormat="3"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
OutputFile="$(OutDir)/genmodule.exe"
|
||||
LinkIncremental="1"
|
||||
GenerateDebugInformation="TRUE"
|
||||
SubSystem="1"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
TargetMachine="1"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
CommandLine="run.bat $(TargetPath)"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"/>
|
||||
<Tool
|
||||
Name="VCManagedWrapperGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
|
||||
<File
|
||||
RelativePath="..\..\..\libyasm\genmodule.c">
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Header Files"
|
||||
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
||||
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Resource Files"
|
||||
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
|
||||
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
||||
6
Mkfiles/vc/genmodule/run.bat
Normal file
6
Mkfiles/vc/genmodule/run.bat
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
@echo off
|
||||
cd ..\..\..
|
||||
echo "" >temp.txt
|
||||
for /R modules %%n in (*.c) do find "_LTX_" %%n | find "_module" | find "= {" >>temp.txt
|
||||
type temp.txt | %1 libyasm\module.in
|
||||
del temp.txt
|
||||
|
|
@ -343,6 +343,9 @@
|
|||
BasicRuntimeChecks="3"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\module.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\libyasm\objfmt.c">
|
||||
</File>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
Microsoft Visual Studio Solution File, Format Version 8.00
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libyasm", "libyasm\libyasm.vcproj", "{29FE7874-1256-4AD6-B889-68E399DC9608}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{F0E8B707-00C5-4FF2-B8EF-7C39817132A0} = {F0E8B707-00C5-4FF2-B8EF-7C39817132A0}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "modules", "modules\modules.vcproj", "{D715A3D4-EFAA-442E-AD8B-5B4FF64E1DD6}"
|
||||
|
|
@ -24,6 +25,10 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "re2c", "re2c\re2c.vcproj",
|
|||
ProjectSection(ProjectDependencies) = postProject
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "genmodule", "genmodule\genmodule.vcproj", "{F0E8B707-00C5-4FF2-B8EF-7C39817132A0}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfiguration) = preSolution
|
||||
Debug = Debug
|
||||
|
|
@ -50,6 +55,10 @@ Global
|
|||
{3C58BE13-50A3-4583-984D-D8902B3D7713}.Debug.Build.0 = Debug|Win32
|
||||
{3C58BE13-50A3-4583-984D-D8902B3D7713}.Release.ActiveCfg = Release|Win32
|
||||
{3C58BE13-50A3-4583-984D-D8902B3D7713}.Release.Build.0 = Release|Win32
|
||||
{F0E8B707-00C5-4FF2-B8EF-7C39817132A0}.Debug.ActiveCfg = Debug|Win32
|
||||
{F0E8B707-00C5-4FF2-B8EF-7C39817132A0}.Debug.Build.0 = Debug|Win32
|
||||
{F0E8B707-00C5-4FF2-B8EF-7C39817132A0}.Release.ActiveCfg = Release|Win32
|
||||
{F0E8B707-00C5-4FF2-B8EF-7C39817132A0}.Release.Build.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
EndGlobalSection
|
||||
|
|
|
|||
|
|
@ -137,29 +137,6 @@
|
|||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
|
||||
<File
|
||||
RelativePath="yasm-module.c">
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="../../frontends/yasm"
|
||||
PreprocessorDefinitions=""
|
||||
BasicRuntimeChecks="3"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
AdditionalIncludeDirectories="../../frontends/yasm"
|
||||
PreprocessorDefinitions=""/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\frontends\yasm\yasm-module.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\frontends\yasm\yasm-options.c">
|
||||
<FileConfiguration
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@
|
|||
|
||||
#define OUTPUT "module.c"
|
||||
#define MAXLINE 1024
|
||||
#define MAXMODULES 128
|
||||
|
||||
int
|
||||
main(int argc, char *argv[])
|
||||
|
|
@ -40,12 +41,46 @@ main(int argc, char *argv[])
|
|||
int i;
|
||||
int len;
|
||||
char *strp;
|
||||
char *modules[MAXMODULES];
|
||||
int num_modules = 0;
|
||||
|
||||
if (argc < 2) {
|
||||
fprintf(stderr, "Usage: %s <file> [module_name ...]\n", argv[0]);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
str = malloc(MAXLINE);
|
||||
|
||||
#ifdef FILTERMODE
|
||||
while (fgets(str, MAXLINE, stdin)) {
|
||||
if (strlen(str) < 6)
|
||||
continue;
|
||||
modules[num_modules] = malloc(strlen(str+5)+1); /* excessive */
|
||||
strp = str+5; /* skip past the "yasm_" */
|
||||
i = 0;
|
||||
/* copy the module type */
|
||||
while (*strp != '_')
|
||||
modules[num_modules][i++] = *strp++;
|
||||
modules[num_modules][i++] = *strp++; /* copy the following _ */
|
||||
/* find the next _ */
|
||||
while (*strp++ != '_')
|
||||
{}
|
||||
/* copy it up until the next _ */
|
||||
do {
|
||||
modules[num_modules][i++] = *strp++;
|
||||
} while (*strp != '_');
|
||||
/* terminate string */
|
||||
modules[num_modules][i] = '\0';
|
||||
num_modules++;
|
||||
}
|
||||
#else
|
||||
num_modules = argc-2;
|
||||
for (i=2; i<argc; i++) {
|
||||
modules[i-2] = malloc(strlen(argv[i])+1);
|
||||
strcpy(modules[i-2], argv[i]);
|
||||
}
|
||||
#endif
|
||||
|
||||
out = fopen(OUTPUT, "wt");
|
||||
|
||||
if (!out) {
|
||||
|
|
@ -53,8 +88,6 @@ main(int argc, char *argv[])
|
|||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
str = malloc(MAXLINE);
|
||||
|
||||
fprintf(out, "/* This file auto-generated by genmodule.c"
|
||||
" - don't edit it */\n\n");
|
||||
|
||||
|
|
@ -76,15 +109,15 @@ main(int argc, char *argv[])
|
|||
}
|
||||
*strp = '\0';
|
||||
|
||||
for (i=2; i<argc; i++) {
|
||||
if (strncmp(argv[i], str+8, len) == 0) {
|
||||
for (i=0; i<num_modules; i++) {
|
||||
if (strncmp(modules[i], str+8, len) == 0) {
|
||||
fprintf(out, " {\"%s\", &yasm_%s_LTX_%s},\n",
|
||||
argv[i]+len+1, argv[i]+len+1, str+8);
|
||||
modules[i]+len+1, modules[i]+len+1, str+8);
|
||||
}
|
||||
}
|
||||
} else if (strncmp(str, "EXTERN_LIST", 11) == 0) {
|
||||
for (i=2; i<argc; i++) {
|
||||
strcpy(str, argv[i]);
|
||||
for (i=0; i<num_modules; i++) {
|
||||
strcpy(str, modules[i]);
|
||||
strp = str;
|
||||
while (*strp != '\0' && *strp != '_') {
|
||||
len++;
|
||||
|
|
@ -102,6 +135,8 @@ main(int argc, char *argv[])
|
|||
fclose(in);
|
||||
fclose(out);
|
||||
|
||||
for (i=0; i<num_modules; i++)
|
||||
free(modules[i]);
|
||||
free(str);
|
||||
|
||||
return EXIT_SUCCESS;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue