-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
30 lines (23 loc) · 1.11 KB
/
Makefile
File metadata and controls
30 lines (23 loc) · 1.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# ---- Configuration options ----
# External/implicit variables:
# - CXX: The C++ compiler, such as g++ or clang++.
# - CXXFLAGS: Any extra user-specified compiler flags (can be blank).
# - AR: The archiver, such as ar.
# Mandatory compiler flags
#CXXFLAGS += -std=c++11
CXX_FLAGS+= -fsanitize=undefined
# Optimization level
CXX_FLAGS += -O1
# ---- Targets to build ----
#CRYPTO_LIB=$(shell pwd)/cryptolib
CRYPTO_LIB=./cryptolib
CRYPTO_LIB_FILE=bitcoincrypto
LIB_PATH=$(CRYPTO_LIB)/$(CRYPTO_LIB_FILE)
FILES=Transaction.cpp Wallet.cpp Blockchain.cpp Utils.cpp
BC_FILES=Transaction.cpp Blockchain.cpp Utils.cpp BlockchainDemo.cpp Wallet.cpp
all: test.cpp $(CRYTPO_LIB_FILE)
g++ $(CXX_FLAGS) test.cpp -o test.out -I$(CRYPTO_LIB) -L$(CRYPTO_LIB) -l$(CRYPTO_LIB_FILE)
test: TransactionDemo.cpp Transaction.cpp Utils.cpp $(CRYTPO_LIB_FILE)
g++ $(CXX_FLAGS) TransactionDemo.cpp Transaction.cpp Utils.cpp -o TransactionDemo.out -I$(CRYPTO_LIB) -L$(CRYPTO_LIB) -l$(CRYPTO_LIB_FILE)
blockchain: $(BC_FILES) $(CRYTPO_LIB_FILE)
g++ $(CXX_FLAGS) $(BC_FILES) -o BlockchainDemo.out -I$(CRYPTO_LIB) -L$(CRYPTO_LIB) -l$(CRYPTO_LIB_FILE)