fix static and shared makefile (#258)

This commit is contained in:
Cyano Hao 2024-03-10 08:05:09 +08:00 committed by GitHub
parent 0328a36893
commit f996426916
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -75,7 +75,7 @@ void ProjectCompiler::createStaticMakeFile()
QString executable = extractRelativePath(mProject->makeFileName(), mProject->executable());
QString exeTarget = escapeFilenameForMakefileTarget(executable);
QString exeCommand = escapeArgumentForMakefileRecipe(executable, false);
writeln(file, exeTarget + ": $(LINKOBJ)");
writeln(file, exeTarget + ": $(OBJ)");
writeln(file, "\tar r " + exeCommand + " $(LINKOBJ)");
writeln(file, "\tranlib " + exeCommand);
writeMakeObjFilesRules(file);
@ -88,7 +88,7 @@ void ProjectCompiler::createDynamicMakeFile()
QString executable = extractRelativePath(mProject->makeFileName(), mProject->executable());
QString exeTarget = escapeFilenameForMakefileTarget(executable);
QString exeCommand = escapeArgumentForMakefileRecipe(executable, false);
writeln(file, exeTarget + ": $(LINKOBJ)");
writeln(file, exeTarget + ": $(OBJ)");
if (mProject->options().isCpp) {
writeln(file, "\t$(CXX) -mdll $(LINKOBJ) -o " + exeCommand + " $(LIBS) -Wl,--output-def,$(DEF),--out-implib,$(STATIC)");
} else {