diff --git a/Makefile b/Makefile index 698a6f6..bff14ca 100644 --- a/Makefile +++ b/Makefile @@ -1,17 +1,34 @@ +################################################ ### ### Makefile for GilberModel ### -### -### +################################################ + +### Projects +PROJECTS = sqnanalyzer sqngen +### Static Compilation +STC?=1 +### Compilet +CPP = g++ +#CPP = i686-pc-mingw32-g++ -OUTPUT_DIR := Bin -PROJECTS := sqnanalyzer sqngen +################################################ +# Make definitions +################################################ +BIN_DIR = bin -export DBG -export STC -export M32 -export OPENMP +CFLAGS= -Wall + +ifeq ($(STC),1) +STATIC= -static +else +STATIC= +endif + + +SQNGENLIBS= -lgsl -lgslcblas +CFLAGS+= $(STATIC) .HONY: default all $(PROJECTS) #distclean clean tags dependP @@ -19,11 +36,14 @@ default: all all: $(PROJECTS) -sqngen: - g++ -Wall sqngen.c -lgsl -lgslcblas -o SQNGen -sqnanalyzer: - g++ -Wall sqnanalyzer.c -o SQNAnalyzer - +bin_dir: + @echo 'Creating $(BIN_DIR) ...' + @mkdir -p $(BIN_DIR) +sqngen: bin_dir + $(CPP) $(CFLAGS) sqngen.c $(SQNGENLIBS) -o $(BIN_DIR)/sqngen +sqnanalyzer: bin_dir + $(CPP) $(CFLAGS) sqnanalyzer.c -o $(BIN_DIR)/sqnanalyzer clean: - rm SQNGen - rm SQNAnalyzer \ No newline at end of file + @echo 'Removing $(BIN_DIR) ...' + @rm $(BIN_DIR) -R +