mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-12-25 04:12:19 -05:00
121 lines
4.7 KiB
Makefile
121 lines
4.7 KiB
Makefile
|
CC ?= gcc
|
||
|
FFLAGS = -g -O2 -fPIC
|
||
|
LDFLAGS = -L/usr/local/lib -lpthread -lasound
|
||
|
CPPFLAGS = -I/usr/local/include -I/usr/include/alsa -I.
|
||
|
CFLAGS = -Wall -O0 -g -Wall -O0 -g -fPIC
|
||
|
# WSJT specific C flags
|
||
|
CFLAGS += -DBIGSYM=1
|
||
|
DEFS = -DPACKAGE_NAME=\"wsjt\" -DPACKAGE_TARNAME=\"wsjt\" -DPACKAGE_VERSION=\"5.9.2\" -DPACKAGE_STRING=\"wsjt\ 5.9.2\" -DPACKAGE_BUGREPORT=\"\" -DG95_LIB_PATH=\"/usr/lib/gcc/x86_64-linux-gnu/4.0.3/\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_SYS_RESOURCE_H=1 -DHAVE_SYS_PARAM_H=1 -DHAVE_ERRNO_H=1 -DHAVE_SYS_SYSLOG_H=1 -DHAVE_STDDEF_H=1 -DHAVE_LIBGEN_H=1 -DHAVE_SYS_WAIT_H=1 -DHAVE_WAIT_H=1 -DHAVE_STDIO_H=1 -DHAVE_TERMIOS_H=1 -DHAVE_SYS_RESOURCE_H=1 -DHAVE_LINUX_PPDEV_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_FCNTL_H=1 -DHAVE_SYS_IOCTL_H=1 -DTIME_WITH_SYS_TIME=1 -DSTRING_WITH_STRINGS=1 -DSIZEOF_INT64_T=8 -DSIZEOF_LONG_LONG=8 -DNDEBUG=1 -DPREFIX=\"/usr/local/\" -DUSE_SERIAL=1 -DUSE_ALSA=1 -DHAS_ASOUNDLIB_H=1 -DHAS_SOUNDCARD_H=1
|
||
|
CFLAGS += ${DEFS}
|
||
|
CPPFLAGS += ${DEFS}
|
||
|
|
||
|
# WSJT specific Fortran flags
|
||
|
FFLAGS += -Wall -fbounds-check -fno-second-underscore -ffixed-line-length-none
|
||
|
#FFLAGS += -Wall -fbounds-check -fno-second-underscore
|
||
|
#FFLAGS += -cpp -fno-second-underscore
|
||
|
# 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} $<
|
||
|
|
||
|
OS=Linux
|
||
|
G95=/usr/bin/g95
|
||
|
COMPILER=/usr/lib/gcc/x86_64-linux-gnu/4.0.3/
|
||
|
FC=/usr/bin/g95
|
||
|
|
||
|
LDFLAGS += -L${COMPILER}
|
||
|
LDFLAGS += -lg2c
|
||
|
|
||
|
PYTHON ?= /usr/bin/python
|
||
|
RM ?= /bin/rm
|
||
|
F2PY = /usr/bin/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
|
||
|
|
||
|
F2PYONLY = ftn_init ftn_quit audio_init spec getfile azdist0 astro0
|
||
|
|
||
|
SRCS2F90 = 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
|
||
|
OBJS2F90 = ${SRCS2F90:.f90=.o}
|
||
|
|
||
|
SRCS2F77 = wsjt1.f astro.f azdist.f coord.f dcoord.f deg2grid.f \
|
||
|
dot.f ftsky.f geocentric.f GeoDist.f grid2deg.f moon2.f \
|
||
|
MoonDop.f sun.f toxyz.f pfxdump.f \
|
||
|
avesp2.f bzap.f spec441.f spec2d.f mtdecode.f stdecode.f \
|
||
|
indexx.f s2shape.f flat2.f gen65.f chkmsg.f gen6m.f gentone.f \
|
||
|
syncf0.f syncf1.f synct.f decode6m.f avemsg6m.f \
|
||
|
set.f flatten.f db.f pctile.f sort.f ssort.f ps.f smooth.f \
|
||
|
ping.f longx.f peakup.f sync.f detect.f avemsg65.f decode65.f \
|
||
|
demod64a.f encode65.f extract.f flat1.f four2.f rfile2.f \
|
||
|
gencw.f getpfx1.f getpfx2.f getsnr.f graycode.f grid2k.f \
|
||
|
interleave63.f k2grid.f limit.f lpf1.f deep65.f morse.f \
|
||
|
nchar.f packcall.f packgrid.f packmsg.f packtext.f setup65.f \
|
||
|
short65.f slope.f spec2d65.f sync65.f unpackcall.f \
|
||
|
unpackgrid.f unpackmsg.f unpacktext.f xcor.f xfft.f xfft2.f wsjt65.f
|
||
|
OBJS2F77 = ${SRCS2F77:.f=.o}
|
||
|
|
||
|
SRCS2C = init_rs.c encode_rs.c decode_rs.c
|
||
|
OBJS2C = ${SRCS2C:.c=.o}
|
||
|
|
||
|
# ok, so far for now
|
||
|
# Windows start_alsa.c will be a2d.f90 jtaudio.c since it uses portaudio
|
||
|
# for *nix start_alsa.c will also be a2d.f90, jtaudio.c
|
||
|
# and start_portaudio.c for systems using portaudio
|
||
|
# for *nix start_alsa.c will be start_alsa.c for alsa
|
||
|
# for *nix start_alsa.c will be start_oss.c 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
|
||
|
# and mostly sorted
|
||
|
# --db
|
||
|
#
|
||
|
SRCS3C = ptt_unix.c igray.c wrapkarn.c cutil.c
|
||
|
OBJS3C = ${SRCS3C:.c=.o}
|
||
|
AUDIOSRCS = start_alsa.c
|
||
|
|
||
|
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) $(OBJS3C) $(OBJS2F77) $(SRCS2F90) $(AUDIOSRCS)
|
||
|
${F2PY} -c --opt="-O ${CFLAGS} -fPIC \
|
||
|
-fno-second-underscore" $(OBJS2C) $(OBJS2F77) -m Audio \
|
||
|
--f77exec=${G95} --f90exec=${G95} ${CPPFLAGS} ${LDFLAGS} \
|
||
|
only: $(F2PYONLY) \
|
||
|
: $(SRCS2F90) \
|
||
|
${SRCS3C} ${AUDIOSRCS}
|
||
|
|
||
|
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
|
||
|
|
||
|
|
||
|
.PHONY : clean
|
||
|
clean:
|
||
|
${RM} -f *.o *.so *~ JT65code wsjt6
|
||
|
|