Verdictd: download rats-tls by gitclone
@@ -18,8 +18,9 @@ Eaa_Name := eaa
Verdict_Name := verdict
Verdictd_Name := verdictd
Opa_Name := libopa.so
+Rats_Tls_Src_Dir := $(CUR_DIR)/rats-tls
-.PHONY: all
+.PHONY: all build_rats_tls distclean
all: $(Eaa_Name)
######## App Objects ########
@@ -27,10 +28,11 @@ all: $(Eaa_Name)
opa:
@cd $(Opa_Lib_Path) && go build -o $(Opa_Name) -buildmode=c-shared $(Opa_SRC_Files)
-rats-tls:
- cd $(PROJDIR)/rats-tls && cmake -DBUILD_SAMPLES=on -H. -Bbuild && make -C build install
+build_rats_tls:
+ if [ ! -d "$(Rats_Tls_Src_Dir)" ]; then git clone https://github.com/inclavare-containers/rats-tls.git; fi
+ cd $(Rats_Tls_Src_Dir) && cmake -DBUILD_SAMPLES=on -H. -Bbuild && make -C build install
-$(Eaa_Name): opa rats-tls
+$(Eaa_Name): opa build_rats_tls
RUSTFLAGS="-C link-args=-Wl,-rpath=/usr/local/lib/rats-tls:/usr/local/lib:$(Opa_Lib_Path),--enable-new-dtags" cargo build $(App_Rust_Flags)
@echo "Cargo => $@"
@@ -54,7 +56,11 @@ package:
$(MAKE) -C dist package VERDICTD_VERSION="$(VERDICTD_VERSION)" VERDICTD_MAINTAINER="$(VERDICTD_MAINTAINER)"
clean:
- @rm -rf $(Opa_Lib_Path)/libopa.*
+ cd $(Rats_Tls_Src_Dir) && make -C build clean && make -C build uninstall
cargo clean && rm -f Cargo.lock
- cd $(PROJDIR)/rats-tls && make -C build clean
+ @rm -rf $(Opa_Lib_Path)/libopa.*
@rm -f dist/rpm/verdictd.spec dist/deb/debian/changelog
+
+distclean:
+ $(MAKE) clean
+ @rm -fr $(Rats_Tls_Src_Dir)
