Make fipscanisteronly build only required files.
[openssl.git] / Makefile.fips
index 2344a5823abc1e5f340115deff6ca80a297d8183..929fa95c502bf2c43f4e739742f41c754c92008f 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.
 # 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
 ASFLAG=$(CFLAG)
 
 # For x86 assembler: Set PROCESSOR to 386 if you want to support
@@ -147,8 +147,8 @@ SHLIBDIRS= crypto
 # dirs in crypto to build
 SDIRS=  \
        sha hmac des aes modes \
 # dirs in crypto to build
 SDIRS=  \
        sha hmac des aes modes \
-       bn ec rsa dsa ecdsa dh ecdh \
-       buffer rand evp cmac
+       bn ec rsa dsa ecdsa dh \
+       buffer rand evp # ecdh cmac
 # keep in mind that the above list is adjusted by ./Configure
 # according to no-xxx arguments...
 
 # keep in mind that the above list is adjusted by ./Configure
 # according to no-xxx arguments...
 
@@ -205,7 +205,7 @@ CLEARENV=   TOP= && unset TOP $${LIB+LIB} $${LIBS+LIBS}     \
 
 BUILDENV=      PLATFORM='$(PLATFORM)' PROCESSOR='$(PROCESSOR)' \
                CC='$(CC)' CFLAG='$(CFLAG)'                     \
 
 BUILDENV=      PLATFORM='$(PLATFORM)' PROCESSOR='$(PROCESSOR)' \
                CC='$(CC)' CFLAG='$(CFLAG)'                     \
-               AS='$(CC)' ASFLAG='$(CFLAG) -c'                 \
+               ASFLAG='$(CFLAG) -c'                    \
                AR='$(AR)' NM='$(NM)' RANLIB='$(RANLIB)'        \
                CROSS_COMPILE='$(CROSS_COMPILE)'        \
                PERL='$(PERL)' ENGDIRS='$(ENGDIRS)'             \
                AR='$(AR)' NM='$(NM)' RANLIB='$(RANLIB)'        \
                CROSS_COMPILE='$(CROSS_COMPILE)'        \
                PERL='$(PERL)' ENGDIRS='$(ENGDIRS)'             \
@@ -367,7 +367,12 @@ build_crypto:
        else \
                ARX='${AR}' ; \
        fi ; export ARX ; \
        else \
                ARX='${AR}' ; \
        fi ; export ARX ; \
-               dir=crypto; target=all; $(BUILD_ONE_CMD)
+       if [ $(FIPSCANISTERINTERNAL) = "y" ]; then \
+               AS='$(PERL) $${TOP}/util/fipsas.pl $${TOP} $${<} $(CC)' ; \
+       else \
+               AS='$(CC) -c' ; \
+       fi ; export AS ; \
+               dir=crypto; target=fips; $(BUILD_ONE_CMD)
 build_ssl:
        @dir=ssl; target=all; $(BUILD_ONE_CMD)
 build_engines:
 build_ssl:
        @dir=ssl; target=all; $(BUILD_ONE_CMD)
 build_engines: