From 1d8912eb067213465f6d284ca6af113f626e0121 Mon Sep 17 00:00:00 2001 From: Sven Willner Date: Fri, 11 Nov 2016 13:58:16 +0100 Subject: [PATCH] 'renamed binary' --- .gitignore | 2 +- README.md | 4 ++-- makefile | 17 ++++++++++------- 3 files changed, 13 insertions(+), 10 deletions(-) diff --git a/.gitignore b/.gitignore index 9301a2c..cb715cb 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,2 @@ bin/ -compile_commands.json +mrio_disaggregate diff --git a/README.md b/README.md index bd3ca38..fa5b57f 100644 --- a/README.md +++ b/README.md @@ -18,11 +18,11 @@ A makefile is provided, just use ``` make ``` -and the binary can be found in the `bin` folder. Compiler has to support C++11, only tested with GCC. +to create the `mrio_disaggregate` binary. Compiler has to support C++11, only tested with GCC. ## Usage -`disaggregation` expects five filenames as parameters (example given under `examples/simple`): +`mrio_disaggregate` expects five filenames as parameters (example given under `examples/simple`): 1. Index file CSV-file with two columns: 1. region name; 2. sector name. Its rows correspond to the rows and columns of the basetable file. diff --git a/makefile b/makefile index 3d9df0a..be5f319 100644 --- a/makefile +++ b/makefile @@ -1,27 +1,30 @@ CPP_FILES := $(wildcard src/*.cpp) OBJ_FILES := $(patsubst src/%.cpp,bin/%.o,$(CPP_FILES)) +.SECONDARY: OBJ_FILES LD_FLAGS := -lstdc++ -Wl,--gc-sections -lnetcdf_c++4 -CC_FLAGS := -std=c++0x -I include/ -fdata-sections -ffunction-sections -Wshadow +CC_FLAGS := -std=c++0x -I include/ -fdata-sections -ffunction-sections -Wshadow + +all: fast fast: CC_FLAGS += -O3 fast: gcc +debug: CC_FLAGS += -g -DDEBUG +debug: gcc + gcc: CXX = g++ gcc: makedir gcc: binaries -debug: CC_FLAGS += -g -DDEBUG -debug: gcc - clean: - @rm -f $(OBJ_FILES) bin/disaggregation + @rm -f $(OBJ_FILES) mrio_disaggregate makedir: @mkdir -p bin -binaries: bin/disaggregation +binaries: mrio_disaggregate -bin/disaggregation: $(OBJ_FILES) +mrio_disaggregate: $(OBJ_FILES) @echo Linking to $@ @$(CXX) -o $@ $^ $(CC_FLAGS) $(LD_FLAGS)