Remove (old) mod_shib code
[shibboleth/sp.git] / mod_eduPerson / Makefile.sun
1 ##
2 ##  Makefile -- Build procedure for fast3lpoad Apache module
3 ##
4 ##  This is a C++ module so things have to be handled a little differently.
5
6 #   the used tools
7 CC=CC
8 SAMLRT=../../../opensaml/c
9 APXS=/usr/sbin/apxs
10 APACHECTL=/usr/sbin/apachectl
11 SHIB_CFLAGS=-DSOLARIS -mt -fast -Kpic -I$(SAMLRT)/include -I/usr/local/include -I../include
12 SHIB_LDFLAGS=-L$(SAMLRT)/lib -L../lib
13 SHIB_LIBS=-lCrun -lCstd -lsaml -lshib -leduPerson -lxerces-c1_7_0
14
15
16 # Get all of apxs's internal values.
17 APXS_CC=`$(APXS) -q CC`   
18 APXS_TARGET=`$(APXS) -q TARGET`   
19 APXS_CFLAGS=`$(APXS) -q CFLAGS`   
20 APXS_SBINDIR=`$(APXS) -q SBINDIR`   
21 APXS_CFLAGS_SHLIB=`$(APXS) -q CFLAGS_SHLIB`   
22 APXS_INCLUDEDIR=`$(APXS) -q INCLUDEDIR`   
23 APXS_LD_SHLIB=`$(APXS) -q LD_SHLIB`
24 APXS_LIBEXECDIR=`$(APXS) -q LIBEXECDIR`
25 APXS_LDFLAGS_SHLIB=`$(APXS) -q LDFLAGS_SHLIB`
26 APXS_SYSCONFDIR=`$(APXS) -q SYSCONFDIR`
27 APXS_LIBS_SHLIB=`$(APXS) -q LIBS_SHLIB`
28
29
30 #   the default target
31 all: mod_eduPerson.so
32
33 # compile the shared object file. use g++ instead of letting apxs call
34 # ld so we end up with the right c++ stuff. We do this in two steps,
35 # compile and link.
36
37 # compile
38 mod_eduPerson.o: mod_eduPerson.cpp
39         $(CC) $(SHIB_CFLAGS) -I$(APXS_INCLUDEDIR) -I$(APXS_CFLAGS) $(APXS_CFLAGS_SHLIB) -c -o $@ $< 
40
41 # link
42 mod_eduPerson.so: mod_eduPerson.o
43         $(CC) -G $(SHIB_LDFLAGS) $(SHIB_LIBS) -o $@ $< $(APXS_LIBS_SHLIB)
44
45 # install the shared object file into Apache 
46 install: all
47         $(APXS) -i -n 'eduPerson_module' mod_eduPerson.so
48
49 # display the apxs variables
50 check_apxs_vars:
51         @echo APXS_CC $(APXS_CC);\
52         echo APXS_TARGET $(APXS_TARGET);\
53         echo APXS_CFLAGS $(APXS_CFLAGS);\
54         echo APXS_SBINDIR $(APXS_SBINDIR);\
55         echo APXS_CFLAGS_SHLIB $(APXS_CFLAGS_SHLIB);\
56         echo APXS_INCLUDEDIR $(APXS_INCLUDEDIR);\
57         echo APXS_LD_SHLIB $(APXS_LD_SHLIB);\
58         echo APXS_LIBEXECDIR $(APXS_LIBEXECDIR);\
59         echo APXS_LDFLAGS_SHLIB $(APXS_LDFLAGS_SHLIB);\
60         echo APXS_SYSCONFDIR $(APXS_SYSCONFDIR);\
61         echo APXS_LIBS_SHLIB $(APXS_LIBS_SHLIB)
62
63 #   cleanup
64 clean:
65         -rm -f *.so *.o *~
66
67 #   install and activate shared object by reloading Apache to
68 #   force a reload of the shared object file
69 reload: install restart
70
71 #   the general Apache start/restart/stop
72 #   procedures
73 start:
74         $(APACHECTL) start
75 restart:
76         $(APACHECTL) restart
77 stop:
78         $(APACHECTL) stop
79