Imported Upstream version 0.0.11
[jelmer/pam-krb5-migrate.git] / Makefile
1 include Makefile.settings
2 LDFLAGS += -Wl,-Bsymbolic -Wl,-x -shared
3 CFLAGS += `$(KRB5CONFIG) --cflags krb5 kadm-client`
4 CFLAGS += $(COM_ERR_CFLAGS)
5 CFLAGS += -fPIC
6
7 # Uncomment these lines to build the module with local db support.
8 #KLOCAL = -DKADMIN_LOCAL
9 #LIBS   = -lkadm5srv
10
11 # Uncomment these lines to build the module with remote kadmin support.
12 KLOCAL =
13 LIBS  += `$(KRB5CONFIG) --libs krb5 kadm-client`
14 LIBS += $(COM_ERR_LIBS)
15 LIBS  += -lc
16
17 all: pam_krb5_migrate.so
18
19 pam_krb5_migrate.so: pam_krb5_migrate.o
20         $(CC) -Wl,-z,defs $(LDFLAGS) -o pam_krb5_migrate.so \
21           pam_krb5_migrate.o $(LIBS)
22
23 pam_krb5_migrate.o: pam_krb5_migrate.c
24         $(CC) -o $@ -c $< $(KLOCAL) $(CFLAGS) $(DEFS)
25
26 check:: 
27
28 install: all
29         install -d $(DESTDIR)/lib/security
30         install -d $(DESTDIR)$(mandir)/man7
31         install -m755 -o root pam_krb5_migrate.so $(DESTDIR)/lib/security/
32         install -m0644 -o root pam_krb5_migrate.7 $(DESTDIR)$(mandir)/man7
33
34 ctags:
35         ctags -R .
36
37 clean:
38         rm -f *.o *.so test
39
40 distclean:: clean
41         rm -rf autom4te.cache config.log config.status Makefile.settings