2012-05-22 13:09:48 -04:00
|
|
|
# Makefile for MinGW on Windows
|
2014-10-21 09:47:19 -04:00
|
|
|
#
|
|
|
|
# Needed libraries are located using the following variables:
|
|
|
|
#
|
|
|
|
# QT_DIR - point this at the root of your Qt installation
|
|
|
|
# FFTW3_DIR - point this at the fftw v3 installation directory
|
|
|
|
#
|
|
|
|
# e.g.
|
|
|
|
# make -f Makefile.MinGW \
|
|
|
|
# QT_DIR=c:/Qt/5.2.1/mingw48_32 \
|
|
|
|
# FFTW3_DIR = c:/fftw-3.3.3-dll32-2
|
|
|
|
#
|
2012-10-03 10:50:57 -04:00
|
|
|
# Windows re-direct:
|
|
|
|
# C> make > junk1 2>&1
|
|
|
|
|
2013-07-25 14:12:03 -04:00
|
|
|
# Set paths
|
2014-04-02 13:37:18 -04:00
|
|
|
EXE_DIR = ..\\..\\wsjtx_install
|
|
|
|
QT_DIR = C:/wsjt-env/Qt5/5.2.1/mingw48_32
|
2014-10-21 09:47:19 -04:00
|
|
|
FFTW3_DIR = ..
|
2013-08-02 15:52:25 -04:00
|
|
|
|
2014-04-02 13:37:18 -04:00
|
|
|
INCPATH = -I${QT_DIR}/include/QtCore -I${QT_DIR}/include
|
2013-07-25 14:12:03 -04:00
|
|
|
|
|
|
|
# Compilers
|
2012-05-22 13:09:48 -04:00
|
|
|
CC = gcc
|
2013-07-25 14:12:03 -04:00
|
|
|
CXX = g++
|
2014-04-02 13:37:18 -04:00
|
|
|
FC = gfortran
|
|
|
|
AR = ar cr
|
|
|
|
RANLIB = ranlib
|
|
|
|
MKDIR = mkdir -p
|
|
|
|
CP = cp
|
|
|
|
RM = rm -f
|
2012-05-22 13:09:48 -04:00
|
|
|
|
2012-11-21 12:48:17 -05:00
|
|
|
FFLAGS = -O2 -fbounds-check -Wall -Wno-precision-loss -fno-second-underscore
|
2012-09-27 15:10:15 -04:00
|
|
|
CFLAGS = -I. -fbounds-check -mno-stack-arg-probe
|
2012-05-22 13:09:48 -04:00
|
|
|
|
|
|
|
# Default rules
|
|
|
|
%.o: %.c
|
|
|
|
${CC} ${CFLAGS} -c $<
|
|
|
|
%.o: %.f
|
|
|
|
${FC} ${FFLAGS} -c $<
|
|
|
|
%.o: %.F
|
|
|
|
${FC} ${FFLAGS} -c $<
|
|
|
|
%.o: %.f90
|
|
|
|
${FC} ${FFLAGS} -c $<
|
|
|
|
%.o: %.F90
|
|
|
|
${FC} ${FFLAGS} -c $<
|
|
|
|
|
2014-03-05 13:20:40 -05:00
|
|
|
all: libjt9.a libastro.a jt9.exe jt9code.exe jt65code.exe
|
2012-10-03 10:50:57 -04:00
|
|
|
|
2014-03-30 23:11:16 -04:00
|
|
|
OBJS1 = prog_args.o options.o pctile.o graycode.o sort.o ssort.o chkmsg.o \
|
2012-10-17 15:58:35 -04:00
|
|
|
unpackmsg.o igray.o unpackcall.o unpackgrid.o \
|
2014-10-21 09:47:19 -04:00
|
|
|
fmtmsg.o grid2k.o unpacktext.o getpfx2.o packmsg.o deg2grid.o \
|
2012-10-03 10:50:57 -04:00
|
|
|
packtext.o getpfx1.o packcall.o k2grid.o packgrid.o \
|
|
|
|
nchar.o four2a.o grid2deg.o pfxdump.o f77_wisdom.o \
|
2014-03-05 13:20:40 -05:00
|
|
|
symspec.o analytic.o db.o genjt9.o flat1.o smo.o \
|
2012-10-03 10:50:57 -04:00
|
|
|
packbits.o unpackbits.o encode232.o interleave9.o \
|
2013-04-22 11:08:20 -04:00
|
|
|
entail.o fano232.o gran.o sync9.o decode9.o \
|
2013-07-08 09:17:22 -04:00
|
|
|
fil3.o decoder.o grid2n.o n2grid.o timer.o \
|
2013-04-26 12:45:11 -04:00
|
|
|
softsym.o getlags.o afc9.o fchisq.o twkfreq.o downsam9.o \
|
2013-04-22 11:08:20 -04:00
|
|
|
peakdt9.o symspec2.o stdmsg.o morse.o azdist.o geodist.o \
|
2013-07-08 09:17:22 -04:00
|
|
|
fillcom.o chkss2.o zplot9.o flat2.o \
|
|
|
|
jt65a.o symspec65.o flat65.o ccf65.o decode65a.o \
|
|
|
|
filbig.o fil6521.o afc65b.o decode65b.o setup65.o \
|
|
|
|
extract.o fchisq65.o demod64a.o chkhist.o interleave63.o ccf2.o \
|
|
|
|
move.o indexx.o graycode65.o twkfreq65.o smo121.o \
|
2014-01-08 19:03:22 -05:00
|
|
|
wrapkarn.o init_rs.o encode_rs.o decode_rs.o gen65.o fil4.o \
|
2014-01-27 16:28:54 -05:00
|
|
|
flat3.o polfit.o determ.o baddata.o
|
2012-10-03 10:50:57 -04:00
|
|
|
|
|
|
|
libjt9.a: $(OBJS1)
|
2014-04-02 13:37:18 -04:00
|
|
|
$(AR) libjt9.a $(OBJS1)
|
|
|
|
$(RANLIB) libjt9.a
|
2012-10-03 10:50:57 -04:00
|
|
|
|
2013-08-02 15:52:25 -04:00
|
|
|
OBJS2 = jt9.o jt9a.o jt9b.o jt9c.o ipcomm.o sec_midn.o usleep.o
|
2014-04-02 13:37:18 -04:00
|
|
|
LIBS2 = -L${QT_DIR}/lib -lQt5Core
|
2012-10-03 10:50:57 -04:00
|
|
|
jt9.exe: $(OBJS2) libjt9.a
|
2014-10-21 09:47:19 -04:00
|
|
|
$(CXX) -o jt9.exe $(OBJS2) $(LIBS2) libjt9.a \
|
|
|
|
-L$(FFTW3_DIR) -lfftw3f-3 $(shell $(FC) -print-file-name=lib$(FC).a)
|
2014-04-02 13:37:18 -04:00
|
|
|
-$(MKDIR) $(EXE_DIR)
|
|
|
|
$(CP) jt9.exe $(EXE_DIR)
|
2012-10-03 10:50:57 -04:00
|
|
|
|
|
|
|
OBJS3 = jt9sim.o
|
|
|
|
jt9sim.exe: $(OBJS3) libjt9.a
|
|
|
|
$(FC) -o jt9sim.exe $(OBJS3) libjt9.a
|
|
|
|
|
2012-11-14 10:31:21 -05:00
|
|
|
OBJS4 = jt9code.o
|
|
|
|
jt9code.exe: $(OBJS4) libjt9.a
|
|
|
|
$(FC) -o jt9code.exe $(OBJS4) libjt9.a
|
2014-04-02 13:37:18 -04:00
|
|
|
$(CP) jt9code.exe $(EXE_DIR)
|
2012-05-22 13:09:48 -04:00
|
|
|
|
2013-07-08 09:17:22 -04:00
|
|
|
OBJS5 = jt65.o
|
|
|
|
jt65.exe: $(OBJS5) libjt9.a
|
2014-10-21 09:47:19 -04:00
|
|
|
$(FC) -o jt65.exe $(OBJS5) libjt9.a -L$(FFTW3_DIR) -lfftw3f-3
|
2012-11-21 12:48:17 -05:00
|
|
|
|
2014-03-05 13:20:40 -05:00
|
|
|
OBJS7 = astrosub.o astro0.o astro.o tm2.o grid2deg.o sun.o moondop.o \
|
|
|
|
coord.o dot.o moon2.o tmoonsub.o toxyz.o geocentric.o \
|
|
|
|
dcoord.o
|
|
|
|
|
|
|
|
libastro.a: $(OBJS7)
|
2014-04-02 13:37:18 -04:00
|
|
|
$(AR) libastro.a $(OBJS7)
|
|
|
|
$(RANLIB) libastro.a
|
2014-03-05 13:20:40 -05:00
|
|
|
|
2014-01-30 13:08:40 -05:00
|
|
|
OBJS6 = jt65code.o
|
|
|
|
jt65code.exe: $(OBJS6) libjt9.a
|
|
|
|
$(FC) -o jt65code.exe $(OBJS6) libjt9.a
|
2014-04-02 13:37:18 -04:00
|
|
|
$(CP) jt65code.exe $(EXE_DIR)
|
2014-01-30 13:08:40 -05:00
|
|
|
|
2012-10-25 09:02:38 -04:00
|
|
|
sync9.o: sync9.f90 jt9sync.f90
|
|
|
|
$(FC) $(FFLAGS) -c sync9.f90
|
|
|
|
|
|
|
|
spec9.o: spec9.f90 jt9sync.f90
|
|
|
|
$(FC) $(FFLAGS) -c spec9.f90
|
|
|
|
|
|
|
|
peakdt9.o: peakdt9.f90 jt9sync.f90
|
|
|
|
$(FC) $(FFLAGS) -c peakdt9.f90
|
|
|
|
|
|
|
|
jt9sim.o: jt9sim.f90 jt9sync.f90
|
|
|
|
$(FC) $(FFLAGS) -c jt9sim.f90
|
|
|
|
|
|
|
|
genjt9.o: genjt9.f90 jt9sync.f90
|
|
|
|
$(FC) $(FFLAGS) -c genjt9.f90
|
|
|
|
|
|
|
|
redsync.o: redsync.f90 jt9sync.f90
|
|
|
|
$(FC) $(FFLAGS) -c redsync.f90
|
|
|
|
|
2013-05-02 12:19:26 -04:00
|
|
|
unpackmsg.o: unpackmsg.f90
|
|
|
|
$(FC) -c -O0 -fbounds-check -Wall -Wno-precision-loss unpackmsg.f90
|
|
|
|
|
2012-05-22 13:09:48 -04:00
|
|
|
ipcomm.o: ipcomm.cpp
|
2013-07-25 14:12:03 -04:00
|
|
|
$(CXX) -c $(INCPATH) ipcomm.cpp
|
2012-05-22 13:09:48 -04:00
|
|
|
|
|
|
|
sec_midn.o: sec_midn.f90
|
|
|
|
$(FC) -c -fno-second-underscore sec_midn.f90
|
|
|
|
|
2013-05-22 21:05:37 -04:00
|
|
|
#rig_control.o: rig_control.c
|
|
|
|
# $(CC) -c -Wall -I..\..\..\hamlib-1.2.15.3\include rig_control.c
|
2013-04-22 11:08:20 -04:00
|
|
|
|
|
|
|
tstrig.o: tstrig.c
|
|
|
|
$(CC) -c -Wall -I..\..\..\hamlib-1.2.15.3\include tstrig.c
|
|
|
|
|
2013-07-08 09:17:22 -04:00
|
|
|
init_rs.o: init_rs.c
|
|
|
|
$(CC) -c -DBIGSYM=1 -o init_rs.o init_rs.c
|
|
|
|
|
|
|
|
encode_rs.o: encode_rs.c
|
|
|
|
$(CC) -c -DBIGSYM=1 -o encode_rs.o encode_rs.c
|
|
|
|
|
|
|
|
decode_rs.o: decode_rs.c
|
|
|
|
$(CC) -c -DBIGSYM=1 -o decode_rs.o decode_rs.c
|
|
|
|
|
|
|
|
|
2012-05-22 13:09:48 -04:00
|
|
|
.PHONY : clean
|
|
|
|
|
|
|
|
clean:
|
2014-04-02 13:37:18 -04:00
|
|
|
$(RM) *.o libjt9.a wsjtx.exe jt9sim.exe jt9.exe jt65.exe
|