From: Jerome Benoit Date: Sun, 3 Sep 2017 17:01:45 +0000 (+0200) Subject: Use a variable for DLL archive MIME type. X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=31ec36151e0789762a75e319f6432967de5bb66c;p=Project_algorithmic_C.git Use a variable for DLL archive MIME type. --- diff --git a/Makefile b/Makefile index 1019d5e..8502017 100644 --- a/Makefile +++ b/Makefile @@ -84,7 +84,7 @@ BINARY_SUFFIX := .exe DLIB_SUFFIX := .dll # do not archive external libraries CYGWIN_LDLIBS_NOARCHIVE := $(filter-out -l$(BINARY_NAME),$(LDLIBS)) -CYGWIN_LIBLDFLAGS := -Wl,--out-implib=$(LIBRARY_PATH)/$(DLIB_PREFIX)$(LIBRARY_NAME)$(DLIB_SUFFIX).a \ +CYGWIN_LIBLDFLAGS := -Wl,--out-implib=$(LIBRARY_PATH)/$(DLIB_PREFIX)$(LIBRARY_NAME)$(DLIB_SUFFIX)$(SLIB_SUFFIX) \ -Wl,--export-all-symbols \ -Wl,--enable-auto-import endif @@ -127,7 +127,7 @@ $(LIBRARY_PATH)/$(SLIB_PREFIX)$(LIBRARY_NAME)$(SLIB_SUFFIX): $(LIBOBJS) @$(AR) rcs $@ $^ ifeq ($(findstring CYGWIN_NT,$(UNAME)),CYGWIN_NT) -$(LIBRARY_PATH)/$(DLIB_PREFIX)$(LIBRARY_NAME)$(DLIB_SUFFIX).a: $(LIBRARY_PATH)/$(DLIB_PREFIX)$(CYGWIN_DLIBRARY_NAME)$(DLIB_SUFFIX) +$(LIBRARY_PATH)/$(DLIB_PREFIX)$(LIBRARY_NAME)$(DLIB_SUFFIX)$(SLIB_SUFFIX): $(LIBRARY_PATH)/$(DLIB_PREFIX)$(CYGWIN_DLIBRARY_NAME)$(DLIB_SUFFIX) $(LIBRARY_PATH)/$(DLIB_PREFIX)$(CYGWIN_DLIBRARY_NAME)$(DLIB_SUFFIX): $(LIBOBJS) @echo "[LD DLL] $@" @$(LD) $(LIBCFLAGS) $(LIBLDFLAGS) $(CYGWIN_LIBLDFLAGS) -Wl,--whole-archive $^ -Wl,--no-whole-archive $(CYGWIN_LDLIBS_NOARCHIVE) -o $@ @@ -150,7 +150,7 @@ $(BINARY_NAME).static$(BINARY_SUFFIX): $(OBJS) $(LIBRARY_PATH)/$(SLIB_PREFIX)$(L @$(LD) $(CFLAGS) $(STATICLIBLDFLAGS) $^ $(LDLIBS) -o $@ ifeq ($(findstring CYGWIN_NT,$(UNAME)),CYGWIN_NT) -$(BINARY_NAME).dynamic$(BINARY_SUFFIX): $(OBJS) $(LIBRARY_PATH)/$(DLIB_PREFIX)$(LIBRARY_NAME)$(DLIB_SUFFIX).a +$(BINARY_NAME).dynamic$(BINARY_SUFFIX): $(OBJS) $(LIBRARY_PATH)/$(DLIB_PREFIX)$(LIBRARY_NAME)$(DLIB_SUFFIX)$(SLIB_SUFFIX) else $(BINARY_NAME).dynamic$(BINARY_SUFFIX): $(OBJS) $(LIBRARY_PATH)/$(DLIB_PREFIX)$(LIBRARY_NAME)$(DLIB_SUFFIX) endif @@ -188,7 +188,7 @@ endif -@rm $(LIBRARY_PATH)/$(SLIB_PREFIX)$(LIBRARY_NAME)$(SLIB_SUFFIX) ifeq ($(findstring CYGWIN_NT,$(UNAME)),CYGWIN_NT) -@rm $(LIBRARY_PATH)/$(DLIB_PREFIX)$(CYGWIN_DLIBRARY_NAME)$(DLIB_SUFFIX) - -@rm $(LIBRARY_PATH)/$(DLIB_PREFIX)$(LIBRARY_NAME)$(DLIB_SUFFIX).a + -@rm $(LIBRARY_PATH)/$(DLIB_PREFIX)$(LIBRARY_NAME)$(DLIB_SUFFIX)$(SLIB_SUFFIX) else -@rm $(LIBRARY_PATH)/$(DLIB_PREFIX)$(LIBRARY_NAME)$(DLIB_SUFFIX) endif