Fold rules in test/Makefiles [from stable].
authorAndy Polyakov <appro@openssl.org>
Sat, 30 Apr 2005 21:39:39 +0000 (21:39 +0000)
committerAndy Polyakov <appro@openssl.org>
Sat, 30 Apr 2005 21:39:39 +0000 (21:39 +0000)
ChangeLog.0_9_7-stable_not-in-head
Makefile.org
apps/Makefile
engines/Makefile
test/Makefile

index f8c79db..ffa9838 100644 (file)
@@ -40,19 +40,6 @@ be added to the end of this file.
        Return my normal debug targets to something not so extreme, and
        make the extreme ones special (or 'extreme', if you will :-)).
 
-2002-12-15 16:27  appro
-
-       Changed:
-               Makefile.org (1.154.2.41), "Exp", lines: +2 -1
-
-       Another Solaris shared build clean-up. This is not actually needed
-       if one uses WorkShop C. It's gcc driver that brings copy of
-       libgcc.a into .so otherwise. In case you wonder what it's -Wl,-z...
-       and not just -z. Problem is that gcc driver apparently omits all -z
-       options but -z text. Don't ask me why. I'm not committing
-       corresponding workaround into the HEAD as Makefile.shared
-       reportedly needs even more work...
-
 2002-12-16 19:17  appro
 
        Changed:
@@ -62,25 +49,6 @@ be added to the end of this file.
        This is rollback to 0.9.6h bn_mul.c to address problem reported in
        RT#272.
 
-2002-12-16 19:59  appro
-
-       Changed:
-               Makefile.org (1.154.2.42), "Exp", lines: +3 -1
-
-       Some of Sun compiler drivers (well, one of those I have) collect
-       all options specified with -Wl in the beginnig of the ld command
-       line which kind of obsoletes the idea as it's -z defaultextract
-       that will be closest to lib*.a and not -z allextract:-(
-
-!2002-12-27 17:49  appro
-!
-!      Changed:
-!              Configure (1.314.2.62), "Exp", lines: +1 -1
-!
-!      According to Tim Rice <tim@multitalents.net> assembler support in
-!      SCO5 never worked anyway. Note this is not going to HEAD as we
-!      intend to provide an alternative solution as soon as 0.9.7 is out.
-
 2003-01-01 16:48  ben
 
        Changed:
@@ -212,15 +180,6 @@ be added to the end of this file.
 
        DES CFB8 test.
 
-2004-01-21 10:58  appro
-
-       Changed:
-               Configure (1.314.2.89), "Exp", lines: +1 -0
-               config (1.95.2.27), "Exp", lines: +7 -6
-               crypto/bn/Makefile.ssl (1.65.2.7), "Exp", lines: +3 -0
-
-       Proper support for HP-UX64 gcc build.  PR: 772
-
 2004-03-17 05:01  mark
 
        Changed:
@@ -271,16 +230,6 @@ be added to the end of this file.
 
                PR: 900
 
-2004-07-24 15:40  appro
-
-       Changed:
-               ssl/ssl_cert.c (1.48.2.9), "Exp", lines: +5 -2
-
-       Add casts where casts due. It's "safe" to cast, because "wrong"
-       casts will either be optimized away or never performed. The trouble
-       is that compiler first parses code, then optimizes, not both at
-       once...
-
 2004-08-02 16:15  levitte [FIPS]
 
        Changed:
@@ -291,21 +240,6 @@ be added to the end of this file.
                Thanks to Dr Stephen Henson <shenson@drh-consultancy.co.uk>
        for making me aware of this error.
 
-2004-12-09 19:00  appro
-
-       Changed:
-               apps/openssl.c (1.48.2.11), "Exp", lines: +1 -1
-
-       Eliminate dependency on UNICODE macro.
-
-2004-12-20 14:18  appro
-
-       Changed:
-               util/mklink.pl (1.6.2.2), "Exp", lines: +1 -0
-
-       When re-linking files, really relink them. In other words, emulate
-       ln -f.
-
 2004-12-28 00:48  appro
 
        Changed:
@@ -323,16 +257,6 @@ be added to the end of this file.
 
        Allow for ./config no-sha0.  PR: 993
 
-2005-02-03 12:09  appro
-
-       Changed:
-               Configure (1.314.2.105), "Exp", lines: +2 -2
-               Makefile.org (1.154.2.94), "Exp", lines: +16 -6
-               TABLE (1.99.2.44), "Exp", lines: +2 -2
-
-       Final HP-UX specific touches to "cope with run-time linker on
-       multi-ABI platforms."
-
 2005-03-12 10:28  appro
 
        Changed:
@@ -342,16 +266,7 @@ be added to the end of this file.
 
        Move copying of .dll to apps/ and test/ to more appropriate place.
 
-2005-03-12 13:15  appro
-
-       Changed:
-               apps/Makefile (1.1.4.14), "Exp", lines: +4 -2
-               test/Makefile (1.1.4.10), "Exp", lines: +42 -194
-
-       Fold rules in test/Makefile and provide hooks for updated FIPS
-       build procedures.
-
-2005-03-15 10:46  appro
+2005-03-15 10:46  appro [FIPS]
 
        Changed:
                Makefile.org (1.154.2.96), "Exp", lines: +1 -1
@@ -362,27 +277,6 @@ be added to the end of this file.
        in crypto/Makefile and make Makefile.org and fips/Makefile more
        discreet.
 
-2005-03-26 20:32  appro
-
-       Changed:
-               crypto/perlasm/x86nasm.pl (1.2.8.8), "Exp", lines: +6 -1
-
-       Resolve "operation size not specified" in NASM modules.
-
-2005-04-03 21:16  appro
-
-       Changed:
-               Configure (1.314.2.109), "Exp", lines: +10 -0
-               TABLE (1.99.2.48), "Exp", lines: +50 -0
-               config (1.95.2.33), "Exp", lines: +9 -2
-               crypto/bn/Makefile (1.1.4.4), "Exp", lines: +1 -0
-               crypto/rc4/Makefile (1.1.4.6), "Exp", lines: +1 -1
-
-       Extend Solaris x86 support to amd64. Note that if both gcc and Sun
-       C are installed, it defaults to gcc, because it beats Sun C on
-       every benchmark. Also note that gcc shared build was verified to
-       work woth Sun C...
-
 2005-04-14 00:47  appro
 
        Changed:
index 528ca3b..a6f59dd 100644 (file)
@@ -118,8 +118,6 @@ SDIRS=  \
 TESTS = alltests
 
 MAKEFILE= Makefile
-NEWMAKE=  make
-MAKE=     $(NEWMAKE)
 
 MANDIR=$(OPENSSLDIR)/man
 MAN1=1
@@ -229,7 +227,7 @@ clean-shared:
 
 link-shared:
        @ set -e; for i in ${SHLIBDIRS}; do \
-               $(NEWMAKE) -f $(HERE)/Makefile.shared \
+               $(MAKE) -f $(HERE)/Makefile.shared \
                        LIBNAME=$$i LIBVERSION=${SHLIB_MAJOR}.${SHLIB_MINOR} \
                        LIBCOMPATVERSIONS=";${SHLIB_VERSION_HISTORY}" \
                        symlink.$(SHLIB_TARGET); \
@@ -243,7 +241,7 @@ do_$(SHLIB_TARGET):
                if [ "${SHLIBDIRS}" = "ssl" -a -n "$(LIBKRB5)" ]; then \
                        libs="$(LIBKRB5) $$libs"; \
                fi; \
-               $(NEWMAKE) -f Makefile.shared \
+               $(MAKE) -f Makefile.shared \
                        $(BUILDENV) \
                        LIBNAME=$$i LIBVERSION=${SHLIB_MAJOR}.${SHLIB_MINOR} \
                        LIBCOMPATVERSIONS=";${SHLIB_VERSION_HISTORY}" \
@@ -483,7 +481,7 @@ install_sw:
                done; \
                (       here="`pwd`"; \
                        cd $(INSTALL_PREFIX)$(INSTALLTOP)/lib; \
-                       $(NEWMAKE) -f $$here/Makefile HERE="$$here" link-shared ); \
+                       $(MAKE) -f $$here/Makefile HERE="$$here" link-shared ); \
                if [ "$(INSTALLTOP)" != "/usr" ]; then \
                        echo 'OpenSSL shared libraries have been installed in:'; \
                        echo '  $(INSTALLTOP)'; \
