123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475 |
- AM_CXXFLAGS =
- AM_LDFLAGS =
- AM_CPPFLAGS =
- AM_CFLAGS =
-
- ACLOCAL_AMFLAGS = -I m4 # use custom macro's in ./m4
-
- # if we are building and linking to a nested copy of libcm
- if BUILD_LIBCM
- SUBDIRS = src/libcm
- AM_CPPFLAGS += -I$(srcdir)/src/libcm/src -I$(srcdir)/src/libcm/src/dsp -I$(srcdir)/src/libcm/src/vop -I$(srcdir)/src/libcm/src/app
- AM_LDFLAGS += -Lsrc/libcm/src
- endif
-
- # 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
-
- # 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
-
- AM_CPPFLAGS += -D _GNU_SOURCE -I.. -I$(srcdir)/src/libcmpp -I$(srcdir)/src/libcmpp/fltk -I$(srcdir)/src/tlCtl
- AM_CFLAGS += -Wno-multichar
-
- # debug/release switches
- if DEBUG
- AM_CFLAGS += -g
- AM_CXXFLAGS += -g
- else
- AM_CFLAGS += -O3
- AM_CXXFLAGS += -O3
- endif
-
- MYLIBS = -lpthread -lfftw3f -lfftw3 -lfltk -lX11 -lcm
-
- # NOTE: 10/25/12 The use of -Wl, -Bstatic -Wl, -Bdynamic forces linking
- # against the static version of 'libasound' and then turns dynamic linking
- # back on for the other libraries.
- # For some reason dynamically linking to asound causes runtime problems.
- # The most notable of which is the inability for ALSA to successfully
- # return hardware parameter values.
- # See: http://stackoverflow.com/questions/809794/use-both-static-and-dynamically-linked-libraries-in-gcc?rq=1
-
- # Linux specific
- if OS_LINUX
- MYLIBS += -lsatlas
- if OS_64
- AM_LDFLAGS += -L/usr/lib64/atlas -L/usr/lib64 -Wl,-Bstatic -lasound -Wl,-Bdynamic
- MYLIBS += -lrt -lm
- AM_CFLAGS += -m64
- endif
- endif
-
- if OS_OSX
- AM_CPPFLAGS += -I/opt/local/include # Search macports directory for fftw headers
- AM_LDFLAGS += -L/opt/local/lib # and libraries.
- AM_LDFLAGS += -framework Cocoa -framework CoreAudio -framework CoreMIDI -framework Carbon -framework Accelerate
- endif
-
- include src/libcmpp/Makefile.am
- src_libcmpp_libcmpp_la_SOURCES = $(cmppSRC) $(cmppHDR)
- include_HEADERS = $(cmppHDR)
- lib_LTLIBRARIES = src/libcmpp/libcmpp.la
-
- include src/tlCtl/Makefile.am
- src_kc_kc_SOURCES = $(tlCtlSRC)
-
- src_kc_kc_SOURCES += src/kc/kcMain.cpp
- src_kc_kc_SOURCES += src/kc/kcApp.h src/kc/kcApp.cpp
-
- src_kc_kc_LDADD = src/libcmpp/libcmpp.la $(MYLIBS)
- bin_PROGRAMS = src/kc/kc
|