From 0e7b9d94e5cbc84d4c1341a3c9d1cdc7c6a21dfb Mon Sep 17 00:00:00 2001 From: nishi Date: Wed, 8 May 2024 02:17:21 +0000 Subject: [PATCH] fix again git-svn-id: file:///raid/svn-main/nishi-serenade/trunk@123 0f02c867-ac3d-714e-8a88-971ba1f6efcf --- Tool/config.c | 6 ++++++ WinBuild/build.bat | 4 ++-- WinBuild/winbuild.c | 10 +++++----- 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/Tool/config.c b/Tool/config.c index 3e686e6..7070f60 100644 --- a/Tool/config.c +++ b/Tool/config.c @@ -12,11 +12,16 @@ int main(int argc, char** argv) { } char* argv2 = argv[2] == NULL ? "" : argv[2]; if(strcmp(argv[1], "cflags") == 0) { +#ifdef _MSC_VER +#else if(strcmp(argv2, "NetBSD") == 0) { printf("-I/usr/pkg/include "); } +#endif printf("\n"); } else if(strcmp(argv[1], "libs") == 0) { +#ifdef _MSC_VER +#else if(strcmp(argv2, "NetBSD") == 0) { printf("-L/usr/pkg/lib -Wl,-R/usr/pkg/lib "); } @@ -33,6 +38,7 @@ int main(int argc, char** argv) { if(strcmp(argv2, "NetBSD") != 0 && strcmp(argv2, "Windows") != 0) { printf("-ldl "); } +#endif #endif printf("\n"); } else if(strcmp(argv[1], "reqobjs") == 0){ diff --git a/WinBuild/build.bat b/WinBuild/build.bat index c20509f..8a807ed 100644 --- a/WinBuild/build.bat +++ b/WinBuild/build.bat @@ -3,5 +3,5 @@ REM $Id$ del winbuild.exe REM Change as you want call "C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\Tools\VsDevCmd.bat" -cl /Fe:winbuild.exe winbuild.c -winbuild.exe \ No newline at end of file +cl /nologo /Fe:winbuild.exe winbuild.c +winbuild.exe diff --git a/WinBuild/winbuild.c b/WinBuild/winbuild.c index 2a339e0..05665bd 100644 --- a/WinBuild/winbuild.c +++ b/WinBuild/winbuild.c @@ -50,7 +50,7 @@ int main(){ fprintf(stderr, "Run me from the WinBuild directory\n"); return 1; } - system("cl /Fe:..\\Tool\\configgen.exe ..\\Tool\\configgen.c"); + system("cl /nologo /Fe:..\\Tool\\configgen.exe ..\\Tool\\configgen.c"); FILE* f = fopen("..\\config.h", "r"); if(f != NULL){ printf("config.h already exists, remove it to generate it again.\n"); @@ -58,7 +58,7 @@ int main(){ }else{ system("..\\Tool\\configgen.exe ..\\config.h"); } - system("cl /Fe:..\\Tool\\config.exe ..\\Tool\\config.c"); + system("cl /nologo /Fe:..\\Tool\\config.exe ..\\Tool\\config.c"); system("..\\Tool\\config.exe reqobjs Windows >buildobjs"); system("..\\Tool\\config.exe objs Windows >>buildobjs"); f = fopen("buildobjs", "r"); @@ -79,7 +79,7 @@ int main(){ objs = dynstrcat3(objstmp, " ", buf); char* cfile = dynstrdup(buf); cfile[strlen(cfile) - 1] = 'c'; - char* argtmp1 = dynstrcat("cl /c /D _AMD64_ /Fo:", buf); + char* argtmp1 = dynstrcat("cl /nologo /c /D _AMD64_ /Fo:", buf); char* argtmp2 = dynstrcat(argtmp1, " "); char* arg = dynstrcat(argtmp2, cfile); system(arg); @@ -99,7 +99,7 @@ int main(){ } free(buf); - char* cmd = dynstrcat("cl /Fe:serenade.exe ", objs); + char* cmd = dynstrcat("cl /nologo /Fe:serenade.exe ", objs); system(cmd); free(cmd); @@ -108,4 +108,4 @@ int main(){ chdir("WinBuild"); } fclose(f); -} \ No newline at end of file +} -- 2.43.0