ALG: Add AFALG engine
[openssl.git] / engines / Makefile.in
index 99ba822fb2fce56f37b57e10e7613e74df9ae80e..7a284cf57a907fe64201c73dd1f2ab1fc168ded3 100644 (file)
@@ -2,9 +2,6 @@
 # OpenSSL/engines/Makefile
 #
 
-#The following engines have been disabled as they currently do not build
-# sureware ubsec
-
 DIR=   engines
 TOP=   ..
 CC=    cc
@@ -13,12 +10,17 @@ CFLAG=-g
 MAKEFILE=      Makefile
 AR=            ar r
 
+RECURSIVE_MAKE=        [ -z "$(ENGDIRS)" ] || for i in $(ENGDIRS) ; do \
+                   (cd $$i && echo "making $$target in $(DIR)/$$i..." && \
+                   $(MAKE) -e TOP=../.. DIR=$$i $$target ) || exit 1; \
+               done;
+
 PADLOCK_ASM_OBJ=
 
 PLIB_LDFLAG=
 EX_LIBS=
 
-CFLAGS= $(INCLUDES) $(CFLAG)
+CFLAGS= $(INCLUDES) $(CFLAG) $(SHARED_CFLAG)
 ASFLAGS= $(INCLUDES) $(ASFLAG)
 AFLAGS= $(ASFLAGS)
 
@@ -43,8 +45,6 @@ TESTLIBOBJ= e_ossltest.o
 SRC= $(LIBSRC)
 
 HEADER=        \
-       e_chil_err.c e_chil_err.h \
-       e_ubsec_err.c e_ubsec_err.h \
        e_capi_err.c e_capi_err.h \
        e_ossltest_err.c e_ossltest_err.h \
        e_dasync_err.c e_dasync_err.h
@@ -54,10 +54,10 @@ ALL=        $(GENERAL) $(SRC) $(HEADER)
 top:
        (cd ..; $(MAKE) DIRS=$(DIR) all)
 
-all:   lib
+all:   lib subdirs
 
 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 \
@@ -76,8 +76,12 @@ e_padlock-x86.s:     asm/e_padlock-x86.pl
 e_padlock-x86_64.s:    asm/e_padlock-x86_64.pl
        $(PERL) asm/e_padlock-x86_64.pl $(PERLASM_SCHEME) > $@
 
+subdirs:
+       @target=all; $(RECURSIVE_MAKE)
+
 files:
        $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
+       @target=files; $(RECURSIVE_MAKE)
 
 install:
        @[ -n "$(INSTALLTOP)" ] # should be set by top Makefile...
@@ -99,6 +103,7 @@ uninstall:
                        $(RM) $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/engines/$${l}$(DSO_EXT); \
                done; \
        fi
+       @target=install; $(RECURSIVE_MAKE)
 
 errors:
        set -e; for l in $(LIBNAMES); do \
@@ -112,5 +117,6 @@ depend:
 
 clean:
        rm -f *.s *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
+       @target=clean; $(RECURSIVE_MAKE)
 
 # DO NOT DELETE THIS LINE -- make depend depends on it.