File: Makefile.am

package info (click to toggle)
clsync 0.4.5-2.2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,404 kB
  • sloc: ansic: 15,074; sh: 466; makefile: 269
file content (160 lines) | stat: -rw-r--r-- 3,522 bytes parent folder | download | duplicates (3)
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
ACLOCAL_AMFLAGS = -I m4
SUBDIRS = examples

if CLSYNC
bin_PROGRAMS = clsync

clsync_SOURCES = error.c fileutils.c glibex.c		\
	indexes.c main.c malloc.c rules.c stringex.c sync.c		\
	posix-hacks.c privileged.c pthreadex.c  		\
	fileutils.h glibex.h main.h port-hacks.h posix-hacks.h		\
	pthreadex.h stringex.h sync.h common.h control.h privileged.h	\
	rules.h syscalls.h

clsync_CFLAGS  = $(AM_CFLAGS)
clsync_LDFLAGS = $(AM_LDFLAGS)

if HAVE_PTHREAD_TIMEDJOIN_NP
clsync_CFLAGS  += -DTHREADING_SUPPORT
endif
if HAVE_KQUEUE
clsync_CFLAGS  += -DKQUEUE_SUPPORT
clsync_SOURCES += mon_kqueue.c mon_kqueue.h
endif
if HAVE_INOTIFY
clsync_CFLAGS  += -DINOTIFY_SUPPORT
clsync_SOURCES += mon_inotify.c mon_inotify.h
if INOTIFY_OLD
clsync_CFLAGS  += -DINOTIFY_OLD
endif
endif
if HAVE_FANOTIFY
clsync_CFLAGS  += -DFANOTIFY_SUPPORT
clsync_SOURCES += mon_fanotify.c mon_fanotify.h
endif
if HAVE_BSM
clsync_CFLAGS  += -DBSM_SUPPORT
clsync_SOURCES += mon_bsm.c mon_bsm.h
endif
if HAVE_GIO
clsync_CFLAGS  += -DGIO_SUPPORT $(GIO_CFLAGS)
clsync_LDFLAGS += $(GIO_LIBS)
clsync_SOURCES += mon_gio.c mon_gio.h
endif
if HAVE_DTRACEPIPE
clsync_CFLAGS  += -DDTRACEPIPE_SUPPORT
clsync_SOURCES += mon_dtracepipe.c mon_dtracepipe.h
endif
if HAVE_BACKTRACE
clsync_CFLAGS  += -DBACKTRACE_SUPPORT
endif
if HAVE_CAPABILITIES
clsync_CFLAGS  += -DCAPABILITIES_SUPPORT
if HAVE_SECCOMP
clsync_CFLAGS  += -DSECCOMP_SUPPORT
endif
endif
if HAVE_GETMNTENT
clsync_CFLAGS  += -DGETMNTENT_SUPPORT
endif
if HAVE_UNSHARE
clsync_CFLAGS  += -DUNSHARE_SUPPORT
if HAVE_PIVOTROOT
clsync_CFLAGS  += -DPIVOTROOT_OPT_SUPPORT
endif
endif
#if HAVE_TRE
#clsync_CFLAGS  += -DTRE_SUPPORT
#endif
if HAVE_LIBCGROUP
clsync_CFLAGS  += -DCGROUP_SUPPORT
clsync_SOURCES += cgroup.c cgroup.h
endif
if HAVE_CLUSTER
clsync_CFLAGS  += -DCLUSTER_SUPPORT
clsync_SOURCES += cluster.c cluster.h
endif
if HAVE_CALC
clsync_SOURCES += calc.c calc.h
endif
if HLLOCKS
clsync_CFLAGS  += -DHL_LOCKS
endif
if SOCKET
clsync_SOURCES += socket.c control.c program.h
endif
if HAVE_LTO
clsync_CFLAGS  += $(LTOFLAGS)
clsync_LDFLAGS += $(LTOFLAGS)
endif

gencompilerflags_CFLAGS = $(clsync_CFLAGS)

main.o: compilerflags.h

compilerflags.h: gencompilerflags
	./gencompilerflags > compilerflags.h

gencompilerflags:
	+$(CC) $(gencompilerflags_CFLAGS) gencompilerflags.c -o gencompilerflags

dist_man_MANS = man/man1/clsync.1
endif

dist_doc_DATA = CONTRIB DEVELOPING LICENSE PROTOCOL README.md TODO

EXTRA_DIST = .doxygen .travis.sh .travis.yml NOTES SHORTHANDS freebsd debian gentoo

if LIBCLSYNC
lib_LTLIBRARIES = libclsync.la
libclsync_la_SOURCES = malloc.c libclsync.c socket.c error.c pthreadex.c
libclsync_la_LDFLAGS = -version-info 0:0:0
endif

REVISION=$(shell [ -d .git ] &&\
	echo -n '\".'$$(git rev-list --count $$(git tag -l 'v*' --sort='taggerdate')..HEAD)'\"'\
	|| echo -n '\"-release\"' )

AM_CFLAGS := -DREVISION=$(REVISION)

clsync_includedir = $(includedir)/clsync
libclsync_includedir = $(includedir)/libclsync

if CLSYNC
clsync_include_HEADERS = \
	clsync.h \
	port-hacks.h \
	configuration.h \
	ctx.h \
	error.h \
	indexes.h \
	malloc.h \
	compilerflags.h

if SOCKET
clsync_include_HEADERS += \
	socket.h
endif
endif
if LIBCLSYNC
libclsync_include_HEADERS = \
	clsync.h \
	ctx.h \
	libclsync.h \
	malloc.h \
	socket.h
endif

doc:
	doxygen .doxygen

if LIBCLSYNC
pkgconfig_DATA = pkgconfig/libclsync.pc
endif

CLEANFILES = compilerflags.h gencompilerflags
if CLSYNC
CLEANFILES += examples/rules
clean-local:
	-rm -rf examples/testdir examples/*.o examples/*.so examples/*.xz doc/doxygen
endif