added a wbtest program that shows how to access winbindd extended nss
[bbaumbach/samba-autobuild/.git] / examples / appliance / Makefile
1 PREFIX=/usr/local/samba
2 CONFIGOPTS=--with-pam --prefix=$(PREFIX) --with-smbmount
3
4
5 all: headb tngb
6
7 config:
8         (cd head/source; CFLAGS="-Wall -O2 -g" ./configure $(CONFIGOPTS))
9         (cd tng;  CFLAGS="-Wall -O2 -g" ./configure $(CONFIGOPTS) --enable-shared=no)
10
11 headb:
12         (cd head/source; make)  
13
14 tngb:
15         (cd tng; make bin/samedit bin/winbindd nsswitch)
16
17 clean:
18         (cd head/source; make clean)
19         (cd tng; make clean)
20
21 proto:
22         (cd head/source; make proto)
23         (cd tng; make proto)
24
25 distclean:
26         (cd head/source; make clean; rm -f config.cache; rm -f Makefile)
27         (cd tng; make clean; rm -f config.cache; rm -f Makefile)
28
29 install: installhead installtng
30
31 installbin: installheadbin installtng
32
33 installhead:
34         (cd head/source; make install)
35
36 installheadbin:
37         (cd head/source; make installbin)
38
39 installtng: tngb
40         (cd tng; \
41         rm -f $(PREFIX)/bin/samedit $(PREFIX)/bin/winbindd; \
42         cp bin/samedit bin/winbindd $(PREFIX)/bin; \
43         rm -f /lib/libnss_winbind.so.2 /lib/security/pam_winbind.so; \
44         cp nsswitch/libnss_winbind.so /lib/libnss_winbind.so.2; \
45         cp nsswitch/pam_winbind.so /lib/security/)
46
47 stop:
48         -killall winbindd smbd nmbd
49
50 start:
51         $(PREFIX)/bin/smbd
52         $(PREFIX)/bin/nmbd
53         $(PREFIX)/bin/winbindd
54
55 restart: stop start
56
57 updatehead:
58         (cd head; cvs -z9 update -d)
59
60 updatetng:
61         (cd tng; cvs -z9 update -d)
62
63 update: updatehead updatetng
64
65 checkout:
66         -mkdir head tng
67         (cd head ; cvs -z9 co samba; mv samba head)
68         (cd head ; cvs -z9 co -r SAMBA_TNG samba/source; mv source tng)