Reworking of DLL build rules.

Allows static libraries and DLLs to be built without having
to do a 'make clean' in between on Cygwin and MinGW targets.
The Cygwin build still crashes when SHARED_LIBRARIES = YES
though, loading Com.dll seems to cause the problem.
This commit is contained in:
Andrew Johnson
2012-07-27 16:24:39 -05:00
parent c23b907eee
commit 97490f6977
18 changed files with 305 additions and 264 deletions

View File

@@ -37,15 +37,14 @@ TESTLIBNAME = $(TESTBUILD_LIBRARY:%=$(LIB_PREFIX)%$(LIB_SUFFIX))
#--------------------------------------------------
# Prod: DEPLIBS, LDFLAGS, and LDLIBS definitions
PROD_DEPLIBS=$(foreach lib,$(PROD_LIBS) $(USR_LIBS), \
$(firstword $(wildcard $(addsuffix /$(LIB_PREFIX)$(lib).*, \
$($(lib)_DIR) $(SHRLIB_SEARCH_DIRS))) \
$(addsuffix /$(LIB_PREFIX)$(lib)$(LIB_SUFFIX), \
$(firstword $($(lib)_DIR) $(INSTALL_LIB)))))
PROD_DEPLIBS = $(foreach lib,$(PROD_LIBS) $(USR_LIBS), \
$(firstword $(wildcard \
$(addsuffix /$(LIB_PREFIX)$(lib)$(LIB_SUFFIX), \
$($(lib)_DIR) $(SHRLIB_SEARCH_DIRS))) \
$(addsuffix /$(LIB_PREFIX)$(lib)$(LIB_SUFFIX), $(INSTALL_LIB))))
PROD_LDLIBS = $(addprefix -l,$($*_LDLIBS) $(PROD_LIBS) $(USR_LIBS)\
$($*_SYS_LIBS) $(PROD_SYS_LIBS) $(USR_SYS_LIBS))
PROD_LDLIBS = $(addprefix -l,$($*_LDLIBS) $(PROD_LIBS) $(USR_LIBS) \
$($*_SYS_LIBS) $(PROD_SYS_LIBS) $(USR_SYS_LIBS))
PROD_DEPLIB_DIRS = $(dir $($*_DEPLIBS)) $(dir $(PROD_DEPLIBS))
PRODDIR_LDFLAGS += $(sort $(PROD_DEPLIB_DIRS:%=-L%))