Remove fipscanister build functionality from makefiles.
[openssl.git] / Makefile.org
index cfd341317fffdf303b784fca5af966ebcece58bb..4a384991130eaedeef2ddc4509e543f39e8fe9ef 100644 (file)
@@ -78,7 +78,7 @@ LIBDIR=lib
 # dependent assembler flags. E.g. if you throw -mcpu=ultrasparc at SPARC
 # gcc, then the driver will automatically translate it to -xarch=v8plus
 # and pass it down to assembler.
-#AS=$(CC) -c
+AS=$(CC) -c
 ASFLAG=$(CFLAG)
 
 # For x86 assembler: Set PROCESSOR to 386 if you want to support
@@ -88,6 +88,7 @@ PROCESSOR=
 # CPUID module collects small commonly used assembler snippets
 CPUID_OBJ= 
 BN_ASM= bn_asm.o
+EC_ASM=
 DES_ENC= des_enc.o fcrypt_b.o
 AES_ENC= aes_core.o aes_cbc.o
 BF_ENC= bf_enc.o
@@ -120,15 +121,9 @@ LIBZLIB=
 
 FIPSLIBDIR=/usr/local/ssl/$(LIBDIR)/
 
-# This is set to "y" if fipscanister.o is compiled internally as
-# opposed to coming from an external validated location.
-
-FIPSCANISTERINTERNAL=n
-
 # The location of the library which contains fipscanister.o
-# normally it will be libcrypto unless fipsdso is set in which
-# case it will be libfips. If not compiling in FIPS mode at all
-# this is empty making it a useful test for a FIPS compile.
+# normally it will be libcrypto. If not compiling in FIPS mode
+# at all this is empty making it a useful test for a FIPS compile.
 
 FIPSCANLIB=
 
@@ -206,7 +201,7 @@ CLEARENV=   TOP= && unset TOP $${LIB+LIB} $${LIBS+LIBS}     \
 
 BUILDENV=      PLATFORM='$(PLATFORM)' PROCESSOR='$(PROCESSOR)' \
                CC='$(CC)' CFLAG='$(CFLAG)'                     \
-               ASFLAG='$(CFLAG) -c'                    \
+               AS='$(CC)' ASFLAG='$(CFLAG) -c'                 \
                AR='$(AR)' NM='$(NM)' RANLIB='$(RANLIB)'        \
                CROSS_COMPILE='$(CROSS_COMPILE)'        \
                PERL='$(PERL)' ENGDIRS='$(ENGDIRS)'             \
@@ -223,8 +218,8 @@ BUILDENV=   PLATFORM='$(PLATFORM)' PROCESSOR='$(PROCESSOR)' \
                EXE_EXT='$(EXE_EXT)' SHARED_LIBS='$(SHARED_LIBS)'       \
                SHLIB_EXT='$(SHLIB_EXT)' SHLIB_TARGET='$(SHLIB_TARGET)' \
                PEX_LIBS='$(PEX_LIBS)' EX_LIBS='$(EX_LIBS)'     \
-               CPUID_OBJ='$(CPUID_OBJ)'                        \
-               BN_ASM='$(BN_ASM)' DES_ENC='$(DES_ENC)'         \
+               CPUID_OBJ='$(CPUID_OBJ)' BN_ASM='$(BN_ASM)'     \
+               EC_ASM='$(EC_ASM)' DES_ENC='$(DES_ENC)'         \
                AES_ENC='$(AES_ENC)' CMLL_ENC='$(CMLL_ENC)'     \
                BF_ENC='$(BF_ENC)' CAST_ENC='$(CAST_ENC)'       \
                RC4_ENC='$(RC4_ENC)' RC5_ENC='$(RC5_ENC)'       \
@@ -356,24 +351,10 @@ FIPS_EX_OBJ= ../crypto/aes/aes_cfb.o \
 sub_all: build_all
 build_all: build_libs build_apps build_tests build_tools
 
-build_libs: build_crypto build_fips build_ssl build_engines
-
-build_fips:
-       @dir=fips; target=all; [ -z "$(FIPSCANLIB)" ] || $(BUILD_ONE_CMD)
+build_libs: build_crypto build_ssl build_engines
 
 build_crypto:
-       if [ -n "$(FIPSCANLIB)" ]; then \
-               EXCL_OBJ='$(AES_ENC) $(BN_ASM) $(DES_ENC) $(CPUID_OBJ) $(SHA1_ASM_OBJ) $(MODES_ASM_OBJ) $(FIPS_EX_OBJ)' ; export EXCL_OBJ ; \
-               ARX='$(PERL) $${TOP}/util/arx.pl $(AR)' ; \
-       else \
-               ARX='${AR}' ; \
-       fi ; export ARX ; \
-       if [ $(FIPSCANISTERINTERNAL) = "y" ]; then \
-               AS='$(PERL) $${TOP}/util/fipsas.pl $${TOP} $${<} $(CC) -c' ; \
-       else \
-               AS='$(CC) -c' ; \
-       fi ; export AS ; \
-               dir=crypto; target=all; $(BUILD_ONE_CMD)
+       @dir=crypto; target=all; $(BUILD_ONE_CMD)
 build_ssl:
        @dir=ssl; target=all; $(BUILD_ONE_CMD)
 build_engines:
@@ -389,13 +370,13 @@ all_testapps: build_libs build_testapps
 build_testapps:
        @dir=crypto; target=testapps; $(BUILD_ONE_CMD)
 
-libcrypto$(SHLIB_EXT): libcrypto.a build_fips
+libcrypto$(SHLIB_EXT): libcrypto.a
        @if [ "$(SHLIB_TARGET)" != "" ]; then \
                if [ "$(FIPSCANLIB)" = "libcrypto" ]; then \
                        FIPSLD_CC="$(CC)"; CC=fips/fipsld; \
                        export CC FIPSLD_CC; \
                fi; \