index 7785009..2a3f25d 100644 (file)
@@ -10,8 +10,6 @@ CFLAG=                -g -static
 INSTALL_PREFIX=
 INSTALLTOP=    /usr/local/ssl
 OPENSSLDIR=    /usr/local/ssl
-NEWMAKE=       make
-MAKE=          $(NEWMAKE)
 MAKEDEPPROG=   makedepend
 MAKEDEPEND=    $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
 MAKEFILE=      Makefile
@@ -93,7 +91,7 @@ req: sreq.o $(A_OBJ) $(DLIBCRYPTO)
        shlib_target=; if [ -n "$(SHARED_LIBS)" ]; then \
                shlib_target="$(SHLIB_TARGET)"; \
        fi; \
-       $(NEWMAKE) -f $(TOP)/Makefile.shared \
+       $(MAKE) -f $(TOP)/Makefile.shared \
                APPNAME=req CC="$(CC)" CFLAGS="$(CFLAGS)" \
                LDFLAGS="$(LDFLAG)" SHARED_LDFLAGS="$(SHARED_LDFLAGS)" \
                OBJECTS="sreq.o $(A_OBJ) $(RAND_OBJ)" \
@@ -163,7 +161,7 @@ $(EXE): progs.h $(E_OBJ) $(PROGRAM).o $(DLIBCRYPTO) $(DLIBSSL)
        else \
          LIBRARIES="$(LIBSSL) $(LIBKRB5) $(LIBCRYPTO)" ; \
        fi; \
-       $(NEWMAKE) -f $(TOP)/Makefile.shared \
+       $(MAKE) -f $(TOP)/Makefile.shared \
                APPNAME=$(EXE) CC="$(CC)" CFLAGS="$(CFLAG)" \
                LDFLAGS="$(LDFLAGS)" SHARED_LDFLAGS="$(SHARED_LDFLAGS)" \
                OBJECTS="$(PROGRAM).o $(E_OBJ)" \
index 190dca7..9d68b63 100644 (file)
@@ -10,8 +10,6 @@ CFLAG=-g
 INSTALL_PREFIX=
 OPENSSLDIR=     /usr/local/ssl
 INSTALLTOP=/usr/local/ssl
-NEWMAKE=       make
-MAKE=          $(NEWMAKE)
 MAKEDEPPROG=   makedepend
 MAKEDEPEND=    $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
 MAKEFILE=      Makefile
@@ -72,7 +70,7 @@ lib:  $(LIBOBJ)
        @if [ -n "$(SHARED_LIBS)" ]; then \
                set -e; \
                for l in $(LIBNAMES); do \
-                       $(NEWMAKE) -f ../Makefile.shared \
+                       $(MAKE) -f ../Makefile.shared \
                                CC="$(CC)" LIBNAME=$$l LIBEXTRAS=e_$$l.o \
                                LIBDEPS='-L.. -lcrypto $(EX_LIBS)' \
                                CFLAG="$(CFLAG)" LDFLAGS="$(LDFLAGS)" \
index 0fe5ae3..f5747f8 100644 (file)
@@ -11,8 +11,6 @@ INSTALL_PREFIX=
 OPENSSLDIR=     /usr/local/ssl
 INSTALLTOP=    /usr/local/ssl
 MAKEFILE=      Makefile
-NEWMAKE=       make
-MAKE=          $(NEWMAKE)
 MAKEDEPPROG=   makedepend
 MAKEDEPEND=    $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
 PERL=          perl
@@ -307,515 +305,111 @@ $(DLIBSSL):
 $(DLIBCRYPTO):
        (cd ..; $(MAKE) DIRS=crypto all)
 
-$(RSATEST)$(EXE_EXT): $(RSATEST).o $(DLIBCRYPTO)
-       shlib_target=; if [ -n "$(SHARED_LIBS)" ]; then \
+BUILD_CMD=shlib_target=; if [ -n "$(SHARED_LIBS)" ]; then \
                shlib_target="$(SHLIB_TARGET)"; \
        fi; \
        if [ "$${shlib_target}" = "hpux-shared" -o "$${shlib_target}" = "darwin-shared" ] ; then \
-         LIBRARIES="$(DLIBCRYPTO)"; \
+               LIBRARIES="$(DLIBSSL) $(DLIBCRYPTO)"; \
        else \
-         LIBRARIES="$(LIBCRYPTO)"; \
+               LIBRARIES="$(LIBSSL) $(LIBCRYPTO)"; \
        fi; \
