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