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