-       $(NEWMAKE) -f $(TOP)/Makefile.shared \
-               APPNAME=$(RSATEST)$(EXE_EXT) CC="$(CC)" CFLAGS="$(CFLAGS)" \
+       $(MAKE) -f $(TOP)/Makefile.shared \
+               APPNAME=$$target$(EXE_EXT) CC="$(CC)" CFLAGS="$(CFLAGS)" \
                LDFLAGS="$(LDFLAGS)" SHARED_LDFLAGS="$(SHARED_LDFLAGS)" \
-               OBJECTS="$(RSATEST).o" \
+               OBJECTS="$$target.o" \
                LIBDEPS="$(PEX_LIBS) $$LIBRARIES $(EX_LIBS)" \
                LIBRPATH=$(INSTALLTOP)/lib \
                link_app.$${shlib_target}
 
+$(RSATEST)$(EXE_EXT): $(RSATEST).o $(DLIBCRYPTO)
+       @target=$(RSATEST); $(BUILD_CMD)
+
 $(BNTEST)$(EXE_EXT): $(BNTEST).o $(DLIBCRYPTO)
-       shlib_target=; if [ -n "$(SHARED_LIBS)" ]; then \
-               shlib_target="$(SHLIB_TARGET)"; \
-       fi; \
-       if [ "$${shlib_target}" = "hpux-shared" -o "$${shlib_target}" = "darwin-shared" ] ; then \
-         LIBRARIES="$(DLIBCRYPTO)"; \
-       else \
-         LIBRARIES="$(LIBCRYPTO)"; \
-       fi; \
-       $(NEWMAKE) -f $(TOP)/Makefile.shared \
-               APPNAME=$(BNTEST)$(EXE_EXT) CC="$(CC)" CFLAGS="$(CFLAGS)" \
-               LDFLAGS="$(LDFLAGS)" SHARED_LDFLAGS="$(SHARED_LDFLAGS)" \
-               OBJECTS="$(BNTEST).o" \
-               LIBDEPS="$(PEX_LIBS) $$LIBRARIES $(EX_LIBS)" \
-               LIBRPATH=$(INSTALLTOP)/lib \
-               link_app.$${shlib_target}
+       @target=$(BNTEST); $(BUILD_CMD)
 
 $(ECTEST)$(EXE_EXT): $(ECTEST).o $(DLIBCRYPTO)
-       shlib_target=; if [ -n "$(SHARED_LIBS)" ]; then \
-               shlib_target="$(SHLIB_TARGET)"; \
-       fi; \
-       if [ "$${shlib_target}" = "hpux-shared" -o "$${shlib_target}" = "darwin-shared" ] ; then \
-         LIBRARIES="$(DLIBCRYPTO)"; \
-       else \
-         LIBRARIES="$(LIBCRYPTO)"; \
-       fi; \
-       $(NEWMAKE) -f $(TOP)/Makefile.shared \
-               APPNAME=$(ECTEST)$(EXE_EXT) CC="$(CC)" CFLAGS="$(CFLAGS)" \
-               LDFLAGS="$(LDFLAGS)" SHARED_LDFLAGS="$(SHARED_LDFLAGS)" \
-               OBJECTS="$(ECTEST).o" \
-               LIBDEPS="$(PEX_LIBS) $$LIBRARIES $(EX_LIBS)" \
-               LIBRPATH=$(INSTALLTOP)/lib \
-               link_app.$${shlib_target}
+       @target=$(ECTEST); $(BUILD_CMD)
 
 $(EXPTEST)$(EXE_EXT): $(EXPTEST).o $(DLIBCRYPTO)
-       shlib_target=; if [ -n "$(SHARED_LIBS)" ]; then \
-               shlib_target="$(SHLIB_TARGET)"; \
-       fi; \
-       if [ "$${shlib_target}" = "hpux-shared" -o "$${shlib_target}" = "darwin-shared" ] ; then \
-         LIBRARIES="$(DLIBCRYPTO)"; \
-       else \
-         LIBRARIES="$(LIBCRYPTO)"; \
-       fi; \
-       $(NEWMAKE) -f $(TOP)/Makefile.shared \
-               APPNAME=$(EXPTEST)$(EXE_EXT) CC="$(CC)" CFLAGS="$(CFLAGS)" \
-               LDFLAGS="$(LDFLAGS)" SHARED_LDFLAGS="$(SHARED_LDFLAGS)" \
-               OBJECTS="$(EXPTEST).o" \
-               LIBDEPS="$(PEX_LIBS) $$LIBRARIES $(EX_LIBS)" \
-               LIBRPATH=$(INSTALLTOP)/lib \
-               link_app.$${shlib_target}
+       @target=$(EXPTEST); $(BUILD_CMD)
 
 $(IDEATEST)$(EXE_EXT): $(IDEATEST).o $(DLIBCRYPTO)
-       shlib_target=; if [ -n "$(SHARED_LIBS)" ]; then \
-               shlib_target="$(SHLIB_TARGET)"; \
-       fi; \
-       if [ "$${shlib_target}" = "hpux-shared" -o "$${shlib_target}" = "darwin-shared" ] ; then \
-         LIBRARIES="$(DLIBCRYPTO)"; \
-       else \
-         LIBRARIES="$(LIBCRYPTO)"; \
-       fi; \
-       $(NEWMAKE) -f $(TOP)/Makefile.shared \
-               APPNAME=$(IDEATEST)$(EXE_EXT) CC="$(CC)" CFLAGS="$(CFLAGS)" \
-               LDFLAGS="$(LDFLAGS)" SHARED_LDFLAGS="$(SHARED_LDFLAGS)" \
-               OBJECTS="$(IDEATEST).o" \
-               LIBDEPS="$(PEX_LIBS) $$LIBRARIES $(EX_LIBS)" \
-               LIBRPATH=$(INSTALLTOP)/lib \
-               link_app.$${shlib_target}
+       @target=$(IDEATEST); $(BUILD_CMD)
 
 $(MD2TEST)$(EXE_EXT): $(MD2TEST).o $(DLIBCRYPTO)
