From be2a1b202b4756a2dadfb468459639cf836ff39c Mon Sep 17 00:00:00 2001 From: Michal Sojka Date: Sun, 6 May 2018 23:22:06 +0200 Subject: [PATCH] Also compile and install libpremnotify --- Makefile | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 881524e..1c0e495 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ PREFIX = $(HOME)/opt/hercules-compiler TMP_DESTDIR = $(CURDIR)/install -all: passes +all: passes libpremnotify-cpu llvm-clang: build/bin/opt @@ -52,12 +52,24 @@ build_passes/build.ninja: | build_passes $(TMP_DESTDIR)/$(PREFIX)/lib/cmake/llvm passes: build_passes/build.ninja ninja -C build_passes +$(DESTDIR)$(PREFIX)/bin/herculesCompileCPU.sh: HerculesCompiler/cpu-driver/herculesCompileCPU.sh + sed -e '/^PASSROOT=/ s!=.*!="$(PREFIX)/lib/hercules"!' \ + -e '/^LLVM_BIN_DIR=/ s!=.*!="$(PREFIX)/bin/"!' \ + -e '/^PREM_RUNTIME_PATH=/ s!=.*!="$(PREFIX)/lib/hercules"!' \ + < $< > $@ + chmod +x $@ + +libpremnotify-cpu: + $(MAKE) -C HerculesCompiler/libpremnotify + install: all DESTDIR=$(DESTDIR) ninja -C build install DESTDIR=$(DESTDIR) ninja -C build_passes install + $(MAKE) $(DESTDIR)$(PREFIX)/bin/herculesCompileCPU.sh + $(MAKE) -C HerculesCompiler/libpremnotify install DESTDIR=$(DESTDIR) PREFIX=$(PREFIX) clean: - rm -rf build build_passes + rm -rf build build_passes install define tar_concat $(foreach subarch,$(shell git submodule --quiet foreach 'echo $$toplevel/../$(prefix)-$$path.tar'),tar --concatenate --file=../$(prefix).tar $(subarch) -- 2.39.2