Move cpuid_asm_src file information to build.info files
[openssl.git] / crypto / build.info
index fb0f3f0..cb8457a 100644 (file)
@@ -23,6 +23,41 @@ IF[{- !$disabled{uplink} -}]
   ENDIF
 ENDIF
 
+$CPUIDASM=mem_clr.c
+$CPUIDDEF=
+IF[{- !$disabled{asm} && $config{processor} ne '386' -}]
+  $CPUIDASM_x86=x86cpuid.s
+
+  $CPUIDASM_x86_64=x86_64cpuid.s
+
+  $CPUIDASM_ia64=ia64cpuid.s
+
+  $CPUIDASM_sparcv9=sparcv9cap.c sparccpuid.S
+
+  $CPUIDASM_alpha=alphacpuid.s
+
+  $CPUIDASM_s390x=s390xcap.c s390xcpuid.S
+
+  $CPUIDASM_armv4=armcap.c armv4cpuid.S
+
+  $CPUIDASM_aarch64=armcap.c arm64cpuid.S
+
+  $CPUIDASM_parisc11=pariscid.s
+  $CPUIDASM_parisc20_64=$CPUIDASM_parisc11
+
+  $CPUIDASM_ppc32=ppccpuid.s ppccap.c
+  $CPUIDASM_ppc64=$CPUIDASM_ppc32
+
+  $CPUIDASM_c64xplus=c64xpluscpuid.s
+
+  # Now that we have defined all the arch specific variables, use the
+  # appropriate one, and define the appropriate macros
+  IF[$CPUIDASM_{- $target{asm_arch} -}]
+    $CPUIDASM=$CPUIDASM_{- $target{asm_arch} -}
+    $CPUIDDEF=OPENSSL_CPUID_OBJ
+  ENDIF
+ENDIF
+
 # The Core
 $CORE_COMMON=provider_core.c provider_predefined.c core_fetch.c core_namemap.c
 
@@ -33,14 +68,16 @@ SOURCE[../providers/fips]=$CORE_COMMON
 $UTIL_COMMON=\
         cryptlib.c mem.c mem_sec.c params.c bsearch.c ex_data.c o_str.c \
         ctype.c threads_pthread.c threads_win.c threads_none.c context.c \
-        sparse_array.c {- $target{cpuid_asm_src} -}
+        sparse_array.c $CPUIDASM
+$UTIL_DEFINE=$CPUIDDEF
 
 SOURCE[../libcrypto]=$UTIL_COMMON \
         mem_dbg.c cversion.c info.c cpt_err.c ebcdic.c uid.c o_time.c o_dir.c \
         o_fopen.c getenv.c o_init.c o_fips.c init.c trace.c provider.c \
         $UPLINKSRC
-DEFINE[../libcrypto]=$UPLINKDEF
+DEFINE[../libcrypto]=$UTIL_DEFINE $UPLINKDEF
 SOURCE[../providers/fips]=$UTIL_COMMON
+DEFINE[../providers/fips]=$UTIL_DEFINE