-       shlib_target=; if [ -n "$(SHARED_LIBS)" ]; then \
-               shlib_target="$(SHLIB_TARGET)"; \
-       fi; \
-       if [ "$${shlib_target}" = "hpux-shared" -o "$${shlib_target}" = "darwin-shared" ] ; then \
-         LIBRARIES="$(DLIBCRYPTO)"; \
-       else \
-         LIBRARIES="$(LIBCRYPTO)"; \
-       fi; \
-       $(NEWMAKE) -f $(TOP)/Makefile.shared \
-               APPNAME=$(MD2TEST)$(EXE_EXT) CC="$(CC)" CFLAGS="$(CFLAGS)" \
-               LDFLAGS="$(LDFLAGS)" SHARED_LDFLAGS="$(SHARED_LDFLAGS)" \
-               OBJECTS="$(MD2TEST).o" \
-               LIBDEPS="$(PEX_LIBS) $$LIBRARIES $(EX_LIBS)" \
-               LIBRPATH=$(INSTALLTOP)/lib \
-               link_app.$${shlib_target}
+       @target=$(MD2TEST); $(BUILD_CMD)
 
 $(SHATEST)$(EXE_EXT): $(SHATEST).o $(DLIBCRYPTO)
-       shlib_target=; if [ -n "$(SHARED_LIBS)" ]; then \
-               shlib_target="$(SHLIB_TARGET)"; \
-       fi; \
-       if [ "$${shlib_target}" = "hpux-shared" -o "$${shlib_target}" = "darwin-shared" ] ; then \
-         LIBRARIES="$(DLIBCRYPTO)"; \
-       else \
-         LIBRARIES="$(LIBCRYPTO)"; \
-       fi; \
-       $(NEWMAKE) -f $(TOP)/Makefile.shared \
-               APPNAME=$(SHATEST)$(EXE_EXT) CC="$(CC)" CFLAGS="$(CFLAGS)" \
-               LDFLAGS="$(LDFLAGS)" SHARED_LDFLAGS="$(SHARED_LDFLAGS)" \
-               OBJECTS="$(SHATEST).o" \
-               LIBDEPS="$(PEX_LIBS) $$LIBRARIES $(EX_LIBS)" \
-               LIBRPATH=$(INSTALLTOP)/lib \
-               link_app.$${shlib_target}
+       @target=$(SHATEST); $(BUILD_CMD)
 
 $(SHA1TEST)$(EXE_EXT): $(SHA1TEST).o $(DLIBCRYPTO)
-       shlib_target=; if [ -n "$(SHARED_LIBS)" ]; then \
-               shlib_target="$(SHLIB_TARGET)"; \
-       fi; \
-       if [ "$${shlib_target}" = "hpux-shared" -o "$${shlib_target}" = "darwin-shared" ] ; then \
-         LIBRARIES="$(DLIBCRYPTO)"; \
-       else \
-         LIBRARIES="$(LIBCRYPTO)"; \
-       fi; \
-       $(NEWMAKE) -f $(TOP)/Makefile.shared \
-               APPNAME=$(SHA1TEST)$(EXE_EXT) CC="$(CC)" CFLAGS="$(CFLAGS)" \
-               LDFLAGS="$(LDFLAGS)" SHARED_LDFLAGS="$(SHARED_LDFLAGS)" \
-               OBJECTS="$(SHA1TEST).o" \
-               LIBDEPS="$(PEX_LIBS) $$LIBRARIES $(EX_LIBS)" \
-               LIBRPATH=$(INSTALLTOP)/lib \
-               link_app.$${shlib_target}
+       @target=$(SHA1TEST); $(BUILD_CMD)
 
 $(SHA256TEST)$(EXE_EXT): $(SHA256TEST).o $(DLIBCRYPTO)
-       shlib_target=; if [ -n "$(SHARED_LIBS)" ]; then \
-               shlib_target="$(SHLIB_TARGET)"; \
-       fi; \
-       if [ "$${shlib_target}" = "hpux-shared" -o "$${shlib_target}" = "darwin-shared" ] ; then \
-         LIBRARIES="$(DLIBCRYPTO)"; \
-       else \
-         LIBRARIES="$(LIBCRYPTO)"; \
-       fi; \
-       $(NEWMAKE) -f $(TOP)/Makefile.shared \
-               APPNAME=$(SHA256TEST)$(EXE_EXT) CC="$(CC)" CFLAGS="$(CFLAGS)" \
-               LDFLAGS="$(LDFLAGS)" SHARED_LDFLAGS="$(SHARED_LDFLAGS)" \
-               OBJECTS="$(SHA256TEST).o" \
-               LIBDEPS="$(PEX_LIBS) $$LIBRARIES $(EX_LIBS)" \
-               LIBRPATH=$(INSTALLTOP)/lib \
-               link_app.$${shlib_target}
+       @target=$(SHA256TEST); $(BUILD_CMD)
 
 $(SHA512TEST)$(EXE_EXT): $(SHA512TEST).o $(DLIBCRYPTO)
-       shlib_target=; if [ -n "$(SHARED_LIBS)" ]; then \
-               shlib_target="$(SHLIB_TARGET)"; \
-       fi; \
-       if [ "$${shlib_target}" = "hpux-shared" -o "$${shlib_target}" = "darwin-shared" ] ; then \
-         LIBRARIES="$(DLIBCRYPTO)"; \
-       else \
-         LIBRARIES="$(LIBCRYPTO)"; \
-       fi; \
-       $(NEWMAKE) -f $(TOP)/Makefile.shared \
-               APPNAME=$(SHA512TEST)$(EXE_EXT) CC="$(CC)" CFLAGS="$(CFLAGS)" \
-               LDFLAGS="$(LDFLAGS)" SHARED_LDFLAGS="$(SHARED_LDFLAGS)" \
-               OBJECTS="$(SHA512TEST).o" \
-               LIBDEPS="$(PEX_LIBS) $$LIBRARIES $(EX_LIBS)" \
-               LIBRPATH=$(INSTALLTOP)/lib \
-               link_app.$${shlib_target}
+       @target=$(SHA512TEST); $(BUILD_CMD)
 
 $(RMDTEST)$(EXE_EXT): $(RMDTEST).o $(DLIBCRYPTO)
-       shlib_target=; if [ -n "$(SHARED_LIBS)" ]; then \
-               shlib_target="$(SHLIB_TARGET)"; \
-       fi; \
-       if [ "$${shlib_target}" = "hpux-shared" -o "$${shlib_target}" = "darwin-shared" ] ; then \
-         LIBRARIES="$(DLIBCRYPTO)"; \
-       else \
-         LIBRARIES="$(LIBCRYPTO)"; \
-       fi; \
-       $(NEWMAKE) -f $(TOP)/Makefile.shared \
-               APPNAME=$(RMDTEST)$(EXE_EXT) CC="$(CC)" CFLAGS="$(CFLAGS)" \
-               LDFLAGS="$(LDFLAGS)" SHARED_LDFLAGS="$(SHARED_LDFLAGS)" \
-               OBJECTS="$(RMDTEST).o" \
-               LIBDEPS="$(PEX_LIBS) $$LIBRARIES $(EX_LIBS)" \
-               LIBRPATH=$(INSTALLTOP)/lib \
-               link_app.$${shlib_target}
+       @target=$(RMDTEST); $(BUILD_CMD)
 
 $(MDC2TEST)$(EXE_EXT): $(MDC2TEST).o $(DLIBCRYPTO)
-       shlib_target=; if [ -n "$(SHARED_LIBS)" ]; then \
-               shlib_target="$(SHLIB_TARGET)"; \
-       fi; \
-       if [ "$${shlib_target}" = "hpux-shared" -o "$${shlib_target}" = "darwin-shared" ] ; then \
-         LIBRARIES="$(DLIBCRYPTO)"; \
-       else \
-         LIBRARIES="$(LIBCRYPTO)"; \
-       fi; \
-       $(NEWMAKE) -f $(TOP)/Makefile.shared \
-               APPNAME=$(MDC2TEST)$(EXE_EXT) CC="$(CC)" CFLAGS="$(CFLAGS)" \
-               LDFLAGS="$(LDFLAGS)" SHARED_LDFLAGS="$(SHARED_LDFLAGS)" \
-               OBJECTS="$(MDC2TEST).o" \
-               LIBDEPS="$(PEX_LIBS) $$LIBRARIES $(EX_LIBS)" \
-               LIBRPATH=$(INSTALLTOP)/lib \
-               link_app.$${shlib_target}
+       @target=$(MDC2TEST); $(BUILD_CMD)
 
 $(MD4TEST)$(EXE_EXT): $(MD4TEST).o $(DLIBCRYPTO)
-       shlib_target=; if [ -n "$(SHARED_LIBS)" ]; then \
-               shlib_target="$(SHLIB_TARGET)"; \
-       fi; \
-       if [ "$${shlib_target}" = "hpux-shared" -o "$${shlib_target}" = "darwin-shared" ] ; then \
-         LIBRARIES="$(DLIBCRYPTO)"; \
-       else \
-         LIBRARIES="$(LIBCRYPTO)"; \
-       fi; \
-       $(NEWMAKE) -f $(TOP)/Makefile.shared \
-               APPNAME=$(MD4TEST)$(EXE_EXT) CC="$(CC)" CFLAGS="$(CFLAGS)" \
-               LDFLAGS="$(LDFLAGS)" SHARED_LDFLAGS="$(SHARED_LDFLAGS)" \
-               OBJECTS="$(MD4TEST).o" \
-               LIBDEPS="$(PEX_LIBS) $$LIBRARIES $(EX_LIBS)" \
-               LIBRPATH=$(INSTALLTOP)/lib \
-               link_app.$${shlib_target}
+       @target=$(MD4TEST); $(BUILD_CMD)
 
 $(MD5TEST)$(EXE_EXT): $(MD5TEST).o $(DLIBCRYPTO)
-       shlib_target=; if [ -n "$(SHARED_LIBS)" ]; then \
-               shlib_target="$(SHLIB_TARGET)"; \
-       fi; \
-       if [ "$${shlib_target}" = "hpux-shared" -o "$${shlib_target}" = "darwin-shared" ] ; then \
-         LIBRARIES="$(DLIBCRYPTO)"; \
-       else \
-         LIBRARIES="$(LIBCRYPTO)"; \
-       fi; \
-       $(NEWMAKE) -f $(TOP)/Makefile.shared \
-               APPNAME=$(MD5TEST)$(EXE_EXT) CC="$(CC)" CFLAGS="$(CFLAGS)" \
-               LDFLAGS="$(LDFLAGS)" SHARED_LDFLAGS="$(SHARED_LDFLAGS)" \
-               OBJECTS="$(MD5TEST).o" \
-               LIBDEPS="$(PEX_LIBS) $$LIBRARIES $(EX_LIBS)" \
-               LIBRPATH=$(INSTALLTOP)/lib \
-               link_app.$${shlib_target}
+       @target=$(MD5TEST); $(BUILD_CMD)
 
 $(HMACTEST)$(EXE_EXT): $(HMACTEST).o $(DLIBCRYPTO)
-       shlib_target=; if [ -n "$(SHARED_LIBS)" ]; then \
-               shlib_target="$(SHLIB_TARGET)"; \
-       fi; \
-       if [ "$${shlib_target}" = "hpux-shared" -o "$${shlib_target}" = "darwin-shared" ] ; then \
-         LIBRARIES="$(DLIBCRYPTO)"; \
-       else \
-         LIBRARIES="$(LIBCRYPTO)"; \
-       fi; \
-       $(NEWMAKE) -f $(TOP)/Makefile.shared \
-               APPNAME=$(HMACTEST)$(EXE_EXT) CC="$(CC)" CFLAGS="$(CFLAGS)" \
-               LDFLAGS="$(LDFLAGS)" SHARED_LDFLAGS="$(SHARED_LDFLAGS)" \
-               OBJECTS="$(HMACTEST).o" \
-               LIBDEPS="$(PEX_LIBS) $$LIBRARIES $(EX_LIBS)" \
-               LIBRPATH=$(INSTALLTOP)/lib \
-               link_app.$${shlib_target}
+       @target=$(HMACTEST); $(BUILD_CMD)
 
 $(RC2TEST)$(EXE_EXT): $(RC2TEST).o $(DLIBCRYPTO)
-       shlib_target=; if [ -n "$(SHARED_LIBS)" ]; then \
-               shlib_target="$(SHLIB_TARGET)"; \
-       fi; \
-       if [ "$${shlib_target}" = "hpux-shared" -o "$${shlib_target}" = "darwin-shared" ] ; then \
-         LIBRARIES="$(DLIBCRYPTO)"; \
-       else \
-         LIBRARIES="$(LIBCRYPTO)"; \
-       fi; \
-       $(NEWMAKE) -f $(TOP)/Makefile.shared \
-               APPNAME=$(RC2TEST)$(EXE_EXT) CC="$(CC)" CFLAGS="$(CFLAGS)" \
-               LDFLAGS="$(LDFLAGS)" SHARED_LDFLAGS="$(SHARED_LDFLAGS)" \
-               OBJECTS="$(RC2TEST).o" \
-               LIBDEPS="$(PEX_LIBS) $$LIBRARIES $(EX_LIBS)" \
-               LIBRPATH=$(INSTALLTOP)/lib \
-               link_app.$${shlib_target}
+       @target=$(RC2TEST); $(BUILD_CMD)
 
 $(BFTEST)$(EXE_EXT): $(BFTEST).o $(DLIBCRYPTO)
