216fab3e2cae10a8abf75f93be21d9e123e2c9cc
[shibboleth/cpp-sp.git] / shib-target / Makefile.am
1 ## $Id$
2
3 AUTOMAKE_OPTIONS = foreign
4
5 pkgsysconfdir = $(sysconfdir)/@PACKAGE@
6 pkgxmldir = $(datadir)/xml/@PACKAGE@
7
8 lib_LTLIBRARIES = libshib-target.la
9
10 if USE_OUR_ONCRPC
11 libshib_target_la_LIBADD = ${top_builddir}/oncrpc/liboncrpc.la
12 AM_CPPFLAGS = -I${top_srcdir}/oncrpc
13 endif
14
15 libshib_targetdir = $(includedir)/shib-target
16 libshib_target_HEADERS = shib-target.h shibrpc.h shib-paths.h hresult.h
17 noinst_HEADERS = internal.h
18
19 libshib_target_la_SOURCES = \
20         ArtifactMapper.cpp \
21         MemoryListener.cpp \
22         RPCListener.cpp \
23     ShibHTTPHook.cpp \
24         shib-ccache.cpp \
25         shib-config.cpp \
26         shib-handlers.cpp \
27         shib-ini.cpp \
28         shib-mlp.cpp \
29         shib-sock.cpp \
30         shib-target.cpp \
31         shibrpc-clnt.c \
32         shibrpc-xdr.c \
33         XML.cpp \
34         XMLRequestMapper.cpp
35
36 # this is different from the project version
37 # http://sources.redhat.com/autobook/autobook/autobook_91.html
38 libshib_target_la_LDFLAGS = -version-info 5:1:0
39
40
41
42 RPCGEN=rpcgen -M
43 RPCGEN_SRC=shibrpc.x
44
45 very-clean: 
46         $(RM) shibrpc.h shibrpc-xdr.c shibrpc-clnt.c shibrpc-svc.c
47
48 rpcgen:
49         $(MAKE) do_rpcgen RPCGEN_TARGET=shibrpc.h RPCGEN_ARGS=-h
50         $(MAKE) do_rpcgen RPCGEN_TARGET=shibrpc-xdr.c RPCGEN_ARGS=-c
51         $(MAKE) do_rpcgen RPCGEN_TARGET=shibrpc-clnt.c RPCGEN_ARGS=-l
52         $(MAKE) do_rpcgen RPCGEN_TARGET=shibrpc-svc.c RPCGEN_ARGS=-m
53         $(MAKE) do_rpcgen RPCGEN_TARGET=shibrpc-server-stubs.c RPCGEN_ARGS=-Ss
54
55 do_rpcgen:
56         $(RM) $(RPCGEN_TARGET)
57         $(RPCGEN) $(RPCGEN_ARGS) -o $(RPCGEN_TARGET) $(RPCGEN_SRC)
58
59 shib-paths.h: ${srcdir}/shib-paths.h.in Makefile ${top_builddir}/config.status
60         rm -f $@.tmp
61         sed < ${srcdir}/$@.in > $@.tmp \
62             -e 's:@-PKGSYSCONFDIR-@:${pkgsysconfdir}:' \
63             -e 's:@-PKGXMLDIR-@:${pkgxmldir}:'
64         cmp -s $@ $@.tmp || mv $@.tmp $@
65         rm -f $@.tmp
66
67 install-exec-hook:
68         for la in $(lib_LTLIBRARIES) ; do rm -f $(DESTDIR)$(libdir)/$$la ; done
69
70 EXTRA_DIST = shibtarget.dsp shib-paths.h.in resource.h shib-target.rc
71 BUILT_SOURCES = shib-paths.h