2016-11-10 13:04:39 +00:00
|
|
|
|
2019-04-12 14:10:50 +00:00
|
|
|
EXTRA_DIST=build.mk build_llvm_config.sh
|
2016-11-10 13:04:39 +00:00
|
|
|
|
2018-10-09 08:20:59 +00:00
|
|
|
if ENABLE_LLVM
|
2016-11-10 13:04:39 +00:00
|
|
|
|
2018-10-09 08:20:59 +00:00
|
|
|
if HOST_WIN32
|
|
|
|
llvm_config=llvm-config.exe
|
|
|
|
else
|
|
|
|
llvm_config=llvm-config
|
|
|
|
endif
|
2016-11-10 13:04:39 +00:00
|
|
|
|
2019-04-12 14:10:50 +00:00
|
|
|
if HAVE_STATIC_ZLIB
|
|
|
|
llvm_extra_libs = $(STATIC_ZLIB_PATH)
|
|
|
|
else
|
2019-09-24 08:53:40 +00:00
|
|
|
if HAVE_SYS_ZLIB
|
2018-10-09 08:20:59 +00:00
|
|
|
llvm_extra_libs=-lz
|
|
|
|
else
|
|
|
|
llvm_extra_libs=
|
|
|
|
endif
|
2019-04-12 14:10:50 +00:00
|
|
|
endif
|
2016-11-10 13:04:39 +00:00
|
|
|
|
2018-10-09 08:20:59 +00:00
|
|
|
if INTERNAL_LLVM
|
2016-11-10 13:04:39 +00:00
|
|
|
|
2018-10-09 08:20:59 +00:00
|
|
|
all-local: configure-llvm build-llvm install-llvm llvm_config.mk
|
2016-11-10 13:04:39 +00:00
|
|
|
|
2018-10-09 08:20:59 +00:00
|
|
|
clean-local: clean-llvm clean-llvm-config
|
2016-11-10 13:04:39 +00:00
|
|
|
|
2018-10-09 08:20:59 +00:00
|
|
|
$(mono_build_root)/llvm/llvm_config.mk: install-llvm
|
2019-04-12 14:10:50 +00:00
|
|
|
$(top_srcdir)/llvm/build_llvm_config.sh "$(top_srcdir)/llvm/usr/bin/$(llvm_config)" "$(LLVM_CODEGEN_LIBS)" "$(llvm_extra_libs)" | tee $@
|
2018-10-09 08:20:59 +00:00
|
|
|
|
|
|
|
else
|
|
|
|
all-local: llvm_config.mk
|
|
|
|
|
|
|
|
clean-local: clean-llvm-config
|
|
|
|
|
|
|
|
$(mono_build_root)/llvm/llvm_config.mk: $(top_srcdir)/llvm/Makefile.am
|
2019-04-12 14:10:50 +00:00
|
|
|
$(top_srcdir)/llvm/build_llvm_config.sh "$(EXTERNAL_LLVM_CONFIG)" "$(LLVM_CODEGEN_LIBS)" "$(llvm_extra_libs)" | tee $@
|
2018-10-09 08:20:59 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
llvm_config.mk: $(mono_build_root)/llvm/llvm_config.mk
|
|
|
|
|
|
|
|
clean-llvm-config:
|
|
|
|
- rm -rf llvm_config.mk
|
|
|
|
|
|
|
|
else
|
|
|
|
all-local:
|
|
|
|
|
|
|
|
clean-local:
|
|
|
|
endif
|
|
|
|
|
|
|
|
# Override this so we don't try to re-copy llvm when we install mono
|
|
|
|
install:
|
|
|
|
|
2019-02-04 20:11:37 +00:00
|
|
|
if TARGET_WASM
|
|
|
|
LLVM_TARGET=wasm32
|
|
|
|
else
|
|
|
|
LLVM_TARGET=
|
|
|
|
endif
|
|
|
|
|
2018-10-09 08:20:59 +00:00
|
|
|
include build.mk
|