summaryrefslogtreecommitdiffstats
path: root/common/basicobjects/Makefile.am
blob: 54e36f1539c7e2710be01746db85cff2a92c2aa1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#DEBUG_FLAGS=@DEBUG_VAR@
TRACE_LEVEL=@TRACE_VAR@

DOXYGEN = @DOXYGEN@

topdir=$(srcdir)/..

AM_CFLAGS =
if HAVE_GCC
    AM_CFLAGS += \
        -Wall -Wshadow -Wstrict-prototypes -Wpointer-arith -Wcast-qual \
        -Wcast-align -Wwrite-strings
endif

AM_CPPFLAGS = -I$(topdir) -I$(topdir)/trace $(TRACE_LEVEL)

ACLOCAL_AMFLAGS = -I m4

# Set up the pkg-config file
pkgconfigdir = $(libdir)/pkgconfig
dist_pkgconfig_DATA = basicobjects.pc

dist_include_HEADERS = \
    simplebuffer.h

dist_noinst_DATA = m4

# Build library
lib_LTLIBRARIES = libbasicobjects.la
libbasicobjects_la_SOURCES = \
    simplebuffer.c \
    ../trace/trace.h

libbasicobjects_la_LDFLAGS = \
    -version-info 1:0:0

# Build unit test
check_PROGRAMS = simplebuffer_ut
simplebuffer_ut_SOURCES = simplebuffer_ut.c
simplebuffer_ut_LDADD = libbasicobjects.la

if HAVE_DOXYGEN
docs:
# A temp way of building docs until we hook into the package build
	rm -fR doc
	mkdir -p doc
	$(DOXYGEN) basicobjects.cfg.doxy
else
docs:
	@echo "Doxygen not installed, cannot generate documentation"
	@exit 1
endif


TESTS = simplebuffer_ut

tests: all $(check_PROGRAMS)

clean-local:
	rm -Rf doc