File: Makefile.am

package info (click to toggle)
kronosnet 1.32-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,080 kB
  • sloc: ansic: 25,419; sh: 5,295; makefile: 664
file content (176 lines) | stat: -rw-r--r-- 4,430 bytes parent folder | download
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
#
# Copyright (C) 2010-2025 Red Hat, Inc.  All rights reserved.
#
# Authors: Fabio M. Di Nitto <fabbione@kronosnet.org>
#          Federico Simoncelli <fsimon@kronosnet.org>
#
# This software licensed under GPL-2.0+
#

MAINTAINERCLEANFILES	= Makefile.in

include $(top_srcdir)/build-aux/check.mk

SYMFILE			= libknet_exported_syms

EXTRA_DIST		= $(SYMFILE)

SUBDIRS			= . tests

# https://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
libknetversion		= 6:0:5

# override global LIBS that pulls in lots of craft we don't need here
LIBS			=

sources			= \
			  common.c \
			  compat.c \
			  compress.c \
			  crypto.c \
			  handle.c \
			  handle_api.c \
			  host.c \
			  lib_config.c \
			  links.c \
			  links_acl.c \
			  links_acl_ip.c \
			  links_acl_loopback.c \
			  logging.c \
			  netutils.c \
			  onwire.c \
			  threads_common.c \
			  threads_dsthandler.c \
			  threads_heartbeat.c \
			  threads_pmtud.c \
			  threads_rx.c \
			  threads_tx.c \
			  transports.c \
			  transport_common.c \
			  transport_loopback.c \
			  transport_udp.c \
			  transport_sctp.c

include_HEADERS		= libknet.h

pkgconfigdir		= $(libdir)/pkgconfig

pkgconfig_DATA		= libknet.pc

noinst_HEADERS		= \
			  common.h \
			  compat.h \
			  compress.h \
			  compress_model.h \
			  crypto.h \
			  crypto_model.h \
			  host.h \
			  internals.h \
			  links.h \
			  links_acl.h \
			  links_acl_ip.h \
			  links_acl_loopback.h \
			  logging.h \
			  netutils.h \
			  onwire.h \
			  threads_common.h \
			  threads_dsthandler.h \
			  threads_heartbeat.h \
			  threads_pmtud.h \
			  threads_rx.h \
			  threads_tx.h \
			  transports.h \
			  transport_common.h \
			  transport_loopback.h \
			  transport_udp.h \
			  transport_sctp.h

lib_LTLIBRARIES		= libknet.la

libknet_la_SOURCES	= $(sources)

AM_CFLAGS		+= $(XOPEN_CPPFLAGS) $(libqb_CFLAGS)

libknet_la_CFLAGS	= $(AM_CFLAGS) $(PTHREAD_CFLAGS) \
			  -DPLUGINPATH="\"$(pkglibdir)\""

EXTRA_libknet_la_DEPENDENCIES	= $(SYMFILE)

if BUILD_FOR_SOLARIS
libknet_la_LDFLAGS	= $(AM_LDFLAGS) \
			  -Wl,-M$(abs_srcdir)/$(SYMFILE) \
			  -version-info $(libknetversion)
else
libknet_la_LDFLAGS	= $(AM_LDFLAGS) \
			  -Wl,--version-script=$(abs_srcdir)/$(SYMFILE) \
			  -version-info $(libknetversion)
endif

libknet_la_LIBADD	= $(PTHREAD_LIBS) $(socket_LIBS) $(dl_LIBS) $(rt_LIBS) $(m_LIBS)

check-local: check-annocheck-libs

# Prepare empty value for appending
pkglib_LTLIBRARIES	=

# MODULE_LDFLAGS would mean a target-specific variable for Automake
MODULELDFLAGS		= $(AM_LDFLAGS) -module -avoid-version -export-dynamic

if BUILD_COMPRESS_ZSTD
pkglib_LTLIBRARIES	+= compress_zstd.la
compress_zstd_la_LDFLAGS = $(MODULELDFLAGS)
compress_zstd_la_CFLAGS	= $(AM_CFLAGS) $(libzstd_CFLAGS)
compress_zstd_la_LIBADD	= $(libzstd_LIBS)
endif

if BUILD_COMPRESS_ZLIB
pkglib_LTLIBRARIES	+= compress_zlib.la
compress_zlib_la_LDFLAGS = $(MODULELDFLAGS)
compress_zlib_la_CFLAGS	= $(AM_CFLAGS) $(zlib_CFLAGS)
compress_zlib_la_LIBADD	= $(zlib_LIBS)
endif

if BUILD_COMPRESS_LZ4
pkglib_LTLIBRARIES	+= compress_lz4.la compress_lz4hc.la
compress_lz4_la_LDFLAGS	= $(MODULELDFLAGS)
compress_lz4_la_CFLAGS	= $(AM_CFLAGS) $(liblz4_CFLAGS)
compress_lz4_la_LIBADD	= $(liblz4_LIBS)
compress_lz4hc_la_LDFLAGS = $(MODULELDFLAGS)
compress_lz4hc_la_CFLAGS = $(AM_CFLAGS) $(liblz4_CFLAGS)
compress_lz4hc_la_LIBADD = $(liblz4_LIBS)
endif

if BUILD_COMPRESS_LZO2
pkglib_LTLIBRARIES	+= compress_lzo2.la
compress_lzo2_la_LDFLAGS = $(MODULELDFLAGS)
compress_lzo2_la_CFLAGS	= $(AM_CFLAGS) $(lzo2_CFLAGS)
compress_lzo2_la_LIBADD	= $(lzo2_LIBS)
endif

if BUILD_COMPRESS_LZMA
pkglib_LTLIBRARIES	+= compress_lzma.la
compress_lzma_la_LDFLAGS = $(MODULELDFLAGS)
compress_lzma_la_CFLAGS	= $(AM_CFLAGS) $(liblzma_CFLAGS)
compress_lzma_la_LIBADD	= $(liblzma_LIBS)
endif

if BUILD_COMPRESS_BZIP2
pkglib_LTLIBRARIES	+= compress_bzip2.la
compress_bzip2_la_LDFLAGS = $(MODULELDFLAGS)
compress_bzip2_la_CFLAGS = $(AM_CFLAGS) $(bzip2_CFLAGS)
compress_bzip2_la_LIBADD = $(bzip2_LIBS)
endif

if BUILD_CRYPTO_NSS
pkglib_LTLIBRARIES	+= crypto_nss.la
crypto_nss_la_LDFLAGS	= $(MODULELDFLAGS)
crypto_nss_la_CFLAGS	= $(AM_CFLAGS) $(nss_CFLAGS)
crypto_nss_la_LIBADD	= $(nss_LIBS)
endif

if BUILD_CRYPTO_OPENSSL
pkglib_LTLIBRARIES	+= crypto_openssl.la
crypto_openssl_la_LDFLAGS = $(MODULELDFLAGS)
crypto_openssl_la_CFLAGS = $(AM_CFLAGS) $(openssl_CFLAGS)
crypto_openssl_la_LIBADD = $(openssl_LIBS)
endif