Propogate BUILDENV even in ./engines.
[openssl.git] / engines / Makefile
index 8aa8fa691590a7cb40fb0f17dc747bf72bf6651c..483ed7237def97050a40c8f0522e4cf66ae4bbe0 100644 (file)
@@ -7,14 +7,6 @@ TOP=   ..
 CC=    cc
 INCLUDES= -I../include
 CFLAG=-g
-INSTALL_PREFIX=
-OPENSSLDIR=     /usr/local/ssl
-INSTALLTOP=/usr/local/ssl
-PERL=           perl
-NEWMAKE=       make
-MAKE=          $(NEWMAKE)
-MAKEDEPPROG=   makedepend
-MAKEDEPEND=    $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
 MAKEFILE=      Makefile
 AR=            ar r
 
@@ -73,12 +65,9 @@ lib: $(LIBOBJ)
        @if [ -n "$(SHARED_LIBS)" ]; then \
                set -e; \
                for l in $(LIBNAMES); do \
-                       $(MAKE) -f ../Makefile.shared \
-                               CC="$(CC)" LIBNAME=$$l LIBEXTRAS=e_$$l.o \
+                       $(MAKE) -f ../Makefile.shared $(BUILDENV) \
+                               LIBNAME=$$l LIBEXTRAS=e_$$l.o \
                                LIBDEPS='-L.. -lcrypto $(EX_LIBS)' \
-                               CFLAG="$(CFLAG)" LDFLAGS="$(LDFLAGS)" \
-                               SHARED_LDFLAGS="$(SHARED_LDFLAGS)" \
-                               PLATFORM="$(PLATFORM)" \
                                link_o.$(SHLIB_TARGET); \
                done; \
        else \
@@ -95,6 +84,7 @@ links:
 # XXXXX This currently only works on systems that use .so as suffix
 # for shared libraries.
 install:
+       @[ -n "$(INSTALLTOP)" ] # should be set by top Makefile...
        @if [ -n "$(SHARED_LIBS)" ]; then \
                set -e; \
                for l in $(LIBNAMES); do \
@@ -120,7 +110,11 @@ lint:
        lint -DLINT $(INCLUDES) $(SRC)>fluff
 
 depend:
-       $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
+       @if [ -z "$(THIS)" ]; then \
+           $(MAKE) -f $(TOP)/Makefile reflect THIS=$@; \
+       else \
+           $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC); \
+       fi
 
 dclean:
        $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new