-       shlib_target=; if [ -n "$(SHARED_LIBS)" ]; then \
-               shlib_target="$(SHLIB_TARGET)"; \
-       fi; \
-       if [ "$${shlib_target}" = "hpux-shared" -o "$${shlib_target}" = "darwin-shared" ] ; then \
-         LIBRARIES="$(DLIBCRYPTO)"; \
-       else \
-         LIBRARIES="$(LIBCRYPTO)"; \
-       fi; \
-       $(NEWMAKE) -f $(TOP)/Makefile.shared \
-               APPNAME=$(BFTEST)$(EXE_EXT) CC="$(CC)" CFLAGS="$(CFLAGS)" \
-               LDFLAGS="$(LDFLAGS)" SHARED_LDFLAGS="$(SHARED_LDFLAGS)" \
-               OBJECTS="$(BFTEST).o" \
-               LIBDEPS="$(PEX_LIBS) $$LIBRARIES $(EX_LIBS)" \
-               LIBRPATH=$(INSTALLTOP)/lib \
-               link_app.$${shlib_target}
+       @target=$(BFTEST); $(BUILD_CMD)
 
 $(CASTTEST)$(EXE_EXT): $(CASTTEST).o $(DLIBCRYPTO)
-       shlib_target=; if [ -n "$(SHARED_LIBS)" ]; then \
-               shlib_target="$(SHLIB_TARGET)"; \
-       fi; \
-       if [ "$${shlib_target}" = "hpux-shared" -o "$${shlib_target}" = "darwin-shared" ] ; then \
-         LIBRARIES="$(DLIBCRYPTO)"; \
-       else \
-         LIBRARIES="$(LIBCRYPTO)"; \
-       fi; \
-       $(NEWMAKE) -f $(TOP)/Makefile.shared \
-               APPNAME=$(CASTTEST)$(EXE_EXT) CC="$(CC)" CFLAGS="$(CFLAGS)" \
-               LDFLAGS="$(LDFLAGS)" SHARED_LDFLAGS="$(SHARED_LDFLAGS)" \
-               OBJECTS="$(CASTTEST).o" \
-               LIBDEPS="$(PEX_LIBS) $$LIBRARIES $(EX_LIBS)" \
-               LIBRPATH=$(INSTALLTOP)/lib \
-               link_app.$${shlib_target}
+       @target=$(CASTTEST); $(BUILD_CMD)
 
 $(RC4TEST)$(EXE_EXT): $(RC4TEST).o $(DLIBCRYPTO)
-       shlib_target=; if [ -n "$(SHARED_LIBS)" ]; then \
-               shlib_target="$(SHLIB_TARGET)"; \
-       fi; \
-       if [ "$${shlib_target}" = "hpux-shared" -o "$${shlib_target}" = "darwin-shared" ] ; then \
-         LIBRARIES="$(DLIBCRYPTO)"; \
-       else \
-         LIBRARIES="$(LIBCRYPTO)"; \
-       fi; \
-       $(NEWMAKE) -f $(TOP)/Makefile.shared \
-               APPNAME=$(RC4TEST)$(EXE_EXT) CC="$(CC)" CFLAGS="$(CFLAGS)" \
-               LDFLAGS="$(LDFLAGS)" SHARED_LDFLAGS="$(SHARED_LDFLAGS)" \
-               OBJECTS="$(RC4TEST).o" \
-               LIBDEPS="$(PEX_LIBS) $$LIBRARIES $(EX_LIBS)" \
-               LIBRPATH=$(INSTALLTOP)/lib \
-               link_app.$${shlib_target}
+       @target=$(RC4TEST); $(BUILD_CMD)
 
 $(RC5TEST)$(EXE_EXT): $(RC5TEST).o $(DLIBCRYPTO)
-       shlib_target=; if [ -n "$(SHARED_LIBS)" ]; then \
-               shlib_target="$(SHLIB_TARGET)"; \
-       fi; \
-       if [ "$${shlib_target}" = "hpux-shared" -o "$${shlib_target}" = "darwin-shared" ] ; then \
-         LIBRARIES="$(DLIBCRYPTO)"; \
-       else \
-         LIBRARIES="$(LIBCRYPTO)"; \
-       fi; \
-       $(NEWMAKE) -f $(TOP)/Makefile.shared \
-               APPNAME=$(RC5TEST)$(EXE_EXT) CC="$(CC)" CFLAGS="$(CFLAGS)" \
-               LDFLAGS="$(LDFLAGS)" SHARED_LDFLAGS="$(SHARED_LDFLAGS)" \
-               OBJECTS="$(RC5TEST).o" \
-               LIBDEPS="$(PEX_LIBS) $$LIBRARIES $(EX_LIBS)" \
-               LIBRPATH=$(INSTALLTOP)/lib \
-               link_app.$${shlib_target}
+       @target=$(RC5TEST); $(BUILD_CMD)
 
 $(DESTEST)$(EXE_EXT): $(DESTEST).o $(DLIBCRYPTO)
-       shlib_target=; if [ -n "$(SHARED_LIBS)" ]; then \
-               shlib_target="$(SHLIB_TARGET)"; \
-       fi; \
-       if [ "$${shlib_target}" = "hpux-shared" -o "$${shlib_target}" = "darwin-shared" ] ; then \
-         LIBRARIES="$(DLIBCRYPTO)"; \
-       else \
-         LIBRARIES="$(LIBCRYPTO)"; \
-       fi; \
-       $(NEWMAKE) -f $(TOP)/Makefile.shared \
-               APPNAME=$(DESTEST)$(EXE_EXT) CC="$(CC)" CFLAGS="$(CFLAGS)" \
-               LDFLAGS="$(LDFLAGS)" SHARED_LDFLAGS="$(SHARED_LDFLAGS)" \
-               OBJECTS="$(DESTEST).o" \
-               LIBDEPS="$(PEX_LIBS) $$LIBRARIES $(EX_LIBS)" \
-               LIBRPATH=$(INSTALLTOP)/lib \
-               link_app.$${shlib_target}
+       @target=$(DESTEST); $(BUILD_CMD)
 
 $(RANDTEST)$(EXE_EXT): $(RANDTEST).o $(DLIBCRYPTO)
