Home | History | Annotate | Line # | Download | only in acl
      1 # $OpenLDAP$
      2 
      3 LDAP_SRC = ../../..
      4 LDAP_BUILD = $(LDAP_SRC)
      5 LDAP_INC = -I$(LDAP_BUILD)/include -I$(LDAP_SRC)/include -I$(LDAP_SRC)/servers/slapd
      6 LDAP_LIB = $(LDAP_BUILD)/libraries/libldap/libldap.la \
      7 	$(LDAP_BUILD)/libraries/liblber/liblber.la
      8 
      9 PLAT = UNIX
     10 NT_LIB = -L$(LDAP_BUILD)/servers/slapd -lslapd
     11 NT_LDFLAGS = -no-undefined -avoid-version
     12 UNIX_LDFLAGS = -version-info $(LTVER)
     13 
     14 LIBTOOL = $(LDAP_BUILD)/libtool
     15 CC = gcc
     16 OPT = -g -O2
     17 DEFS = 
     18 INCS = $(LDAP_INC)
     19 LIBS = $($(PLAT)_LIB) $(LDAP_LIB)
     20 LD_FLAGS = $(LDFLAGS) $($(PLAT)_LDFLAGS) -rpath $(moduledir) -module
     21 
     22 PROGRAMS = posixgroup.la gssacl.la now.la
     23 LTVER = 0:0:0
     24 
     25 prefix=/usr/local
     26 exec_prefix=$(prefix)
     27 ldap_subdir=/openldap
     28 
     29 libdir=$(exec_prefix)/lib
     30 libexecdir=$(exec_prefix)/libexec
     31 moduledir = $(libexecdir)$(ldap_subdir)
     32 
     33 .SUFFIXES: .c .o .lo
     34 
     35 .c.lo:
     36 	$(LIBTOOL) --mode=compile $(CC) $(CFLAGS) $(OPT) $(CPPFLAGS) $(DEFS) $(INCS) -c $<
     37 
     38 all: $(PROGRAMS)
     39 
     40 posixgroup.la: posixgroup.lo
     41 	$(LIBTOOL) --mode=link $(CC) $(LD_FLAGS) -o $@ $? $(LIBS)
     42 
     43 gssacl.la: gssacl.lo
     44 	$(LIBTOOL) --mode=link $(CC) $(LD_FLAGS) -o $@ $? $(LIBS)
     45 
     46 now.la: now.lo
     47 	$(LIBTOOL) --mode=link $(CC) $(LD_FLAGS) -o $@ $? $(LIBS)
     48 
     49 clean:
     50 	rm -rf *.o *.lo *.la .libs
     51 
     52 install: $(PROGRAMS)
     53 	mkdir -p $(DESTDIR)$(moduledir)
     54 	for p in $(PROGRAMS) ; do \
     55 		$(LIBTOOL) --mode=install cp $$p $(DESTDIR)$(moduledir) ; \
     56 	done
     57 
     58