Made Makefile.MinGW more generic.

For example the location of the Qt installation can be specified by
overriding the Makefile variable QT_DIR like:

mingw32-make -f Makefile.MinGW QT_DIR=C:\Qt\5.2.1\mingw48_32

the default uses the g95 Fortram compiler, if you have gfortran
installed and on the PATH then you can override the FC variable like:

mingw32-make -f Makefile.MinGW FC=gfortran



git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3780 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Bill Somerville 2014-02-19 23:30:25 +00:00
parent c2a43a78f6
commit aa7e790e69

View File

@ -3,19 +3,25 @@
# C> make > junk1 2>&1 # C> make > junk1 2>&1
# Set paths # Set paths
EXE_DIR = ../../wsjtx_install EXE_DIR = ..\..\wsjtx_install
#INCPATH = -I'c:/QtSDK/Desktop/Qt/4.7.4/mingw/include/QtCore' \ QT_DIR = c:/QtSDK/Desktop/Qt/4.7.4/mingw
# -I'c:/QtSDK/Desktop/Qt/4.7.4/mingw/include' \
# -I'c:/QtSDK/Desktop/Qt/4.7.4/mingw/include/ActiveQt' \
# -I'release' -I'.' -I'c:/QtSDK/Desktop/Qt/4.7.4/mingw/mkspecs/win32-g++'
INCPATH = -I'C:/Qt/Qt5.1.0/5.1.0/mingw48_32/include/QtCore' \ #INCPATH = -I'${QT_DIR}/include/QtCore' \
-I'C:/Qt/Qt5.1.0/5.1.0/mingw48_32/include' \ # -I'${QT_DIR}/include' \
# -I'${QT_DIR}/include/ActiveQt' \
# -I'release' -I'.' -I'${QT_DIR}/mkspecs/win32-g++'
INCPATH = -I'${QT_DIR}/include/QtCore' \
-I'${QT_DIR}/include' \
# Compilers # Compilers
CC = gcc CC = gcc
CXX = g++ CXX = g++
FC = g95 FC = g95
AR = ar
RANLIB = ranlib
CP = cp
MKDIR = mkdir -p
FFLAGS = -O2 -fbounds-check -Wall -Wno-precision-loss -fno-second-underscore FFLAGS = -O2 -fbounds-check -Wall -Wno-precision-loss -fno-second-underscore
CFLAGS = -I. -fbounds-check -mno-stack-arg-probe CFLAGS = -I. -fbounds-check -mno-stack-arg-probe
@ -54,16 +60,16 @@ OBJS1 = pctile.o graycode.o sort.o ssort.o chkmsg.o \
flat3.o polfit.o determ.o baddata.o flat3.o polfit.o determ.o baddata.o
libjt9.a: $(OBJS1) libjt9.a: $(OBJS1)
ar cr libjt9.a $(OBJS1) ${AR} cr libjt9.a $(OBJS1)
ranlib libjt9.a ${RANLIB} libjt9.a
OBJS2 = jt9.o jt9a.o jt9b.o jt9c.o ipcomm.o sec_midn.o usleep.o OBJS2 = jt9.o jt9a.o jt9b.o jt9c.o ipcomm.o sec_midn.o usleep.o
LIBS2 = -L'C:/Qt/Qt5.1.0/5.1.0/mingw48_32/lib' -lQt5Core LIBS2 = -L'${QT_DIR}/lib' -lQt5Core
jt9.exe: $(OBJS2) libjt9.a jt9.exe: $(OBJS2) libjt9.a
$(CXX) -o jt9.exe -static $(OBJS2) $(LIBS2) libjt9.a \ $(CXX) -o jt9.exe -static $(OBJS2) $(LIBS2) libjt9.a \
../libfftw3f_win.a c:/MinGW/lib/libf95.a ../libfftw3f_win.a -lgfortran
mkdir -p $(EXE_DIR) -$(MKDIR) $(EXE_DIR)
cp jt9.exe $(EXE_DIR) ${CP} jt9.exe $(EXE_DIR)
OBJS3 = jt9sim.o OBJS3 = jt9sim.o
jt9sim.exe: $(OBJS3) libjt9.a jt9sim.exe: $(OBJS3) libjt9.a
@ -72,7 +78,7 @@ jt9sim.exe: $(OBJS3) libjt9.a
OBJS4 = jt9code.o OBJS4 = jt9code.o
jt9code.exe: $(OBJS4) libjt9.a jt9code.exe: $(OBJS4) libjt9.a
$(FC) -o jt9code.exe $(OBJS4) libjt9.a $(FC) -o jt9code.exe $(OBJS4) libjt9.a
cp jt9code.exe $(EXE_DIR) $(CP) jt9code.exe $(EXE_DIR)
OBJS5 = jt65.o OBJS5 = jt65.o
jt65.exe: $(OBJS5) libjt9.a jt65.exe: $(OBJS5) libjt9.a
@ -81,7 +87,7 @@ jt65.exe: $(OBJS5) libjt9.a
OBJS6 = jt65code.o OBJS6 = jt65code.o
jt65code.exe: $(OBJS6) libjt9.a jt65code.exe: $(OBJS6) libjt9.a
$(FC) -o jt65code.exe $(OBJS6) libjt9.a $(FC) -o jt65code.exe $(OBJS6) libjt9.a
cp jt65code.exe $(EXE_DIR) $(CP) jt65code.exe $(EXE_DIR)
sync9.o: sync9.f90 jt9sync.f90 sync9.o: sync9.f90 jt9sync.f90
$(FC) $(FFLAGS) -c sync9.f90 $(FC) $(FFLAGS) -c sync9.f90