File: Makefile.am

package info (click to toggle)
c-icap 1:0.5.3-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 3,600 kB
  • sloc: ansic: 27,220; sh: 4,415; makefile: 242; perl: 95; awk: 10
file content (141 lines) | stat: -rw-r--r-- 5,866 bytes parent folder | download | duplicates (2)
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
srcdir = @srcdir@
top_builddir=@top_builddir@

CONFIGDIR=@sysconfdir@
PKGLIBDIR=@pkglibdir@
MODULESDIR=$(pkglibdir)/
SERVICESDIR=$(pkglibdir)/
#CONFIGDIR=$(sysconfdir)/
DATADIR=$(pkgdatadir)/
LOGDIR=$(localstatedir)/log/
SOCKDIR=/var/run/c-icap

DOXYGEN=@doxygen_bin@

ACLOCAL_AMFLAGS = -I m4

SUBDIRS =  . utils modules services tests docs


lib_LTLIBRARIES=libicapapi.la
bin_PROGRAMS = c-icap

bin_SCRIPTS = c-icap-config c-icap-libicapapi-config

UTIL_LIB_SOURCES=net_io.c util.c os/unix/net_io.c os/unix/proc_mutex.c os/unix/shared_mem.c os/unix/threads.c os/unix/utilfunc.c os/unix/dlib.c
if USE_OPENSSL
UTIL_LIB_SOURCES += openssl/net_io_ssl.c
endif
if USE_REGEX
UTIL_LIB_SOURCES += regex.c
endif
UTIL_SOURCES=os/unix/proc_utils.c

RPATH_FLAG=
if USE_RPATH
RPATH_FLAG+=-rpath @libdir@
endif

libicapapi_la_SOURCES=  header.c body.c decode.c encode.c simple_api.c request_common.c \
                        filetype.c debug.c cfg_lib.c mem.c  service_lib.c \
                        cache.c lookup_table.c lookup_file_table.c hash.c \
			txt_format.c stats.c types_ops.c acl.c txtTemplate.c \
			array.c registry.c md5.c $(UTIL_LIB_SOURCES)

c_icap_SOURCES = aserver.c request.c cfg_param.c \
                   proc_threads_queues.c http_auth.c \
                   access.c log.c service.c module.c \
		   commands.c mpmt_server.c dlib.c info.c \
		   default_acl.c port.c $(UTIL_SOURCES)


# libicapapi ......
libicapapi_la_CFLAGS= $(INVISIBILITY_CFLAG) -I$(srcdir)/include/ -Iinclude/ @ZLIB_ADD_FLAG@ @OPENSSL_ADD_FLAG@ @BZLIB_ADD_FLAG@ @BROTLI_ADD_FLAG@ @PCRE_ADD_FLAG@ -DCI_BUILD_LIB

libicapapi_la_LIBADD = @ZLIB_ADD_LDADD@ @BZLIB_ADD_LDADD@ @BROTLI_ADD_LDADD@ @PCRE_ADD_LDADD@ @DL_ADD_FLAG@ @THREADS_LDADD@ @OPENSSL_ADD_LDADD@
libicapapi_la_LDFLAGS= -shared -version-info @CICAPLIB_VERSION@ @THREADS_LDFLAGS@

export EXT_PROGRAMS_MKLIB = @ZLIB_LNDIR_LDADD@ @BZLIB_LNDIR_LDADD@ @BROTLI_LNDIR_LDADD@ @PCRE_LNDIR_LDADD@ @OPENSSL_LNDIR_LDADD@

#c_icap the main server
c_icap_DEPENDENCIES=libicapapi.la
c_icap_CFLAGS= $(INVISIBILITY_CFLAG) -I$(top_srcdir)/include/ -I$(top_builddir)/include/ \
                        -DCONFDIR=\"$(CONFIGDIR)\" -DMODSDIR=\"$(MODULESDIR)\" \
                        -DSERVDIR=\"$(SERVICESDIR)\" -DLOGDIR=\"$(LOGDIR)\"  \
                        -DDATADIR=\"$(DATADIR)\" @OPENSSL_ADD_FLAG@

c_icap_LDADD = libicapapi.la @DL_ADD_FLAG@ @THREADS_LDADD@ $(EXT_PROGRAMS_MKLIB)
c_icap_LDFLAGS = -rdynamic $(RPATH_FLAG) @THREADS_LDFLAGS@


INCS = access.h body.h cfg_param.h c-icap-conf.h c-icap.h ci_threads.h \
	commands.h debug.h dlib.h filetype.h header.h log.h mem.h module.h \
	net_io.h proc_mutex.h proc_threads_queues.h request.h service.h \
	shared_mem.h simple_api.h util.h lookup_table.h hash.h stats.h acl.h \
        cache.h txt_format.h types_ops.h txtTemplate.h array.h registry.h \
	md5.h ci_regex.h net_io_ssl.h port.h

