]> rtime.felk.cvut.cz Git - hercules2020/hercules-compiler.git/blob - Makefile
Add build dependencies and create-orig-tgz Makefile target
[hercules2020/hercules-compiler.git] / Makefile
1 PREFIX = $(HOME)/opt/hercules-compiler
2 all: build/bin/clang
3
4 build/bin/clang: build/build.ninja
5         ninja -C build
6
7 llvm/tools/clang:
8         ln -s ../../clang $@
9
10 llvm/projects/openmp:
11         ln -s ../../openmp $@
12
13 build:
14         mkdir $@
15
16 build/build.ninja: build llvm/tools/clang llvm/projects/openmp
17         cd $(@D) && cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX="$(PREFIX)" -DLLVM_ENABLE_ASSERTIONS=ON -DLLVM_ENABLE_BACKTRACES=ON -DLLVM_ENABLE_WERROR=OFF -DBUILD_SHARED_LIBS=OFF -DLLVM_ENABLE_RTTI=ON -G "Ninja" $(CURDIR)/llvm
18
19 install: all
20         cd build && ninja install
21
22 clean:
23         rm -rf build
24
25 create-orig-tgz: prefix=$(notdir $(CURDIR))
26 create-orig-tgz:
27         git ls-files --recurse-submodules | sed "s#^#$(prefix)/#" | \
28         tar -c -C.. -z -f "../$(prefix)_$(shell dpkg-parsechangelog --show-field Version|sed -e s/-.*//).orig.tar.gz" --verbatim-files-from --files-from=-