Skip to content

Commit

Permalink
Update Makefile install logic
Browse files Browse the repository at this point in the history
Co-authored-by: Everett Hildenbrandt <everett.hildenbrandt@gmail.com>
  • Loading branch information
sskeirik and ehildenb committed Sep 14, 2020
1 parent 82da622 commit d393510
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,19 @@ plugin-c/blockchain.o: plugin-c/proto/msg.pb.h

.PHONY: install clean

DESTDIR ?=
INSTALL_PREFIX ?= /usr/local
INSTALL_DIR := $(DESTDIR)$(INSTALL_PREFIX)
INSTALL_INCLUDE := $(INSTALL_DIR)/include/kframework

PLUGIN_NAMESPACE := blockchain-k-plugin
install:
@mkdir -p $(PREFIX)/$(PLUGIN_NAMESPACE)
cp plugin/* $(PREFIX)/$(PLUGIN_NAMESPACE)
K_SOURCES := krypto.md

install: $(patsubst %, $(INSTALL_INCLUDE)/$(PLUGIN_NAMESPACE)/%, $(K_SOURCES))

$(INSTALL_INCLUDE)/$(PLUGIN_NAMESPACE)/%.md: plugin/%.md
@mkdir -p $(dir $@)
cp $< $@

clean:
rm -rf */*.o */*/*.o plugin/proto/*.pb.* build deps/libff/build
Expand Down

0 comments on commit d393510

Please sign in to comment.