mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-03 16:01:18 -05:00
d672e70a8a
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/map65@1315 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
113 lines
4.3 KiB
Makefile
113 lines
4.3 KiB
Makefile
MV ?= mv
|
|
CC ?= gcc
|
|
MKDIR ?= mkdir
|
|
INSTALL= install
|
|
FFLAGS = -O2 -C -threads -reentrancy threaded -traceback -static
|
|
LDFLAGS = -L/usr/lib -L/usr/local/lib
|
|
LIBS = -lpthread -lportaudio -lsamplerate -lfftw3f
|
|
CPPFLAGS = -I/usr/include -I/usr/local/include
|
|
CFLAGS = -Wall -O0 -g
|
|
PREFIX = /usr/local/
|
|
# Map65 specific C flags
|
|
CFLAGS += -DBIGSYM=1 -fPIC
|
|
DEFS = -DPACKAGE_NAME=\"map65\" -DPACKAGE_TARNAME=\"map65\" -DPACKAGE_VERSION=\"0.9\" -DPACKAGE_STRING=\"map65\ 0.9\" -DPACKAGE_BUGREPORT=\"\" -DFC_LIB_PATH=\"/opt/g95-install/bin/../lib/gcc-lib/i686-pc-linux-gnu/4.1.3//\" -DFC=\"g95\" -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 -DNDEBUG=1 -DHAS_SAMPLERATE_H=1 -DHAS_PORTAUDIO=1 -DHAS_PORTAUDIO_H=1 -DHAS_PORTAUDIO_LIB=1 -DHAS_FFTW3_H=1 -DHAS_FFTW3FLIBS=1
|
|
CFLAGS += ${DEFS}
|
|
CPPFLAGS += ${DEFS} -I.
|
|
|
|
# MAP65 specific Fortran flags
|
|
# gfortran has no -Wno-precission-loss
|
|
#FFLAGS += -Wall -fbounds-check -fno-second-underscore -fPIC#FFLAGS += -Wall -Wno-precision-loss -fbounds-check -fno-second-underscore -fPIC
|
|
#FFLAGS += -Wall -fbounds-check -fno-second-underscore -ffixed-line-length-none -fPIC
|
|
#FFLAGS += -Wall -fbounds-check -fno-second-underscore -fPIC
|
|
#FFLAGS += -cpp -fno-second-underscore
|
|
|
|
all: Audio.so plrs plrr
|
|
|
|
# The default rules
|
|
.c.o:
|
|
${CC} ${CPPFLAGS} ${CFLAGS} -c -o ${<:.c=.o} $<
|
|
|
|
.f.o:
|
|
${FC} ${CPPFLAGS} ${FFLAGS} -c -o ${<:.f=.o} $<
|
|
|
|
.F90.o:
|
|
${FC} ${CPPFLAGS} ${FFLAGS} -c -o ${<:.F90=.o} $<
|
|
|
|
OS=Linux
|
|
FC=ifort
|
|
FCV=intel
|
|
COMPILER += /opt/g95-install/bin/../lib/gcc-lib/i686-pc-linux-gnu/4.1.3//
|
|
|
|
LDFLAGS += -L${COMPILER}
|
|
|
|
PYTHON ?= /usr/bin/python
|
|
RM ?= /bin/rm
|
|
F2PY = /usr/bin/f2py
|
|
|
|
###
|
|
|
|
OBJS2C = init_rs.o encode_rs.o decode_rs.o plrr_subs.o loc.o deep65.o
|
|
|
|
F2PYONLY = ftn_init ftn_quit audio_init getfile azdist0 astro0 spec
|
|
|
|
SRCS2F90 = astro0.F90 audio_init.F90 azdist0.f90 \
|
|
decode1.F90 ftn_init.F90 ftn_quit.f90 wsjtgen.F90 \
|
|
runqqq.F90 fivehz.F90 flushqqq.F90 \
|
|
rfile.f90 rfile3a.F90 spec.f90 map65a.F90 display.F90 \
|
|
getfile.F90 getfile2.F90 recvpkt.F90 savetf2.F90 \
|
|
symspec.f90 sec_midn.F90 getdphi.f90 thnix.f90
|
|
|
|
SRCS2F77 = indexx.f gen65.f chkmsg.f \
|
|
gentone.f gencwid.f set.f db.f pctile.f sort.f ssort.f \
|
|
avemsg65.f demod64a.f encode65.f extract.f four2a.f getpfx1.f \
|
|
getpfx2.f graycode.f grid2k.f interleave63.f k2grid.f \
|
|
morse.f nchar.f packcall.f packgrid.f \
|
|
packmsg.f packtext.f setup65.f unpackcall.f unpackgrid.f \
|
|
unpackmsg.f unpacktext.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 \
|
|
ccf65.f trimlist.f chkhist.f decode1a.f \
|
|
filbig.f fil6521.f twkfreq.f decode65b.f \
|
|
afc65b.f fchisq.f ccf2.f rfile2.f
|
|
|
|
OBJS2F77 = ${SRCS2F77:.f=.o}
|
|
|
|
SRCS3C = ptt_unix.c igray.c wrapkarn.c cutil.c fthread.c
|
|
OBJS3C = ${SRCS3C:.c=.o}
|
|
|
|
AUDIOSRCS = a2d.f90 jtaudio.c start_portaudio.c
|
|
|
|
deep65.o: deep65.F
|
|
$(FC) -c -O0 -Wall -fno-second-underscore -fPIC deep65.F
|
|
|
|
Audio.so: $(OBJS2C) $(OBJS3C) $(OBJS2F77) $(SRCS2F90) $(AUDIOSRCS)
|
|
${F2PY} -c --quiet --opt="-O ${CFLAGS} \
|
|
${FFLAGS}" $(OBJS2C) $(OBJS2F77) -m Audio \
|
|
--f77exec=${FC} --f90exec=${FC} ${CPPFLAGS} ${LDFLAGS} ${LIBS} \
|
|
only: $(F2PYONLY) \
|
|
: $(SRCS2F90) \
|
|
${SRCS3C} ${AUDIOSRCS}
|
|
|
|
|
|
init_rs_int.o: init_rs.c
|
|
$(CC) $(CFLAGS) -c -DBIGSYM=1 -o init_rs_int.o init_rs.c
|
|
encode_rs_int.o: encode_rs.c
|
|
$(CC) $(CFLAGS) -c -DBIGSYM=1 -o encode_rs_int.o encode_rs.c
|
|
decode_rs_int.o: decode_rs.c
|
|
$(CC) $(CFLAGS) -c -DBIGSYM=1 -o decode_rs_int.o decode_rs.c
|
|
|
|
plrr: plrr.F90 sec_midn.F90 plrr_subs.c cutil.c
|
|
$(CC) -c plrs_subs.c cutil.c
|
|
$(FC) -o plrr -fno-second-underscore plrr.F90 sec_midn.F90 plrr_subs.o cutil.o
|
|
|
|
plrs: plrs.F90 sec_midn.F90 plrs_subs.c cutil.c
|
|
$(CC) -c plrs_subs.c cutil.c
|
|
$(FC) -o plrs -fno-second-underscore plrs.F90 sec_midn.F90 plrs_subs.o cutil.o
|
|
|
|
.PHONY : clean
|
|
clean:
|
|
${RM} -f *.o *.pyc *.so *~ map65 map65.spec
|
|
|
|
distclean: clean
|
|
${RM} -f config.log config.status Makefile
|