2012-10-29 21:07:53 +00:00
|
|
|
ACLOCAL_AMFLAGS = -I m4 # use custom macro's in ./m4
|
|
|
|
lib_LTLIBRARIES =
|
|
|
|
bin_PROGRAMS =
|
|
|
|
include_HEADERS =
|
|
|
|
|
2014-01-26 21:12:22 +00:00
|
|
|
# To Profile w/ gprof:
|
|
|
|
# 1) Modify configure: ./configure --disable-shared CFLAGS="-pg"
|
|
|
|
# 2) Run the program. ./foo
|
|
|
|
# 3) Run gprof /libtool --mode=execute gprof ./foo
|
2012-10-29 21:07:53 +00:00
|
|
|
|
|
|
|
# C compiler flags
|
|
|
|
# _GNU_SOURCE - turns on GNU specific extensions and gives correct prototype for double log2(double)
|
|
|
|
# -Wall turn on all warnings
|
|
|
|
# -Wno-multichar - turns off multi-character constant warnings from cmAudioFile.c
|
|
|
|
|
|
|
|
|
2020-04-19 17:53:07 +00:00
|
|
|
WS_DIR = $(HOME)/sdk/libwebsockets/build/out
|
2012-10-29 21:07:53 +00:00
|
|
|
|
2020-03-24 01:27:10 +00:00
|
|
|
|
2020-10-31 18:13:15 +00:00
|
|
|
AM_CPPFLAGS = -I.. -I$(srcdir)/src/libcw
|
2012-10-29 21:07:53 +00:00
|
|
|
AM_CFLAGS = -Wno-multichar
|
2020-10-04 17:03:26 +00:00
|
|
|
AM_CXXFLAGS = -Wno-multichar
|
2012-10-29 21:07:53 +00:00
|
|
|
AM_LDFLAGS =
|
|
|
|
|
|
|
|
# debug/release switches
|
|
|
|
if DEBUG
|
2020-10-31 18:13:15 +00:00
|
|
|
AM_CFLAGS += -g
|
|
|
|
AM_CXXFLAGS += -g -Wall -fsanitize=undefined
|
2012-10-29 21:07:53 +00:00
|
|
|
else
|
|
|
|
AM_CFLAGS += -O3
|
|
|
|
AM_CXXFLAGS += -O3
|
|
|
|
endif
|
|
|
|
|
|
|
|
# Linux specific
|
|
|
|
if OS_LINUX
|
|
|
|
|
|
|
|
if OS_64
|
2020-04-19 17:53:07 +00:00
|
|
|
AM_LDFLAGS += -L/usr/lib64
|
2012-10-29 21:07:53 +00:00
|
|
|
AM_CFLAGS += -m64
|
2020-04-19 17:53:07 +00:00
|
|
|
endif
|
|
|
|
|
2020-09-22 17:31:29 +00:00
|
|
|
if cwALSA
|
2022-05-14 16:33:08 +00:00
|
|
|
AM_LDFLAGS += -lasound # -Wl,-Bstatic -lasound -Wl,-Bdynamic
|
2020-09-22 17:31:29 +00:00
|
|
|
endif
|
2020-04-19 17:53:07 +00:00
|
|
|
|
2012-10-29 21:07:53 +00:00
|
|
|
endif
|
|
|
|
|
2020-10-04 18:47:51 +00:00
|
|
|
if cwWEB
|
2020-10-11 19:35:12 +00:00
|
|
|
|
|
|
|
AM_CXXFLAGS += --std=c++11
|
|
|
|
|
2020-10-04 18:47:51 +00:00
|
|
|
FFT_DIR = $(HOME)/src/fftw-3.3.8/build
|
|
|
|
FFT_DIR_D = $(FFT_DIR)/d
|
|
|
|
FFT_DIR_S = $(FFT_DIR)/s
|
|
|
|
|
2020-10-11 19:35:12 +00:00
|
|
|
|
2020-10-04 18:47:51 +00:00
|
|
|
AM_CPPFLAGS += -I$(FFT_DIR)/include -I$(FFT_DIR_D)/include -I$(FFT_DIR_S)/include
|
|
|
|
AM_LDFLAGS += -L$(FFT_DIR)/lib -L$(FFT_DIR_D)/lib -L$(FFT_DIR_S)/lib
|
|
|
|
else
|
|
|
|
AM_CXXFLAGS += --std=c++17
|
|
|
|
endif
|
|
|
|
|
2020-03-24 01:27:10 +00:00
|
|
|
include src/libcw/Makefile.am
|
2012-10-29 21:07:53 +00:00
|
|
|
|
2020-10-31 18:13:15 +00:00
|
|
|
#libcw_la_SOURCES = $(libcwSRC) $(libcwHDR)
|
|
|
|
#lib_LTLIBRARIES += libcw.la
|
|
|
|
#include_HEADERS += $(libcwHDR)
|
2012-10-29 21:07:53 +00:00
|
|
|
|
2020-10-31 18:13:15 +00:00
|
|
|
src_cwtest_cwtest_SOURCES = $(libcwHDR) $(libcwSRC) src/cwtest/main.cpp
|
2012-10-29 21:07:53 +00:00
|
|
|
|
2020-09-24 15:42:52 +00:00
|
|
|
# 1) autoconfig manual recommends setting direct referenes to non-3rd party libraries rather than using -L and -l
|
|
|
|
# 2) -ldl is required for dlopen(),dlclose() ...
|
2020-10-31 18:13:15 +00:00
|
|
|
# src_cwtest_cwtest_LDADD = libcw.la -lpthread -ldl
|
|
|
|
|
|
|
|
src_cwtest_cwtest_LDADD = -lpthread -ldl
|
2020-10-11 19:35:12 +00:00
|
|
|
|
|
|
|
if cwFFTW
|
|
|
|
src_cwtest_cwtest_LDADD += -lfftw3 -lfftw3f
|
|
|
|
endif
|
|
|
|
|
|
|
|
if cwWEB
|
|
|
|
src_cwtest_cwtest_LDADD += -lfftw3 -lfftw3f
|
|
|
|
endif
|
2020-09-22 15:31:33 +00:00
|
|
|
|
|
|
|
if cwWEBSOCK
|
2021-01-22 14:20:43 +00:00
|
|
|
# AM_CPPFLAGS += -I$(WS_DIR)/include
|
|
|
|
# AM_LDFLAGS += -L$(WS_DIR)/lib
|
2020-09-22 15:31:33 +00:00
|
|
|
src_cwtest_cwtest_LDADD += -lwebsockets
|
|
|
|
endif
|
2012-10-29 21:07:53 +00:00
|
|
|
|
2020-09-22 17:31:29 +00:00
|
|
|
|
2020-03-24 01:27:10 +00:00
|
|
|
# src_cwtest_cwtest_CPPFLAGS = -I$(srcdir)/src/libcw $(AM_CPPFLAGS)
|
|
|
|
bin_PROGRAMS += src/cwtest/cwtest
|
2022-08-13 13:36:04 +00:00
|
|
|
|
|
|
|
# ${exec_prefix} is the install prefix given to 'configure' by the user.
|
|
|
|
# ${srcdir} is the directory of this Makefile and is set by autoconf.
|
|
|
|
|
|
|
|
# distclean-local sets the source tree back to it's minimal, pre-configure, state.
|
|
|
|
distclean-local:
|
|
|
|
rm -rf ${exec_prefix}/src
|
|
|
|
rm -rf ${srcdir}/autom4te.cache
|
|
|
|
rm -rf ${srcdir}/build-aux
|
|
|
|
rm -f ${srcdir}/m4/libtool.m4 ${srcdir}/m4/lt~obsolete.m4 ${srcdir}/m4/ltsugar.m4
|
|
|
|
rm -f ${srcdir}/m4/ltversion.m4 ${srcdir}/m4/ltoptions.m4
|
|
|
|
rm -f ${srcdir}/aclocal.m4 ${srcdir}/config.h.in ${srcdir}/config.h.in~
|
|
|
|
rm -f ${srcdir}/Makefile.in ${srcdir}/configure
|