fix lib.exe invocation for msvc

This commit is contained in:
Brad Parker
2017-09-15 22:45:30 -04:00
parent 758304733b
commit 90e8e098e7

View File

@@ -570,7 +570,7 @@ ifneq (,$(findstring msvc,$(platform)))
OBJOUT = -Fo
LINKOUT = -out:
ifeq ($(STATIC_LINKING),1)
LD ?= lib.exe
LD = lib.exe
STATIC_LINKING=0
else
LD = link.exe
@@ -590,7 +590,11 @@ else
all: $(TARGET)
$(TARGET): $(OBJECTS)
ifeq ($(STATIC_LINKING),1)
ifneq (,$(findstring msvc,$(platform)))
$(LD) $(LINKOUT)$@ $(OBJECTS)
else
$(AR) rcs $@ $(OBJECTS)
endif
else
$(LD) $(LINKOUT)$@ $(SHARED) $(OBJECTS) $(LDFLAGS) $(LIBS)
endif