-               $(MAKE) -e SHLIBDIRS=crypto build-shared; \
+               $(MAKE) -e SHLIBDIRS=crypto CC="$${CC:-$(CC)}" build-shared; \
        else \
                echo "There's no support for shared libraries on this platform" >&2; \
                exit 1; \
@@ -467,11 +448,11 @@ libssl.pc: Makefile
            echo 'libdir=$${exec_prefix}/$(LIBDIR)'; \
            echo 'includedir=$${prefix}/include'; \
            echo ''; \
-           echo 'Name: OpenSSL'; \
+           echo 'Name: OpenSSL-libssl'; \
            echo 'Description: Secure Sockets Layer and cryptography libraries'; \
            echo 'Version: '$(VERSION); \
-           echo 'Requires'; \
-           echo 'Libs: -L$${libdir} -lssl -lcrypto'; \
+           echo 'Requires.private: libcrypto'; \
+           echo 'Libs: -L$${libdir} -lssl'; \
            echo 'Libs.private: $(EX_LIBS)'; \
            echo 'Cflags: -I$${includedir} $(KRB5_INCLUDES)' ) > libssl.pc
 
@@ -484,10 +465,7 @@ openssl.pc: Makefile
            echo 'Name: OpenSSL'; \
            echo 'Description: Secure Sockets Layer and cryptography libraries and tools'; \
            echo 'Version: '$(VERSION); \
-           echo 'Requires: '; \
-           echo 'Libs: -L$${libdir} -lssl -lcrypto'; \
-           echo 'Libs.private: $(EX_LIBS)'; \
-           echo 'Cflags: -I$${includedir} $(KRB5_INCLUDES)' ) > openssl.pc
+           echo 'Requires: libssl libcrypto' ) > openssl.pc
 
 Makefile: Makefile.org Configure config
        @echo "Makefile is older than Makefile.org, Configure or config."
@@ -500,7 +478,7 @@ libclean:
 clean: libclean
        rm -f shlib/*.o *.o core a.out fluff rehash.time testlog make.log cctest cctest.c
        @set -e; target=clean; $(RECURSIVE_BUILD_CMD)
-       rm -f $(LIBS)
+       rm -f $(LIBS) tags TAGS
        rm -f openssl.pc libssl.pc libcrypto.pc
        rm -f speed.* .pure
        rm -f $(TARFILE)
@@ -560,9 +538,12 @@ depend:
 lint:
        @set -e; target=lint; $(RECURSIVE_BUILD_CMD)
 
-tags:
-       rm -f TAGS
-       find . -name '[^.]*.[ch]' | xargs etags -a
+tags TAGS: FORCE
+       rm -f TAGS tags
+       -ctags -R .
+       -etags -R .
+
+FORCE:
 
 errors:
        $(PERL) util/ck_errf.pl -strict */*.c */*/*.c
@@ -666,11 +647,7 @@ install_sw:
                do \
                        if [ -f "$$i" -o -f "$$i.a" ]; then \
                        (       echo installing $$i; \
-                               if ! expr "$(PLATFORM)" : "Cygwin" >/dev/null; then \
-                                       cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \
-                                       chmod 555 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \
-                                       mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i; \
-                               else \
+                               if expr "$(PLATFORM)" : "Cygwin" >/dev/null; then \
                                        c=`echo $$i | sed 's/^lib\(.*\)\.dll\.a/cyg\1-$(SHLIB_VERSION_NUMBER).dll/'`; \
                                        cp $$c $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new; \
                                        chmod 755 $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new; \
@@ -678,6 +655,10 @@ install_sw:
                                        cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \
                                        chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \
                                        mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i; \
+                               else \
+                                       cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \
+                                       chmod 555 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \
+                                       mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i; \
                                fi ); \
                                if expr $(PLATFORM) : 'mingw' > /dev/null; then \
                                (       case $$i in \
@@ -710,6 +691,10 @@ install_sw:
 
 install_html_docs:
        here="`pwd`"; \
+       filecase=; \
+       case "$(PLATFORM)" in DJGPP|Cygwin*|mingw*|darwin*-*-cc) \
+               filecase=-i; \
+       esac; \
        for subdir in apps crypto ssl; do \
                mkdir -p $(INSTALL_PREFIX)$(HTMLDIR)/$$subdir; \
                for i in doc/$$subdir/*.pod; do \
@@ -717,7 +702,7 @@ install_html_docs:
                        echo "installing html/$$fn.$(HTMLSUFFIX)"; \
                        cat $$i \
                        | sed -r 's/L<([^)]*)(\([0-9]\))?\|([^)]*)(\([0-9]\))?>/L<\1|\3>/g' \
-                       | pod2html --podroot=doc --htmlroot=.. --podpath=apps:crypto:ssl \
+                       | pod2html --podroot=doc --htmlroot=.. --podpath=$$subdir:apps:crypto:ssl \
                        | sed -r 's/<!DOCTYPE.*//g' \
                        > $(INSTALL_PREFIX)$(HTMLDIR)/$$subdir/$$fn.$(HTMLSUFFIX); \
                        $(PERL) util/extract-names.pl < $$i | \
@@ -738,7 +723,7 @@ install_docs:
        @pod2man="`cd ./util; ./pod2mantest $(PERL)`"; \
        here="`pwd`"; \
        filecase=; \
-       case "$(PLATFORM)" in DJGPP|Cygwin*|mingw*) \
+       case "$(PLATFORM)" in DJGPP|Cygwin*|mingw*|darwin*-*-cc) \
                filecase=-i; \
        esac; \
        set -e; for i in doc/apps/*.pod; do \