]> git.ipfire.org Git - thirdparty/openssl.git/blobdiff - engines/Makefile.in
Build dynamic engines even if configured "no-shared"
[thirdparty/openssl.git] / engines / Makefile.in
index 2207c5cfd55c8e78f3d9261d1db329ffeeb0d84d..d07cc0f8414877e39644764bc30325abc4928ddd 100644 (file)
@@ -18,7 +18,7 @@ PADLOCK_ASM_OBJ=
 PLIB_LDFLAG=
 EX_LIBS=
 
-CFLAGS= $(INCLUDES) $(CFLAG)
+CFLAGS= $(INCLUDES) $(CFLAG) $(SHARED_CFLAG)
 ASFLAGS= $(INCLUDES) $(ASFLAG)
 AFLAGS= $(ASFLAGS)
 
@@ -57,13 +57,13 @@ top:
 all:   lib
 
 lib:   $(LIBOBJ) $(TESTLIBOBJ)
-       @if [ -n "$(SHARED_LIBS)" ]; then \
+       @if [ "$(DYNAMIC_ENGINES)" = 1 ]; then \
                set -e; \
                for l in $(LIBNAMES) $(TESTLIBNAMES); do \
                        $(MAKE) -f ../Makefile.shared -e \
                                LIBNAME=$$l LIBEXTRAS="e_$$l*.o" \
                                LIBDEPS='$(PLIB_LDFLAG) -L.. -lcrypto $(EX_LIBS)' \
-                               link_o.$(SHLIB_TARGET); \
+                               link_dso.$(SHLIB_TARGET); \
                done; \
        else \
                $(AR) $(LIB) $(LIBOBJ); \
@@ -79,33 +79,24 @@ e_padlock-x86_64.s: asm/e_padlock-x86_64.pl
 files:
        $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
 
-# XXXXX This currently only works on systems that use .so as suffix
-# for shared libraries as well as for Cygwin which uses the
-# dlfcn_name_converter and therefore stores the engines with .so suffix, too.
-# XXXXX This was extended to HP-UX dl targets, which use .sl suffix.
-# XXXXX This was extended to mingw targets, which use eay32.dll suffix without lib as prefix.
 install:
        @[ -n "$(INSTALLTOP)" ] # should be set by top Makefile...
        @if [ -n "$(SHARED_LIBS)" ]; then \
                set -e; \
-               $(PERL) $(TOP)/util/mkdir-p.pl $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines; \
+               $(PERL) $(TOP)/util/mkdir-p.pl $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/engines; \
+               for l in $(LIBNAMES); do \
+                       cp $${l}$(DSO_EXT) $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/engines/$${l}$(DSO_EXT).new; \
+                       chmod 555 $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/engines/$${l}$(DSO_EXT).new; \
+                       mv -f $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/engines/$${l}$(DSO_EXT).new $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/engines/$${l}$(DSO_EXT); \
+               done; \
+       fi
+
+uninstall:
+       @[ -n "$(INSTALLTOP)" ] # should be set by top Makefile...
+       @if [ -n "$(SHARED_LIBS)" ]; then \
+               set -e; \
                for l in $(LIBNAMES); do \
-                       ( echo installing $$l; \
-                         pfx=lib; \
-                         if expr "$(PLATFORM)" : "Cygwin" >/dev/null; then \
-                               sfx=".so"; \
-                               cp cyg$$l.dll $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$$pfx$$l$$sfx.new; \
-                         else \
-                               case "$(CFLAGS)" in \
-                               *DSO_DLFCN*)    sfx=`expr "$(SHLIB_EXT)" : '.*\(\.[a-z][a-z]*\)' \| ".so"`;;    \
-                               *DSO_DL*)       sfx=".sl";;     \
-                               *DSO_WIN32*)    sfx="eay32.dll"; pfx=;; \
-                               *)              sfx=".bad";;    \
-                               esac; \
-                               cp $$pfx$$l$$sfx $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$$pfx$$l$$sfx.new; \
-                         fi; \
-                         chmod 555 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$$pfx$$l$$sfx.new; \
-                         mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$$pfx$$l$$sfx.new $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$$pfx$$l$$sfx ); \
+                       $(RM) $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/engines/$${l}$(DSO_EXT); \
                done; \
        fi
 
@@ -116,7 +107,7 @@ errors:
        done
 
 depend:
-       @[ -z "$(THIS)" ] || $(TOP)/util/domd $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC) $(TESTLIBSRC)
+       @[ -z "$(THIS)" ] || $(TOP)/util/domd $(CFLAG) $(INCLUDES) -- $(PROGS) $(LIBSRC) $(TESTLIBSRC)
        @[ -z "$(THIS)" ] || (set -e; target=depend; $(RECURSIVE_MAKE) )
 
 clean: