modify gmake Makefile LINKCMD $(TARGET) to "$@" issue #125

This commit is contained in:
leeonix 2015-06-25 07:03:10 +08:00 committed by Damien Courtois
parent 7101edc54d
commit 91ec1f2f4f
2 changed files with 7 additions and 7 deletions

View File

@ -426,9 +426,9 @@
function make.linkCmd(cfg, toolset)
if cfg.kind == premake.STATICLIB then
if cfg.architecture == premake.UNIVERSAL then
_p(' LINKCMD = libtool -o $(TARGET) $(OBJECTS)')
_p(' LINKCMD = libtool -o "$@" $(OBJECTS)')
else
_p(' LINKCMD = $(AR) -rcs $(TARGET) $(OBJECTS)')
_p(' LINKCMD = $(AR) -rcs "$@" $(OBJECTS)')
end
else
-- this was $(TARGET) $(LDFLAGS) $(OBJECTS)
@ -437,7 +437,7 @@
-- $(LIBS) moved to end (http://sourceforge.net/p/premake/bugs/279/)
local cc = iif(cfg.language == "C", "CC", "CXX")
_p(' LINKCMD = $(%s) -o $(TARGET) $(OBJECTS) $(RESOURCES) $(ALL_LDFLAGS) $(LIBS)', cc)
_p(' LINKCMD = $(%s) -o "$@" $(OBJECTS) $(RESOURCES) $(ALL_LDFLAGS) $(LIBS)', cc)
end
end

View File

@ -36,7 +36,7 @@
prepare { "ldFlags", "linkCmd" }
test.capture [[
ALL_LDFLAGS += $(LDFLAGS) -s -shared
LINKCMD = $(CXX) -o $(TARGET) $(OBJECTS) $(RESOURCES) $(ALL_LDFLAGS) $(LIBS)
LINKCMD = $(CXX) -o "$@" $(OBJECTS) $(RESOURCES) $(ALL_LDFLAGS) $(LIBS)
]]
end
@ -51,7 +51,7 @@
prepare { "ldFlags", "linkCmd" }
test.capture [[
ALL_LDFLAGS += $(LDFLAGS) -s -shared
LINKCMD = $(CC) -o $(TARGET) $(OBJECTS) $(RESOURCES) $(ALL_LDFLAGS) $(LIBS)
LINKCMD = $(CC) -o "$@" $(OBJECTS) $(RESOURCES) $(ALL_LDFLAGS) $(LIBS)
]]
end
@ -65,7 +65,7 @@
prepare { "ldFlags", "linkCmd" }
test.capture [[
ALL_LDFLAGS += $(LDFLAGS) -s
LINKCMD = $(AR) -rcs $(TARGET) $(OBJECTS)
LINKCMD = $(AR) -rcs "$@" $(OBJECTS)
]]
end
@ -80,7 +80,7 @@
prepare { "ldFlags", "linkCmd" }
test.capture [[
ALL_LDFLAGS += $(LDFLAGS) -s
LINKCMD = libtool -o $(TARGET) $(OBJECTS)
LINKCMD = libtool -o "$@" $(OBJECTS)
]]
end