cwtest/Makefile.am

57 lines
1.5 KiB
Makefile
Raw Normal View History

2012-10-29 21:07:53 +00:00
ACLOCAL_AMFLAGS = -I m4 # use custom macro's in ./m4
lib_LTLIBRARIES =
bin_PROGRAMS =
include_HEADERS =
# 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-03-24 01:27:10 +00:00
WS_DIR = /home/kevin/sdk/libwebsockets/build/out
2012-10-29 21:07:53 +00:00
2020-03-24 01:27:10 +00:00
AM_CPPFLAGS = -D _GNU_SOURCE -I.. -I$(srcdir)/src/libcw -I$(WS_DIR)/include
2012-10-29 21:07:53 +00:00
AM_CFLAGS = -Wno-multichar
2020-03-24 01:27:10 +00:00
AM_CXXFLAGS = --std=c++17
2012-10-29 21:07:53 +00:00
AM_LDFLAGS =
# debug/release switches
if DEBUG
AM_CFLAGS += -g
2020-03-24 01:27:10 +00:00
AM_CXXFLAGS += -g -Wall
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-03-24 01:27:10 +00:00
AM_LDFLAGS += -L/usr/lib64 -L$(WS_DIR)/lib -Wl,-Bstatic -lasound -Wl,-Bdynamic
2012-10-29 21:07:53 +00:00
AM_CFLAGS += -m64
endif
endif
2020-03-24 01:27:10 +00:00
include src/libcw/Makefile.am
2012-10-29 21:07:53 +00:00
2020-03-31 17:06:43 +00:00
libcw_la_SOURCES = $(libcwSRC) $(libcwHDR)
lib_LTLIBRARIES += libcw.la
include_HEADERS += $(libcwHDR)
2012-10-29 21:07:53 +00:00
2020-03-24 01:27:10 +00:00
src_cwtest_cwtest_SOURCES = src/cwtest/main.cpp
2012-10-29 21:07:53 +00:00
2020-03-24 01:27:10 +00:00
# autoconfig manual recommends setting direct referenes to non-3rd party libraries rather than using -L and -l
src_cwtest_cwtest_LDADD = libcw.la -lpthread -lwebsockets
2012-10-29 21:07:53 +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