From: Peter Johnson Date: Tue, 7 Dec 2004 08:05:51 +0000 (-0000) Subject: Fix up VC, flat, DJ build files to match build changes made in [1183]. X-Git-Tag: v0.5.0rc1~187 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2ebbb437647f9e54ce99b8c01f5000fd14f7ea4e;p=yasm Fix up VC, flat, DJ build files to match build changes made in [1183]. svn path=/trunk/yasm/; revision=1187 --- diff --git a/Mkfiles/Makefile.dj b/Mkfiles/Makefile.dj index 9520b828..66c56a13 100644 --- a/Mkfiles/Makefile.dj +++ b/Mkfiles/Makefile.dj @@ -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) diff --git a/Mkfiles/Makefile.flat b/Mkfiles/Makefile.flat index a71057bf..ec3569e4 100644 --- a/Mkfiles/Makefile.flat +++ b/Mkfiles/Makefile.flat @@ -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) diff --git a/Mkfiles/vc/genmodule/genmodule.vcproj b/Mkfiles/vc/genmodule/genmodule.vcproj new file mode 100644 index 00000000..fd4671dd --- /dev/null +++ b/Mkfiles/vc/genmodule/genmodule.vcproj @@ -0,0 +1,133 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Mkfiles/vc/genmodule/run.bat b/Mkfiles/vc/genmodule/run.bat new file mode 100644 index 00000000..fa5a90d1 --- /dev/null +++ b/Mkfiles/vc/genmodule/run.bat @@ -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 diff --git a/Mkfiles/vc/libyasm/libyasm.vcproj b/Mkfiles/vc/libyasm/libyasm.vcproj index 034bdfc2..1891b729 100644 --- a/Mkfiles/vc/libyasm/libyasm.vcproj +++ b/Mkfiles/vc/libyasm/libyasm.vcproj @@ -343,6 +343,9 @@ BasicRuntimeChecks="3"/> + + diff --git a/Mkfiles/vc/yasm.sln b/Mkfiles/vc/yasm.sln index 4427f204..56bcfd3f 100644 --- a/Mkfiles/vc/yasm.sln +++ b/Mkfiles/vc/yasm.sln @@ -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 diff --git a/Mkfiles/vc/yasm.vcproj b/Mkfiles/vc/yasm.vcproj index 9ecacaa9..dec2e413 100644 --- a/Mkfiles/vc/yasm.vcproj +++ b/Mkfiles/vc/yasm.vcproj @@ -137,29 +137,6 @@ - - - - - - - - - - [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