Check for invalid divisors in BN_div.
[openssl.git] / Makefile.org
index 590da9752e5403795b897bc4c090103a84b09f28..f2460dc180a00450664e7f8c5663d0d308c28e11 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=
 
@@ -137,7 +132,7 @@ FIPSCANLIB=
 
 BASEADDR=
 
-DIRS=   crypto fips ssl engines apps test tools
+DIRS=   crypto ssl engines apps test tools
 ENGDIRS= ccgost
 SHLIBDIRS= crypto ssl
 
@@ -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)'       \
@@ -237,7 +232,6 @@ BUILDENV=   PLATFORM='$(PLATFORM)' PROCESSOR='$(PROCESSOR)' \
                PERLASM_SCHEME='$(PERLASM_SCHEME)'              \
                FIPSLIBDIR='${FIPSLIBDIR}'                      \
                FIPSCANLIB="$${FIPSCANLIB:-$(FIPSCANLIB)}"      \
-               FIPSCANISTERINTERNAL='${FIPSCANISTERINTERNAL}'  \
                FIPS_EX_OBJ='${FIPS_EX_OBJ}'    \
                THIS=$${THIS:-$@} MAKEFILE=Makefile MAKEOVERRIDES=
 # MAKEOVERRIDES= effectively "equalizes" GNU-ish and SysV-ish make flavors,
@@ -354,42 +348,30 @@ FIPS_EX_OBJ= ../crypto/aes/aes_cfb.o \
        ../crypto/uid.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_all: build_libs build_apps build_tests build_tools
 
-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)
-build_ssl:
+       @dir=crypto; target=all; $(BUILD_ONE_CMD)
+build_ssl: build_crypto
        @dir=ssl; target=all; $(BUILD_ONE_CMD)
-build_engines:
+build_engines: build_crypto
        @dir=engines; target=all; AS='$(CC) -c'; export AS; $(BUILD_ONE_CMD)
-build_apps:
+
+build_apps: build_libs
        @dir=apps; target=all; $(BUILD_ONE_CMD)
-build_tests:
+build_tests: build_libs
        @dir=test; target=all; $(BUILD_ONE_CMD)
-build_tools:
+build_tools: build_libs
        @dir=tools; target=all; $(BUILD_ONE_CMD)
 
 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; \
@@ -496,8 +478,9 @@ libclean:
 
 clean: libclean
        rm -f shlib/*.o *.o core a.out fluff rehash.time testlog make.log cctest cctest.c
+       rm -rf *.bak certs/.0
        @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)
@@ -518,16 +501,12 @@ links:
        @$(PERL) $(TOP)/util/mkdir-p.pl include/openssl
        @$(PERL) $(TOP)/util/mklink.pl include/openssl $(EXHEADER)
        @set -e; target=links; $(RECURSIVE_BUILD_CMD)
-       @if [ -z "$(FIPSCANLIB)" ]; then \
-               set -e; target=links; dir=fips ; $(BUILD_CMD) ; \
-       fi
 
 gentests:
        @(cd test && echo "generating dummy tests (if needed)..." && \
        $(CLEARENV) && $(MAKE) -e $(BUILDENV) TESTS='$(TESTS)' OPENSSL_DEBUG_MEMORY=on generate );
 
 dclean:
-       rm -rf *.bak include/openssl certs/.0
        @set -e; target=dclean; $(RECURSIVE_BUILD_CMD)
 
 rehash: rehash.time
@@ -557,9 +536,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
@@ -707,6 +689,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 \
@@ -714,7 +700,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 | \
@@ -732,10 +718,9 @@ install_docs:
                $(INSTALL_PREFIX)$(MANDIR)/man3 \
                $(INSTALL_PREFIX)$(MANDIR)/man5 \
                $(INSTALL_PREFIX)$(MANDIR)/man7
-       @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 \
@@ -743,9 +728,9 @@ install_docs:
                sec=`$(PERL) util/extract-section.pl 1 < $$i`; \
                echo "installing man$$sec/$$fn.$${sec}$(MANSUFFIX)"; \
                (cd `$(PERL) util/dirname.pl $$i`; \
-               sh -c "$$pod2man \
+               pod2man \
                        --section=$$sec --center=OpenSSL \
-                       --release=$(VERSION) `basename $$i`") \
+                       --release=$(VERSION) `basename $$i`) \
                        >  $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \
                $(PERL) util/extract-names.pl < $$i | \
                        (grep -v $$filecase "^$$fn\$$"; true) | \
@@ -760,9 +745,9 @@ install_docs:
                sec=`$(PERL) util/extract-section.pl 3 < $$i`; \
                echo "installing man$$sec/$$fn.$${sec}$(MANSUFFIX)"; \
                (cd `$(PERL) util/dirname.pl $$i`; \
-               sh -c "$$pod2man \
+               pod2man \
                        --section=$$sec --center=OpenSSL \
-                       --release=$(VERSION) `basename $$i`") \
+                       --release=$(VERSION) `basename $$i`) \
                        >  $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \
                $(PERL) util/extract-names.pl < $$i | \
                        (grep -v $$filecase "^$$fn\$$"; true) | \