Commit 5e42944f authored by Daniel Brown's avatar Daniel Brown

Updating build for windows

parent fff9c321
......@@ -48,6 +48,14 @@ else
endif
endif
# These are required for statically linking mingw libraries for distribution
ifeq "$(ARCH)" "win32"
MINGW_FLAGS = -static-libgcc -static-libstdc++ -Wl,-Bstatic -lstdc++ -lpthread -Wl,-Bdynamic
else ifeq "$(ARCH)" "win64"
MINGW_FLAGS = -static-libgcc -static-libstdc++ -Wl,-Bstatic -lstdc++ -lpthread -Wl,-Bdynamic
else
MINGW_FLAGS =
endif
GIT = git
GREP = grep
......@@ -246,8 +254,8 @@ endif
# make kat
kat: PROG = ../kat
kat: msgs config $(PREREQS)
$(CXX) ${GSL_CFLAGS} $(BASE_CFLAGS) -c $(INCLUDES) $(KAT_SOURCES_CPP)
$(CC) $(FAST_CFLAGS) ${GSL_CFLAGS} -o $(PROG) $(OBJECTS) $(LIBS) $(LDFLAGS) ${GSL_LIBS} ${CUBA_CFLAGS}
$(CXX) ${GSL_CFLAGS} $(BASE_CFLAGS) -c $(INCLUDES) $(KAT_SOURCES_CPP) ${MINGW_FLAGS}
$(CC) $(FAST_CFLAGS) ${GSL_CFLAGS} -o $(PROG) $(OBJECTS) $(LIBS) $(LDFLAGS) ${GSL_LIBS} ${CUBA_CFLAGS} ${MINGW_FLAGS}
# make fast
fast: kat
......@@ -259,13 +267,13 @@ debug: CFLAGS = $(DEBUG_CFLAGS)
debug: PROG = ../kat
debug: msgs config $(PREREQS)
$(CXX) $(DEBUG_CFLAGS) ${GSL_CFLAGS} $(BASE_CFLAGS) -c $(INCLUDES) $(KAT_SOURCES_CPP)
$(CC) $(CFLAGS) ${GSL_CFLAGS} -o $(PROG) $(OBJECTS) $(LIBS) $(LDFLAGS) ${GSL_LIBS} ${CUBA_CFLAGS}
$(CC) $(CFLAGS) ${GSL_CFLAGS} -o $(PROG) $(OBJECTS) $(LIBS) $(LDFLAGS) ${GSL_LIBS} ${CUBA_CFLAGS}
# make nodebug
nodebug: CFLAGS = $(NODEBUG_CFLAGS)
nodebug: PROG = ../kat
nodebug: config $(PREREQS)
$(CC) $(CFLAGS) ${GSL_CFLAGS} -o $(PROG) $(OBJECTS) $(LIBS) $(LDFLAGS) ${GSL_LIBS} ${CUBA_CFLAGS}
$(CC) $(CFLAGS) ${GSL_CFLAGS} -o $(PROG) $(OBJECTS) $(LIBS) $(LDFLAGS) ${GSL_LIBS} ${CUBA_CFLAGS} ${MINGW_FLAGS}
# make test
$(TEST_OBJECTS): CFLAGS = $(BASE_CFLAGS) -g
......@@ -315,7 +323,7 @@ slow: config $(PREREQS)
# make versionnumber
versionnumber: PROG := ../kat_$(GIT_SHA)
versionnumber: config $(PREREQS)
$(CC) $(FAST_CFLAGS) ${GSL_CFLAGS} -o $(PROG) $(OBJECTS) $(LIBS) $(LDFLAGS) ${GSL_LIBS} ${CUBA_CFLAGS}
$(CC) $(FAST_CFLAGS) ${GSL_CFLAGS} -o $(PROG) $(OBJECTS) $(LIBS) $(LDFLAGS) ${GSL_LIBS} ${CUBA_CFLAGS} ${MINGW_FLAGS}
### sundry other targets ###
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment