1 1.1.1.4 tron # $OpenLDAP$ 2 1.1.1.2 lukem # This work is part of OpenLDAP Software <http://www.openldap.org/>. 3 1.1.1.2 lukem # 4 1.1.1.10 christos # Copyright 1998-2024 The OpenLDAP Foundation. 5 1.1 lukem # Copyright 2004 Howard Chu, Symas Corp. All Rights Reserved. 6 1.1 lukem # 7 1.1 lukem # Redistribution and use in source and binary forms, with or without 8 1.1 lukem # modification, are permitted only as authorized by the OpenLDAP 9 1.1 lukem # Public License. 10 1.1 lukem # 11 1.1 lukem # A copy of this license is available in the file LICENSE in the 12 1.1 lukem # top-level directory of the distribution or, alternatively, at 13 1.1 lukem # <http://www.OpenLDAP.org/license.html>. 14 1.1 lukem 15 1.1.1.4 tron LDAP_SRC = ../../.. 16 1.1.1.5 christos LDAP_BUILD = $(LDAP_SRC) 17 1.1.1.4 tron LDAP_INC = -I$(LDAP_BUILD)/include -I$(LDAP_SRC)/include -I$(LDAP_SRC)/servers/slapd 18 1.1.1.9 christos LDAP_LIB = $(LDAP_BUILD)/libraries/libldap/libldap.la \ 19 1.1.1.4 tron $(LDAP_BUILD)/libraries/liblber/liblber.la 20 1.1.1.4 tron 21 1.1.1.4 tron SSL_INC = 22 1.1.1.4 tron SSL_LIB = -lcrypto 23 1.1.1.4 tron 24 1.1.1.4 tron HEIMDAL_INC = -I/usr/heimdal/include 25 1.1.1.4 tron HEIMDAL_LIB = -L/usr/heimdal/lib -lkrb5 -lkadm5srv 26 1.1.1.4 tron 27 1.1.1.10 christos PLAT = UNIX 28 1.1.1.10 christos NT_LIB = -L$(LDAP_BUILD)/servers/slapd -lslapd 29 1.1.1.10 christos NT_LDFLAGS = -no-undefined -avoid-version 30 1.1.1.10 christos UNIX_LDFLAGS = -version-info $(LTVER) 31 1.1.1.10 christos 32 1.1.1.4 tron LIBTOOL = $(LDAP_BUILD)/libtool 33 1.1.1.9 christos INSTALL = /usr/bin/install 34 1.1.1.4 tron CC = gcc 35 1.1.1.9 christos OPT = -g -O2 36 1.1.1.4 tron # Omit DO_KRB5, DO_SAMBA or DO_SHADOW if you don't want to support it. 37 1.1.1.4 tron DEFS = -DDO_KRB5 -DDO_SAMBA -DDO_SHADOW 38 1.1.1.4 tron INCS = $(LDAP_INC) $(HEIMDAL_INC) $(SSL_INC) 39 1.1.1.10 christos LIBS = $($(PLAT)_LIB) $(LDAP_LIB) $(HEIMDAL_LIB) $(SSL_LIB) 40 1.1.1.10 christos LD_FLAGS = $(LDFLAGS) $($(PLAT)_LDFLAGS) -rpath $(moduledir) -module 41 1.1.1.4 tron 42 1.1.1.4 tron PROGRAMS = smbk5pwd.la 43 1.1.1.9 christos MANPAGES = slapo-smbk5pwd.5 44 1.1.1.4 tron LTVER = 0:0:0 45 1.1 lukem 46 1.1.1.2 lukem prefix=/usr/local 47 1.1.1.2 lukem exec_prefix=$(prefix) 48 1.1.1.2 lukem ldap_subdir=/openldap 49 1.1.1.2 lukem 50 1.1.1.2 lukem libdir=$(exec_prefix)/lib 51 1.1.1.2 lukem libexecdir=$(exec_prefix)/libexec 52 1.1.1.2 lukem moduledir = $(libexecdir)$(ldap_subdir) 53 1.1.1.9 christos mandir = $(exec_prefix)/share/man 54 1.1.1.9 christos man5dir = $(mandir)/man5 55 1.1.1.2 lukem 56 1.1.1.4 tron .SUFFIXES: .c .o .lo 57 1.1 lukem 58 1.1.1.4 tron .c.lo: 59 1.1.1.9 christos $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) $(OPT) $(CPPFLAGS) $(DEFS) $(INCS) -c $< 60 1.1 lukem 61 1.1.1.4 tron all: $(PROGRAMS) 62 1.1 lukem 63 1.1 lukem smbk5pwd.la: smbk5pwd.lo 64 1.1.1.10 christos $(LIBTOOL) --mode=link $(CC) $(LD_FLAGS) -o $@ $? $(LIBS) 65 1.1.1.2 lukem 66 1.1.1.2 lukem clean: 67 1.1.1.4 tron rm -rf *.o *.lo *.la .libs 68 1.1.1.2 lukem 69 1.1.1.9 christos install: install-lib install-man FORCE 70 1.1.1.9 christos 71 1.1.1.9 christos install-lib: $(PROGRAMS) 72 1.1.1.2 lukem mkdir -p $(DESTDIR)$(moduledir) 73 1.1.1.4 tron for p in $(PROGRAMS) ; do \ 74 1.1.1.4 tron $(LIBTOOL) --mode=install cp $$p $(DESTDIR)$(moduledir) ; \ 75 1.1.1.4 tron done 76 1.1.1.4 tron 77 1.1.1.9 christos install-man: $(MANPAGES) 78 1.1.1.9 christos mkdir -p $(DESTDIR)$(man5dir) 79 1.1.1.9 christos $(INSTALL) -m 644 $(MANPAGES) $(DESTDIR)$(man5dir) 80 1.1.1.9 christos 81 1.1.1.9 christos FORCE: 82 1.1.1.9 christos 83