1 1.1.1.2 tron # $OpenLDAP$ 2 1.1 lukem 3 1.1.1.2 tron LDAP_SRC = ../../.. 4 1.1.1.3 christos LDAP_BUILD = $(LDAP_SRC) 5 1.1.1.2 tron LDAP_INC = -I$(LDAP_BUILD)/include -I$(LDAP_SRC)/include -I$(LDAP_SRC)/servers/slapd 6 1.1.1.4 christos LDAP_LIB = $(LDAP_BUILD)/libraries/libldap/libldap.la \ 7 1.1.1.2 tron $(LDAP_BUILD)/libraries/liblber/liblber.la 8 1.1 lukem 9 1.1.1.5 christos PLAT = UNIX 10 1.1.1.5 christos NT_LIB = -L$(LDAP_BUILD)/servers/slapd -lslapd 11 1.1.1.5 christos NT_LDFLAGS = -no-undefined -avoid-version 12 1.1.1.5 christos UNIX_LDFLAGS = -version-info $(LTVER) 13 1.1.1.5 christos 14 1.1.1.2 tron LIBTOOL = $(LDAP_BUILD)/libtool 15 1.1.1.4 christos INSTALL = /usr/bin/install 16 1.1.1.2 tron CC = gcc 17 1.1.1.4 christos OPT = -g -O2 18 1.1.1.2 tron DEFS = 19 1.1.1.2 tron INCS = $(LDAP_INC) 20 1.1.1.5 christos LIBS = $($(PLAT)_LIB) $(LDAP_LIB) 21 1.1.1.5 christos LD_FLAGS = $(LDFLAGS) $($(PLAT)_LDFLAGS) -rpath $(moduledir) -module 22 1.1 lukem 23 1.1.1.2 tron PROGRAMS = pw-kerberos.la pw-netscape.la pw-radius.la pw-apr1.la 24 1.1.1.4 christos MANPAGES = slapd-pw-radius.5 25 1.1.1.2 tron LTVER = 0:0:0 26 1.1 lukem 27 1.1.1.2 tron prefix=/usr/local 28 1.1.1.2 tron exec_prefix=$(prefix) 29 1.1.1.2 tron ldap_subdir=/openldap 30 1.1 lukem 31 1.1.1.2 tron libdir=$(exec_prefix)/lib 32 1.1.1.2 tron libexecdir=$(exec_prefix)/libexec 33 1.1.1.2 tron moduledir = $(libexecdir)$(ldap_subdir) 34 1.1.1.4 christos mandir = $(exec_prefix)/share/man 35 1.1.1.4 christos man5dir = $(mandir)/man5 36 1.1.1.2 tron 37 1.1.1.2 tron .SUFFIXES: .c .o .lo 38 1.1 lukem 39 1.1.1.2 tron .c.lo: 40 1.1.1.4 christos $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) $(OPT) $(CPPFLAGS) $(DEFS) $(INCS) -c $< 41 1.1.1.2 tron 42 1.1.1.2 tron all: $(PROGRAMS) 43 1.1.1.2 tron 44 1.1.1.2 tron pw-kerberos.la: kerberos.lo 45 1.1.1.5 christos $(LIBTOOL) --mode=link $(CC) $(LD_FLAGS) -o $@ $? $(LIBS) 46 1.1 lukem 47 1.1.1.2 tron pw-netscape.la: netscape.lo 48 1.1.1.5 christos $(LIBTOOL) --mode=link $(CC) $(LD_FLAGS) -o $@ $? $(LIBS) 49 1.1.1.2 tron 50 1.1.1.2 tron pw-radius.la: radius.lo 51 1.1.1.5 christos $(LIBTOOL) --mode=link $(CC) $(LD_FLAGS) -o $@ $? $(LIBS) 52 1.1 lukem 53 1.1.1.2 tron pw-apr1.la: apr1.lo 54 1.1.1.5 christos $(LIBTOOL) --mode=link $(CC) $(LD_FLAGS) -o $@ $? $(LIBS) 55 1.1.1.2 tron 56 1.1 lukem clean: 57 1.1.1.2 tron rm -rf *.o *.lo *.la .libs 58 1.1.1.2 tron 59 1.1.1.4 christos install: install-lib install-man FORCE 60 1.1.1.4 christos 61 1.1.1.4 christos install-lib: $(PROGRAMS) 62 1.1.1.2 tron mkdir -p $(DESTDIR)$(moduledir) 63 1.1.1.2 tron for p in $(PROGRAMS) ; do \ 64 1.1.1.2 tron $(LIBTOOL) --mode=install cp $$p $(DESTDIR)$(moduledir) ; \ 65 1.1.1.2 tron done 66 1.1.1.2 tron 67 1.1.1.4 christos install-man: $(MANPAGES) 68 1.1.1.4 christos mkdir -p $(DESTDIR)$(man5dir) 69 1.1.1.4 christos $(INSTALL) -m 644 $(MANPAGES) $(DESTDIR)$(man5dir) 70 1.1.1.4 christos 71 1.1.1.4 christos FORCE: 72 1.1.1.4 christos 73