kc/Makefile.am
2012-11-16 01:21:34 -08:00

80 lines
2.8 KiB
Makefile

ACLOCAL_AMFLAGS = -I m4 # use custom macro's in ./m4
lib_LTLIBRARIES=
bin_PROGRAMS=
include_HEADERS=
# 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/libcm -I$(srcdir)/src/libcm/dsp -I$(srcdir)/src/libcm/vop -I$(srcdir)/src/libcm/app
AM_CPPFLAGS += -I$(srcdir)/src/libkplfltk -I$(srcdir)/src/libgm -I$(srcdir)/src/tlCtl
AM_CFLAGS = -Wno-multichar
AM_CXXFLAGS =
AM_LDFLAGS =
MYLIBS = -lpthread -lfftw3f -lfftw3 -lfltk -lcairo -lX11
CMLIBS = src/libcm/libcm.la src/libgm/libgm.la src/libkplfltk/libkplfltk.la # autoconfig manual recommends storing direct referenes to non-3rd party libraries rather than using -L and -l
# debug/release switches
if DEBUG
AM_CFLAGS += -g
AM_CXXFLAGS += -g
else
AM_CFLAGS += -O3
AM_CXXFLAGS += -O3
endif
# 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 += -llapack -lcblas -latlas -lgfortran
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_LDFLAGS += -framework Cocoa -framework CoreAudio -framework CoreMIDI -framework Carbon -framework Accelerate -framework vecLib
endif
include src/libcm/Makefile.am
src_libcm_libcm_la_SOURCES = $(cmSRC) $(cmHDR)
include_HEADERS += $(cmHDR)
lib_LTLIBRARIES += src/libcm/libcm.la
include src/libkplfltk/Makefile.am
src_libkplfltk_libkplfltk_la_SOURCES = $(kplfltkSRC) $(kplfltkHDR)
include_HEADERS += $(kplfltkHDR)
lib_LTLIBRARIES += src/libkplfltk/libkplfltk.la
include src/libgm/Makefile.am
src_libgm_libgm_la_SOURCES = $(gmSRC) $(gmHDR)
include_HEADERS += $(gmHDR)
lib_LTLIBRARIES += src/libgm/libgm.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_SOURCES += src/kc/Fl_Splitter.h src/kc/Fl_Splitter.cpp
src_kc_kc_SOURCES += src/kc/Fl_File_Btn.h src/kc/Fl_Vert_Progress.h
src_kc_kc_SOURCES += src/kc/Fl_File_Btn.cpp src/kc/Fl_Vert_Progress.cpp
src_kc_kc_LDADD = $(CMLIBS) $(MYLIBS)
bin_PROGRAMS += src/kc/kc