-       shlib_target=; if [ -n "$(SHARED_LIBS)" ]; then \
-               shlib_target="$(SHLIB_TARGET)"; \
-       fi; \
-       if [ "$${shlib_target}" = "hpux-shared" -o "$${shlib_target}" = "darwin-shared" ] ; then \
-         LIBRARIES="$(DLIBCRYPTO)"; \
-       else \
-         LIBRARIES="$(LIBCRYPTO)"; \
-       fi; \
-       $(NEWMAKE) -f $(TOP)/Makefile.shared \
-               APPNAME=$(RANDTEST)$(EXE_EXT) CC="$(CC)" CFLAGS="$(CFLAGS)" \
-               LDFLAGS="$(LDFLAGS)" SHARED_LDFLAGS="$(SHARED_LDFLAGS)" \
-               OBJECTS="$(RANDTEST).o" \
-               LIBDEPS="$(PEX_LIBS) $$LIBRARIES $(EX_LIBS)" \
-               LIBRPATH=$(INSTALLTOP)/lib \
-               link_app.$${shlib_target}
+       @target=$(RANDTEST); $(BUILD_CMD)
 
 $(DHTEST)$(EXE_EXT): $(DHTEST).o $(DLIBCRYPTO)
-       shlib_target=; if [ -n "$(SHARED_LIBS)" ]; then \
-               shlib_target="$(SHLIB_TARGET)"; \
-       fi; \
-       if [ "$${shlib_target}" = "hpux-shared" -o "$${shlib_target}" = "darwin-shared" ] ; then \
-         LIBRARIES="$(DLIBCRYPTO)"; \
-       else \
-         LIBRARIES="$(LIBCRYPTO)"; \
-       fi; \
-       $(NEWMAKE) -f $(TOP)/Makefile.shared \
-               APPNAME=$(DHTEST)$(EXE_EXT) CC="$(CC)" CFLAGS="$(CFLAGS)" \
-               LDFLAGS="$(LDFLAGS)" SHARED_LDFLAGS="$(SHARED_LDFLAGS)" \
-               OBJECTS="$(DHTEST).o" \
-               LIBDEPS="$(PEX_LIBS) $$LIBRARIES $(EX_LIBS)" \
-               LIBRPATH=$(INSTALLTOP)/lib \
-               link_app.$${shlib_target}
+       @target=$(DHTEST); $(BUILD_CMD)
 
 $(DSATEST)$(EXE_EXT): $(DSATEST).o $(DLIBCRYPTO)
-       shlib_target=; if [ -n "$(SHARED_LIBS)" ]; then \
-               shlib_target="$(SHLIB_TARGET)"; \
-       fi; \
-       if [ "$${shlib_target}" = "hpux-shared" -o "$${shlib_target}" = "darwin-shared" ] ; then \
-         LIBRARIES="$(DLIBCRYPTO)"; \
-       else \
-         LIBRARIES="$(LIBCRYPTO)"; \
-       fi; \
-       $(NEWMAKE) -f $(TOP)/Makefile.shared \
-               APPNAME=$(DSATEST)$(EXE_EXT) CC="$(CC)" CFLAGS="$(CFLAGS)" \
-               LDFLAGS="$(LDFLAGS)" SHARED_LDFLAGS="$(SHARED_LDFLAGS)" \
-               OBJECTS="$(DSATEST).o" \
-               LIBDEPS="$(PEX_LIBS) $$LIBRARIES $(EX_LIBS)" \
-               LIBRPATH=$(INSTALLTOP)/lib \
-               link_app.$${shlib_target}
+       @target=$(DSATEST); $(BUILD_CMD)
 
 $(METHTEST)$(EXE_EXT): $(METHTEST).o $(DLIBCRYPTO)
-       shlib_target=; if [ -n "$(SHARED_LIBS)" ]; then \
-               shlib_target="$(SHLIB_TARGET)"; \
-       fi; \
-       if [ "$${shlib_target}" = "hpux-shared" -o "$${shlib_target}" = "darwin-shared" ] ; then \
-         LIBRARIES="$(DLIBCRYPTO)"; \
-       else \
-         LIBRARIES="$(LIBCRYPTO)"; \
-       fi; \
-       $(NEWMAKE) -f $(TOP)/Makefile.shared \
-               APPNAME=$(METHTEST)$(EXE_EXT) CC="$(CC)" CFLAGS="$(CFLAGS)" \
-               LDFLAGS="$(LDFLAGS)" SHARED_LDFLAGS="$(SHARED_LDFLAGS)" \
-               OBJECTS="$(METHTEST).o" \
-               LIBDEPS="$(PEX_LIBS) $$LIBRARIES $(EX_LIBS)" \
-               LIBRPATH=$(INSTALLTOP)/lib \
-               link_app.$${shlib_target}
+       @target=$(METHTEST); $(BUILD_CMD)
 
 $(SSLTEST)$(EXE_EXT): $(SSLTEST).o $(DLIBSSL) $(DLIBCRYPTO)
-       shlib_target=; if [ -n "$(SHARED_LIBS)" ]; then \
-               shlib_target="$(SHLIB_TARGET)"; \
-       fi; \
-       if [ "$${shlib_target}" = "hpux-shared" -o "$${shlib_target}" = "darwin-shared" ] ; then \
-         LIBRARIES="$(DLIBSSL) $(LIBKRB5) $(DLIBCRYPTO)"; \
-       else \
-         LIBRARIES="$(LIBSSL) $(LIBKRB5) $(LIBCRYPTO)"; \
-       fi; \
-       $(NEWMAKE) -f $(TOP)/Makefile.shared \
-               APPNAME=$(SSLTEST)$(EXE_EXT) CC="$(CC)" CFLAGS="$(CFLAGS)" \
-               LDFLAGS="$(LDFLAGS)" SHARED_LDFLAGS="$(SHARED_LDFLAGS)" \
-               OBJECTS="$(SSLTEST).o" \
-               LIBDEPS="$(PEX_LIBS) $$LIBRARIES $(EX_LIBS)" \
-               LIBRPATH=$(INSTALLTOP)/lib \
-               link_app.$${shlib_target}
+       @target=$(SSLTEST); $(BUILD_CMD)
 
 $(ENGINETEST)$(EXE_EXT): $(ENGINETEST).o $(DLIBCRYPTO)
