mirror of
https://github.com/vishapoberon/compiler.git
synced 2026-04-06 04:02:25 +00:00
Support Microsoft C make again following dual library (O2 and OC) support.
This commit is contained in:
parent
a17c087a41
commit
eeb168c026
12 changed files with 285 additions and 212 deletions
|
|
@ -72,6 +72,7 @@ PROCEDURE LinkMain*(VAR moduleName: ARRAY OF CHAR; statically: BOOLEAN; addition
|
|||
Strings.Append(Configuration.libspec, cmd);
|
||||
Strings.Append('-O', cmd);
|
||||
Strings.Append(OPM.Model, cmd);
|
||||
Strings.Append(Configuration.libext, cmd);
|
||||
execute("Assemble and link: ", cmd);
|
||||
END LinkMain;
|
||||
|
||||
|
|
|
|||
|
|
@ -26,6 +26,9 @@
|
|||
#define _SIZE_T_DEFINED_ // For OpenBSD
|
||||
|
||||
void *memcpy(void *dest, const void *source, size_t size);
|
||||
#if defined _WIN32
|
||||
#define alloca _alloca
|
||||
#endif
|
||||
void *alloca(size_t size);
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -54,6 +54,7 @@ char *version = macrotostring(O_VER);
|
|||
char *objext = ".o";
|
||||
char *objflag = " -o ";
|
||||
char *linkflags = " -L\"";
|
||||
char *libext = "";
|
||||
char *oname = NULL; // From O_NAME env var if present, or O_NAME macro otherwise.
|
||||
|
||||
|
||||
|
|
@ -154,7 +155,8 @@ void determineCCompiler() {
|
|||
objext = ".obj";
|
||||
objflag = " -Fe";
|
||||
linkflags = " -link -libpath:\"";
|
||||
snprintf(libspec, sizeof(libspec), " lib%s.lib", oname);
|
||||
snprintf(libspec, sizeof(libspec), " lib%s", oname);
|
||||
libext = ".lib";
|
||||
#else
|
||||
fail("Unrecognised C compiler.");
|
||||
#endif
|
||||
|
|
@ -412,6 +414,7 @@ void writeConfigurationMod() {
|
|||
fprintf(fd, " objflag* = '%s';\n", objflag);
|
||||
fprintf(fd, " linkflags* = '%s';\n", linkflags);
|
||||
fprintf(fd, " libspec* = '%s';\n", libspec);
|
||||
fprintf(fd, " libext* = '%s';\n", libext);
|
||||
fprintf(fd, " compile* = '%s';\n", cc);
|
||||
fprintf(fd, " installdir* = '%s';\n", installdir);
|
||||
fprintf(fd, " staticLink* = '%s';\n", staticlink);
|
||||
|
|
|
|||
|
|
@ -254,6 +254,7 @@ ooc:
|
|||
cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Ffs -O$(MODEL) ../../../src/library/ooc/oocTextRider.Mod
|
||||
cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Ffs -O$(MODEL) ../../../src/library/ooc/oocBinaryRider.Mod
|
||||
cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Ffs -O$(MODEL) ../../../src/library/ooc/oocJulianDay.Mod
|
||||
cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Ffs -O$(MODEL) ../../../src/library/ooc/oocFilenames.Mod
|
||||
cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Ffs -O$(MODEL) ../../../src/library/ooc/oocwrapperlibc.Mod
|
||||
cd $(BUILDDIR)/$(MODEL); $(ROOTDIR)/$(OBECOMP) -Ffs -O$(MODEL) ../../../src/library/ooc/oocC$(DATAMODEL).Mod
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue