Commits

Dimitar Trendafilov committed 51de50f

* treating external libraries as system libraries
* cleaning for make action

  • Participants
  • Parent commits 60cb3fc

Comments (0)

Files changed (4)

File src/actions/make/make_cpp.lua

 		
 
 		local deps = config.getlinks(cfg, "siblings", "fullpath")
-		-- temporary disable linker dependencies
-		--_p('  LDDEPS    +=%s', make.list(make.esc(deps)))
+		_p('  LDDEPS    +=%s', make.list(make.esc(deps)))
 
 		if cfg.kind == premake.STATICLIB then
 			if cfg.architecture == premake.UNIVERSAL then

File src/actions/make/make_solution.lua

 			local slnpath = solution.getlocation(sln)
 			local prjpath = project.getfilename(prj, make.getmakefilename(prj, true))
 			local prjdir = path.getdirectory(path.getrelative(slnpath, prjpath))
+			local cfgvar = make.tovar(prj.name)
 			if prj.external and prj.cleancmd then
 				_p(1, string.format(prj.cleancmd, prj.name, prj.externalname))
 			else
-				_p(1,'@${MAKE} -C %s -f %s clean', make.esc(prjdir), make.esc(make.getmakefilename(prj, true)))
+				_p(1,'@${MAKE} -C %s -f %s config=$(%s_config) clean', make.esc(prjdir), make.esc(make.getmakefilename(prj, true)), cfgvar)
 			end
 		end
 		_p('')

File src/project/config.lua

 					-- if the caller wants the whole project object, then okay
 					if part == "object" then
 						item = prjcfg
-					else
+					elseif not prj.external then
 						item = project.getrelative(cfg.project, prjcfg.linktarget.fullpath)
 					end
 				end
 
-			elseif not prj and (kind == "system" or kind == "all") then
+			elseif (not prj or prj.external) and (kind == "system" or kind == "all") then
 				-- Make sure this library makes sense for the requested linkage; don't
 				-- link managed .DLLs into unmanaged code, etc.
 
 				if config.canlink(cfg, link, linkage) then
 					item = config.decoratelink(cfg, link, linkage)
 				end
-
 			end
 
 			-- If this is something I can link against, pull out the requested part

File src/tools/gcc.lua

 			elseif path.isobjectfile(link) then
 				table.insert(result, link)
 			else
-				table.insert(result, "-l" .. path.getbasename(link))
+				table.insert(result, "-l" .. link)
 			end
 		end