-       shlib_target=; if [ -n "$(SHARED_LIBS)" ]; then \
-               shlib_target="$(SHLIB_TARGET)"; \
-       fi; \
-       if [ "$${shlib_target}" = "hpux-shared" -o "$${shlib_target}" = "darwin-shared" ] ; then \
-         LIBRARIES="$(DLIBCRYPTO)"; \
-       else \
-         LIBRARIES="$(LIBCRYPTO)"; \
-       fi; \
-       $(NEWMAKE) -f $(TOP)/Makefile.shared \
-               APPNAME=$(ENGINETEST)$(EXE_EXT) CC="$(CC)" CFLAGS="$(CFLAGS)" \
-               LDFLAGS="$(LDFLAGS)" SHARED_LDFLAGS="$(SHARED_LDFLAGS)" \
-               OBJECTS="$(ENGINETEST).o" \
-               LIBDEPS="$(PEX_LIBS) $$LIBRARIES $(EX_LIBS)" \
-               LIBRPATH=$(INSTALLTOP)/lib \
-               link_app.$${shlib_target}
+       @target=$(ENGINETEST); $(BUILD_CMD)
 
 $(EVPTEST)$(EXE_EXT): $(EVPTEST).o $(DLIBCRYPTO)
-       shlib_target=; if [ -n "$(SHARED_LIBS)" ]; then \
-               shlib_target="$(SHLIB_TARGET)"; \
-       fi; \
-       if [ "$${shlib_target}" = "hpux-shared" -o "$${shlib_target}" = "darwin-shared" ] ; then \
-         LIBRARIES="$(DLIBCRYPTO)"; \
-       else \
-         LIBRARIES="$(LIBCRYPTO)"; \
-       fi; \
-       $(NEWMAKE) -f $(TOP)/Makefile.shared \
-               APPNAME=$(EVPTEST)$(EXE_EXT) CC="$(CC)" CFLAGS="$(CFLAGS)" \
-               LDFLAGS="$(LDFLAGS)" SHARED_LDFLAGS="$(SHARED_LDFLAGS)" \
-               OBJECTS="$(EVPTEST).o" \
-               LIBDEPS="$(PEX_LIBS) $$LIBRARIES $(EX_LIBS)" \
-               LIBRPATH=$(INSTALLTOP)/lib \
-               link_app.$${shlib_target}
+       @target=$(EVPTEST); $(BUILD_CMD)
 
 $(ECDSATEST)$(EXE_EXT): $(ECDSATEST).o $(DLIBCRYPTO)
-       shlib_target=; if [ -n "$(SHARED_LIBS)" ]; then \
-               shlib_target="$(SHLIB_TARGET)"; \
-       fi; \
-       if [ "$${shlib_target}" = "hpux-shared" -o "$${shlib_target}" = "darwin-shared" ] ; then \
-         LIBRARIES="$(DLIBCRYPTO)"; \
-       else \
-         LIBRARIES="$(LIBCRYPTO)"; \
-       fi; \
-       $(NEWMAKE) -f $(TOP)/Makefile.shared \
-               APPNAME=$(ECDSATEST)$(EXE_EXT) CC="$(CC)" CFLAGS="$(CFLAGS)" \
-               LDFLAGS="$(LDFLAGS)" SHARED_LDFLAGS="$(SHARED_LDFLAGS)" \
-               OBJECTS="$(ECDSATEST).o" \
-               LIBDEPS="$(PEX_LIBS) $$LIBRARIES $(EX_LIBS)" \
-               LIBRPATH=$(INSTALLTOP)/lib \
-               link_app.$${shlib_target}
+       @target=$(ECDSATEST); $(BUILD_CMD)
 
 $(ECDHTEST)$(EXE_EXT): $(ECDHTEST).o $(DLIBCRYPTO)
-       shlib_target=; if [ -n "$(SHARED_LIBS)" ]; then \
-               shlib_target="$(SHLIB_TARGET)"; \
-       fi; \
-       if [ "$${shlib_target}" = "hpux-shared" -o "$${shlib_target}" = "darwin-shared" ] ; then \
-         LIBRARIES="$(DLIBCRYPTO)"; \
-       else \
-         LIBRARIES="$(LIBCRYPTO)"; \
-       fi; \
-       $(NEWMAKE) -f $(TOP)/Makefile.shared \
-               APPNAME=$(ECDHTEST)$(EXE_EXT) CC="$(CC)" CFLAGS="$(CFLAGS)" \
-               LDFLAGS="$(LDFLAGS)" SHARED_LDFLAGS="$(SHARED_LDFLAGS)" \
-               OBJECTS="$(ECDHTEST).o" \
-               LIBDEPS="$(PEX_LIBS) $$LIBRARIES $(EX_LIBS)" \
-               LIBRPATH=$(INSTALLTOP)/lib \
-               link_app.$${shlib_target}
+       @target=$(ECDHTEST); $(BUILD_CMD)
 
 #$(AESTEST).o: $(AESTEST).c
 #      $(CC) -c $(CFLAGS) -DINTERMEDIATE_VALUE_KAT -DTRACE_KAT_MCT $(AESTEST).c
@@ -828,22 +422,7 @@ $(ECDHTEST)$(EXE_EXT): $(ECDHTEST).o $(DLIBCRYPTO)
 #      fi
 
 dummytest$(EXE_EXT): dummytest.o $(DLIBCRYPTO)
-       shlib_target=; if [ -n "$(SHARED_LIBS)" ]; then \
-               shlib_target="$(SHLIB_TARGET)"; \
-       fi; \
-       if [ "$${shlib_target}" = "hpux-shared" -o "$${shlib_target}" = "darwin-shared" ] ; then \
-         LIBRARIES="$(DLIBCRYPTO)"; \
-       else \
-         LIBRARIES="$(LIBCRYPTO)"; \
-       fi; \
-       $(NEWMAKE) -f $(TOP)/Makefile.shared \
-               APPNAME=dummytest$(EXE_EXT) CC="$(CC)" CFLAGS="$(CFLAGS)" \
-               LDFLAGS="$(LDFLAGS)" SHARED_LDFLAGS="$(SHARED_LDFLAGS)" \
-               OBJECTS="dummytest.o" \
-               LIBDEPS="$(PEX_LIBS) $$LIBRARIES $(EX_LIBS)" \
-               LIBRPATH=$(INSTALLTOP)/lib \
-               link_app.$${shlib_target}
-       @case "../*.dll" in *\**) ;; *) cp -p ../*.dll .;; esac
+       @target=dummytest$; $(BUILD_CMD)
 
 # DO NOT DELETE THIS LINE -- make depend depends on it.