WSJT-X/Makefile.in

118 lines
3.0 KiB
Makefile
Raw Normal View History

CC ?= @CC@
FFLAGS = @FFLAGS@
LDFLAGS = @LDFLAGS@
CPPFLAGS = @CPPFLAGS@
CFLAGS = @CFLAGS@
#
# WSJT specific Fortran flags
FFLAGS += -cpp -Wall -fbounds-check -fno-second-underscore
OS=@OS@
G95=@G95@
COMPILER=@G95_LIB_PATH@
FC=@G95@
LDFLAGS += -L${COMPILER}
LDFLAGS += -lg2c
RM ?= @RM@
PYTHON ?= @PYTHON@
F2PY = @F2PY@
OBJS1 = JT65code.o nchar.o grid2deg.o packmsg.o packtext.o \
packcall.o packgrid.o unpackmsg.o unpacktext.o unpackcall.o \
unpackgrid.o deg2grid.o packdxcc.o chkmsg.o getpfx1.o \
getpfx2.o k2grid.o grid2k.o interleave63.o graycode.o set.o \
igray.o init_rs_int.o encode_rs_int.o decode_rs_int.o \
wrapkarn.o
OBJS2C = init_rs.o encode_rs.o decode_rs.o
F2PYONLY = ftn_init ftn_quit audio_init spec getfile azdist0 astro0
SRCS2F90 = a2d.f90 abc441.f90 astro0.f90 audio_init.f90 azdist0.f90 \
blanker.f90 decode1.f90 decode2.f90 decode3.f90 ftn_init.f90 \
ftn_quit.f90 get_fname.f90 getfile.f90 horizspec.f90 hscroll.f90 \
i1tor4.f90 pix2d.f90 pix2d65.f90 rfile.f90 savedata.f90 spec.f90 \
wsjtgen.f90 runqqq.f90 fivehz.f90
OBJS2F290 = ${SRCS2F90:.f90=.o}
SRCS2F77 = wsjt1.f fsubs1.f fsubs.f astro.f astropak.f
OBJS2F77 = ${SRCS2F77:.f=.o}
#
# ok, so far for now
# Windows @AUDIO@ will be jtaudio.c since it uses portaudio
# for *nix @AUDIO@ will also be jtaudio.c and start_threads.c
# for portaudio
# for *nix @AUDIO@ will be start_threads.c for alsa
# for *nix @AUDIO@ will be ?? for oss
#
# ptt_unix.c vs. ptt.c I'll sort out later.
# ditto for cutil.c (only used on *nix)
# --db
# jtaudio.c/start_threads.c mess will have to be sorted out later
# to minimise #ifdef's
# --db
#
SRCS2C = ptt_unix.c igray.c wrapkarn.c cutil.c
SRCS2C += @AUDIO@
all: wsjt6
JT65code: $(OBJS1)
$(FC) -o JT65code $(OBJS1)
wsjt6: Audio.so #wsjt.spec
# ${PYTHON} c:\python23\installer\Build.py wsjt.spec
# ${RM} wsjt6
#
#
Audio.so: $(OBJS2C) $(OBJS2F90) $(OBJS2F77)
${F2PY} -c --verbose --opt="-O -cpp -D${CFLAGS} \
-fno-second-underscore" $(OBJS2C) -m Audio \
--f77exec=${G95} --f90exec=${G95} ${CPPFLAGS} ${LDFLAGS} \
only: $(F2PYONLY) \
: $(SRCS2F90) \
$(SRCS2F77) \
${SRCS2C}
wsjt.spec: wsjt.py astro.py g.py options.py palettes.py smeter.py specjt.py
# ${PYTHON} c:\python23\installer\makespec.py --icon wsjt.ico \
# --tk --onefile wsjt.py
#
# compiles which are "non standard"
# and should not be compiled by the default .c to .o rule
#
init_rs_int.o: init_rs.c
$(CC) -c -DBIGSYM=1 -o init_rs_int.o init_rs.c
encode_rs_int.o: encode_rs.c
$(CC) -c -DBIGSYM=1 -o encode_rs_int.o encode_rs.c
decode_rs_int.o: decode_rs.c
$(CC) -c -DBIGSYM=1 -o decode_rs_int.o decode_rs.c
init_rs.o: init_rs.c
$(CC) -c -DBIGSYM=1 init_rs.c
encode_rs.o: encode_rs.c
$(CC) -c -DBIGSYM=1 encode_rs.c
decode_rs.o: decode_rs.c
$(CC) -c -DBIGSYM=1 decode_rs.c
# The default rules
.c.o:
${CC} ${CPPFLAGS} ${CFLAGS} -c -o ${<:.c=.o} $<
.f.o:
${G95} ${CPPFLAGS} ${FFLAGS} -c -o ${<:.f=.o} $<
.f90.o:
${G95} ${CPPFLAGS} ${FFLAGS} -c -o ${<:.f90=.o} $<
.PHONY : clean
clean:
${RM} -f *.o *.so *~ JT65code wsjt6