You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

Makefile.prebuild 1.1 kB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. # This is triggered by Makefile.system and runs before any of the code is built.
  2. export BINARY
  3. export USE_OPENMP
  4. ifdef TARGET_CORE
  5. TARGET_MAKE = Makefile_kernel.conf
  6. TARGET_CONF = config_kernel.h
  7. else
  8. TARGET_MAKE = Makefile.conf
  9. TARGET_CONF = config.h
  10. endif
  11. # CPUIDEMU = ../../cpuid/table.o
  12. ifdef CPUIDEMU
  13. EXFLAGS = -DCPUIDEMU -DVENDOR=99
  14. endif
  15. all: getarch_2nd cblas_noconst.h
  16. ./getarch_2nd 0 >> $(TARGET_MAKE)
  17. ./getarch_2nd 1 >> $(TARGET_CONF)
  18. config.h : c_check f_check getarch
  19. perl ./c_check $(TARGET_MAKE) $(TARGET_CONF) $(CC)
  20. perl ./f_check $(TARGET_MAKE) $(TARGET_CONF) $(FC)
  21. ./getarch 0 >> $(TARGET_MAKE)
  22. ./getarch 1 >> $(TARGET_CONF)
  23. getarch : getarch.c cpuid.S dummy $(CPUIDEMU)
  24. $(HOSTCC) $(CFLAGS) $(EXFLAGS) -o $(@F) getarch.c cpuid.S $(CPUIDEMU)
  25. getarch_2nd : getarch_2nd.c config.h dummy
  26. ifndef TARGET_CORE
  27. $(HOSTCC) -I. $(CFLAGS) -o $(@F) getarch_2nd.c
  28. else
  29. $(HOSTCC) -I. $(CFLAGS) -DBUILD_KERNEL -o $(@F) getarch_2nd.c
  30. endif
  31. cblas_noconst.h : cblas.h
  32. perl -ane ' s/\bconst\b\s*//g; print; ' < cblas.h > cblas_noconst.h
  33. dummy: