Improve Makefile to use with mingw

This commit is contained in:
jfmcarreira committed 2013-10-05 21:53:00 +01:00
1 parent 51b0904a79
commit 1cf98dc68d
1 file changed
+35 -15
+35 -15
View File
@@ -1,17 +1,34 @@
################################################
### ###
### Makefile for GilberModel ### 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 CFLAGS= -Wall
export STC
export M32 ifeq ($(STC),1)
export OPENMP STATIC= -static
else
STATIC=
endif
SQNGENLIBS= -lgsl -lgslcblas
CFLAGS+= $(STATIC)
.HONY: default all $(PROJECTS) #distclean clean tags dependP .HONY: default all $(PROJECTS) #distclean clean tags dependP
@@ -19,11 +36,14 @@ default: all
all: $(PROJECTS) all: $(PROJECTS)
sqngen: bin_dir:
g++ -Wall sqngen.c -lgsl -lgslcblas -o SQNGen @echo 'Creating $(BIN_DIR) ...'
sqnanalyzer: @mkdir -p $(BIN_DIR)
g++ -Wall sqnanalyzer.c -o SQNAnalyzer sqngen: bin_dir
$(CPP) $(CFLAGS) sqngen.c $(SQNGENLIBS) -o $(BIN_DIR)/sqngen
sqnanalyzer: bin_dir
$(CPP) $(CFLAGS) sqnanalyzer.c -o $(BIN_DIR)/sqnanalyzer
clean: clean:
rm SQNGen @echo 'Removing $(BIN_DIR) ...'
rm SQNAnalyzer @rm $(BIN_DIR) -R