diff --git a/gconfig/rules.mk b/gconfig/rules.mk index ab793b201190..ab95523dbc44 100644 --- a/gconfig/rules.mk +++ b/gconfig/rules.mk @@ -233,10 +233,10 @@ ifeq ($(OS_TARGET),WIN16) $(LINK) @w16link. rm w16link else - $(LINK_EXE) $(MAP) $(PDB) $(IMP) $(OBJS) $(OUT_NAME)$(PROGRAM) $(LDFLAGS) $(OS_LIBS) $(LD_LIBS) $(EXTRA_LIBS) $(RESFILE) + $(LINK_EXE) $(MAP) $(PDB) $(IMP) $(OBJS) $(OUT_NAME)$(PROGRAM) $(LDFLAGS) $(STATIC_LIBS) $(OS_LIBS) $(LD_LIBS) $(EXTRA_LIBS) $(RESFILE) endif else - $(LINK_PROGRAM) -o $@ $(CFLAGS) $(OBJS) $(LDFLAGS) $(EXTRA_LIBS) $(LD_LIBS) $(OS_LIBS) + $(LINK_PROGRAM) -o $@ $(CFLAGS) $(OBJS) $(LDFLAGS) $(STATIC_LIBS) $(LD_LIBS) $(EXTRA_LIBS) $(OS_LIBS) endif $(LIBRARY): $(OBJS) $(AR_LIBS) diff --git a/gconfig/ruleset.mk b/gconfig/ruleset.mk index 97d825b12ed7..16f9e3d9d1be 100644 --- a/gconfig/ruleset.mk +++ b/gconfig/ruleset.mk @@ -169,12 +169,20 @@ ifdef AR_LIBS endif endif +ifdef STATIC_LIBS + ifeq ($(OS_ARCH), WINNT) + STATIC_LIBS := $(addprefix $(CONFIG_DIST_LIB)$(OPT_SLASH), $(STATIC_LIBS:%=%$(ARCHIVE_SUFFIX)$(STATIC_LIB_SUFFIX))) + else + STATIC_LIBS := $(addprefix $(CONFIG_DIST_LIB)$(OPT_SLASH)lib, $(STATIC_LIBS:%=%_s$(ARCHIVE_SUFFIX)$(STATIC_LIB_SUFFIX))) + endif +endif + # Rules to convert LD_LIBS to platform-dependent naming scheme ifdef LD_LIBS ifeq ($(OS_ARCH), WINNT) LD_LIBS := $(addprefix $(CONFIG_DIST_LIB)$(OPT_SLASH), $(LD_LIBS:%=%$(STATIC_LIB_SUFFIX))) else - LD_LIBS := $(addprefix $(CONFIG_DIST_BIN)$(OPT_SLASH)lib, $(LD_LIBS:%=%$(STATIC_LIB_SUFFIX))) + LD_LIBS := $(addprefix $(DIST)$(OPT_SLASH)bin$(OPT_SLASH)lib, $(LD_LIBS:%=%.$(DLL_SUFFIX))) endif endif