Home | History | Annotate | Line # | Download | only in samba4
Makefile revision 1.1
      1  1.1  adam # OpenLDAP: pkg/ldap/contrib/slapd-modules/samba4/Makefile,v 1.3.2.3 2010/06/10 17:44:02 quanah Exp
      2  1.1  adam # This work is part of OpenLDAP Software <http://www.openldap.org/>.
      3  1.1  adam #
      4  1.1  adam # Copyright 1998-2010 The OpenLDAP Foundation.
      5  1.1  adam # Copyright 2004 Howard Chu, Symas Corp. All Rights Reserved.
      6  1.1  adam #
      7  1.1  adam # Redistribution and use in source and binary forms, with or without
      8  1.1  adam # modification, are permitted only as authorized by the OpenLDAP
      9  1.1  adam # Public License.
     10  1.1  adam #
     11  1.1  adam # A copy of this license is available in the file LICENSE in the
     12  1.1  adam # top-level directory of the distribution or, alternatively, at
     13  1.1  adam # <http://www.OpenLDAP.org/license.html>.
     14  1.1  adam 
     15  1.1  adam LDAP_SRC=../../..
     16  1.1  adam # craft according to your installation
     17  1.1  adam LDAP_BUILD=../../..
     18  1.1  adam 
     19  1.1  adam LIBTOOL=$(LDAP_BUILD)/libtool
     20  1.1  adam OPT=-g -O2
     21  1.1  adam CC=gcc
     22  1.1  adam 
     23  1.1  adam DEFS=-DSLAPD_OVER_RDNVAL=2 -DSLAPD_OVER_PGUID=2 -DSLAPD_OVER_VERNUM=2
     24  1.1  adam 
     25  1.1  adam LDAP_INC=-I$(LDAP_SRC)/include -I$(LDAP_SRC)/servers/slapd \
     26  1.1  adam 	-I$(LDAP_BUILD)/include
     27  1.1  adam INCS=$(LDAP_INC)
     28  1.1  adam 
     29  1.1  adam LDAP_LIB=-lldap_r -llber
     30  1.1  adam LIBS=$(LDAP_LIB)
     31  1.1  adam 
     32  1.1  adam prefix=/usr/local
     33  1.1  adam exec_prefix=$(prefix)
     34  1.1  adam ldap_subdir=/openldap
     35  1.1  adam 
     36  1.1  adam libdir=$(exec_prefix)/lib
     37  1.1  adam libexecdir=$(exec_prefix)/libexec
     38  1.1  adam moduledir = $(libexecdir)$(ldap_subdir)
     39  1.1  adam 
     40  1.1  adam PROGRAMS = pguid.la rdnval.la vernum.la
     41  1.1  adam 
     42  1.1  adam all:	$(PROGRAMS)
     43  1.1  adam 
     44  1.1  adam pguid.lo:	pguid.c
     45  1.1  adam 	$(LIBTOOL) --mode=compile $(CC) $(OPT) $(DEFS) $(INCS) -c $?
     46  1.1  adam 
     47  1.1  adam pguid.la:	pguid.lo
     48  1.1  adam 	$(LIBTOOL) --mode=link $(CC) $(OPT) -version-info 0:0:0 \
     49  1.1  adam 	-rpath $(moduledir) -module -o $@ $? $(LIBS)
     50  1.1  adam 
     51  1.1  adam rdnval.lo:	rdnval.c
     52  1.1  adam 	$(LIBTOOL) --mode=compile $(CC) $(OPT) $(DEFS) $(INCS) -c $?
     53  1.1  adam 
     54  1.1  adam rdnval.la:	rdnval.lo
     55  1.1  adam 	$(LIBTOOL) --mode=link $(CC) $(OPT) -version-info 0:0:0 \
     56  1.1  adam 	-rpath $(moduledir) -module -o $@ $? $(LIBS)
     57  1.1  adam 
     58  1.1  adam vernum.lo:	vernum.c
     59  1.1  adam 	$(LIBTOOL) --mode=compile $(CC) $(OPT) $(DEFS) $(INCS) -c $?
     60  1.1  adam 
     61  1.1  adam vernum.la:	vernum.lo
     62  1.1  adam 	$(LIBTOOL) --mode=link $(CC) $(OPT) -version-info 0:0:0 \
     63  1.1  adam 	-rpath $(moduledir) -module -o $@ $? $(LIBS)
     64  1.1  adam 
     65  1.1  adam clean:
     66  1.1  adam 	rm -f \
     67  1.1  adam 		pguid.o pguid.lo pguid.la \
     68  1.1  adam 		rdnval.o rdnval.lo rdnval.la \
     69  1.1  adam 		vernum.o vernum.lo vernum.la
     70  1.1  adam 
     71  1.1  adam install: $(PROGRAMS)
     72  1.1  adam 	mkdir -p $(DESTDIR)$(moduledir)
     73  1.1  adam 	for p in $(PROGRAMS) ; do \
     74  1.1  adam 		$(LIBTOOL) --mode=install cp $$p $(DESTDIR)$(moduledir) ; \
     75  1.1  adam 	done
     76  1.1  adam 
     77