ALL_INCS=$(INCS:%.h=include/%.h)

pkginclude_HEADERS = $(ALL_INCS)


do_subst=sed -e 's%[@]SYSCONFDIR[@]%$(CONFIGDIR)%g' \
             -e 's%[@]PACKAGE_VERSION[@]%$(PACKAGE_VERSION)%g' \
             -e 's%[@]PACKAGE[@]%$(PACKAGE)%g' \
             -e 's%[@]prefix[@]%$(prefix)%g' \
             -e 's%[@]LIBDIR[@]%$(libdir)%g' \
             -e 's%[@]PKGINCLUDEDIR[@]%$(pkgincludedir)%g' \
             -e 's%[@]INCLUDEDIR[@]%$(includedir)%g' \
             -e 's%[@]PKGLIBDIR[@]%$(pkglibdir)%g' \
             -e 's%[@]PKGDATADIR[@]%$(pkgdatadir)%g' \
             -e 's%[@]CFLAGS[@]%$(CFLAGS)%g' \
             -e 's%[@]MODULES_LIBADD[@]%$(MODULES_LIBADD)%g' \
             -e 's%[@]MODULES_CFLAGS[@]%$(MODULES_CFLAGS)%g' \
             -e 's%[@]EXT_PROGRAMS_LIBADD[@]%$(EXT_PROGRAMS_MKLIB)%g' \
             -e 's%[@]SOCKDIR[@]%$(SOCKDIR)%g'

CLEANFILES = c-icap-config c-icap-libicapapi-config

# The c-icap.conf, c-icap-config, and c-icap-libicapapi-config must rebuild
# on every new configure run. The include/c-icap-conf.h is rebuild when
# configure runs so it is a good test.
c-icap.conf: c-icap.conf.in include/c-icap-conf.h
	$(do_subst) < $(srcdir)/c-icap.conf.in > $@

c-icap-config: c-icap-config.in include/c-icap-conf.h
	$(do_subst) < $(srcdir)/c-icap-config.in > $@
	chmod 755 $@

c-icap-libicapapi-config:  c-icap-libicapapi-config.in include/c-icap-conf.h
	$(do_subst) < $(srcdir)/c-icap-libicapapi-config.in > $@
	chmod 755 $@

doc:
	$(DOXYGEN) $(srcdir)/c-icap.dox

install-data-local: c-icap.conf
	$(mkinstalldirs) $(DESTDIR)$(CONFIGDIR);
	$(INSTALL) c-icap.conf $(DESTDIR)$(CONFIGDIR)/c-icap.conf.default
	$(INSTALL) $(srcdir)/c-icap.magic $(DESTDIR)$(CONFIGDIR)/c-icap.magic.default
	if test ! -f $(DESTDIR)$(CONFIGDIR)/c-icap.conf; then  $(INSTALL) c-icap.conf $(DESTDIR)$(CONFIGDIR)/c-icap.conf; fi
	if test ! -f $(DESTDIR)$(CONFIGDIR)/c-icap.magic; then $(INSTALL) $(srcdir)/c-icap.magic $(DESTDIR)$(CONFIGDIR)/c-icap.magic; fi
	$(mkinstalldirs)  $(DESTDIR)$(LOGDIR);
	$(mkinstalldirs)  $(DESTDIR)$(SOCKDIR);
	chgrp nogroup $(DESTDIR)$(LOGDIR) || echo -e "*********\nWARNING! Can not set group for the log dir $(DESTDIR)$(LOGDIR)\n*********\n"
	chmod 775 $(DESTDIR)$(LOGDIR)
	chgrp nogroup $(DESTDIR)$(SOCKDIR) || echo -e "*********\nWARNING! Can not set group for the c-icap socket store dir $(DESTDIR)$(SOCKDIR)\n\n*********\n"
	chmod 775 $(DESTDIR)$(SOCKDIR)

EXTRA_DIST = RECONF config-w32.h makefile.w32 \
             c_icap_dll.mak c-icap.conf.in c-icap.magic  c_icap.mak c_icap.def \
             contrib/get_file.pl contrib/convert_old_magic.pl \
             winnt_server.c  os/win32/dll_entry.c os/win32/makefile.w32 \
             os/win32/net_io.c os/win32/proc_mutex.c \
             os/win32/shared_mem.c os/win32/threads.c os/win32/utilfunc.c \
             common.h \
             c-icap-config.in c-icap-libicapapi-config.in c-icap.dox \
             build/c_icap_version.awk \
	     openssl/build_openssl_opts.pl \
	     openssl/openssl_options.c