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