Skip to content
Permalink
Browse files

add makefile

  • Loading branch information...
Amxx committed May 15, 2019
1 parent 795b13f commit 22e75d497dce008358627213dc014a389dfd8c4e
Showing with 25 additions and 0 deletions.
  1. +25 −0 makefile
@@ -0,0 +1,25 @@
# FLATTEN
PATH_FLAT = ./build/sources/
FILE_FLAT = flattened.sol
SRCS = \
node_modules/iexec-poco/build/sources/flattened.sol \
node_modules/iexec-doracle-base/contracts/IexecDoracle.sol \
contracts/PriceOracle.sol

.PHONY: flatten

all:
@echo "Usage: make [flatten]"

flatten: $(PATH_FLAT)$(FILE_FLAT)

$(PATH_FLAT)$(FILE_FLAT): $(FILES) makefile
@mkdir -p $(PATH_FLAT)
@rm -f $@
@echo "pragma solidity ^0.5.8;" >> $@
@echo "pragma experimental ABIEncoderV2;" >> $@
@$(foreach file, $(SRCS), \
echo -n "Adding $(file) to $@ ..."; \
cat $(file) | sed '/^pragma/ d' | sed '/^import/ d' >> $@; \
echo " done"; \
)

0 comments on commit 22e75d4

Please sign in to comment.
You can’t perform that action at this time.