Merge pull request #16429 from vargaz/llvm-jit-module
[mono-project.git] / llvm / Makefile.am
blob82c5e8454a11fdeac4aba57d3575374e706e413b
2 EXTRA_DIST=build.mk build_llvm_config.sh
4 if ENABLE_LLVM
6 if HOST_WIN32
7 llvm_config=llvm-config.exe
8 else
9 llvm_config=llvm-config
10 endif
12 if HAVE_STATIC_ZLIB
13 llvm_extra_libs = $(STATIC_ZLIB_PATH)
14 else
15 if HAVE_SYS_ZLIB
16 llvm_extra_libs=-lz
17 else
18 llvm_extra_libs=
19 endif
20 endif
22 if INTERNAL_LLVM
24 all-local: configure-llvm build-llvm install-llvm llvm_config.mk
26 clean-local: clean-llvm clean-llvm-config
28 $(mono_build_root)/llvm/llvm_config.mk: install-llvm
29         $(top_srcdir)/llvm/build_llvm_config.sh "$(top_srcdir)/llvm/usr/bin/$(llvm_config)" "$(LLVM_CODEGEN_LIBS)" "$(llvm_extra_libs)" | tee $@
31 else
32 all-local: llvm_config.mk
34 clean-local: clean-llvm-config
36 $(mono_build_root)/llvm/llvm_config.mk: $(top_srcdir)/llvm/Makefile.am
37         $(top_srcdir)/llvm/build_llvm_config.sh "$(EXTERNAL_LLVM_CONFIG)" "$(LLVM_CODEGEN_LIBS)" "$(llvm_extra_libs)" | tee $@
38 endif
40 llvm_config.mk: $(mono_build_root)/llvm/llvm_config.mk
42 clean-llvm-config:
43         - rm -rf llvm_config.mk
45 else
46 all-local: 
48 clean-local: 
49 endif
51 # Override this so we don't try to re-copy llvm when we install mono
52 install:
54 if TARGET_WASM
55 LLVM_TARGET=wasm32
56 else
57 LLVM_TARGET=
58 endif
60 include build.mk