Home | History | Annotate | Line # | Download | only in nops
Makefile revision 1.1.1.3.10.1
      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_r/libldap_r.la \
      7 	$(LDAP_BUILD)/libraries/liblber/liblber.la
      8 
      9 LIBTOOL = $(LDAP_BUILD)/libtool
     10 CC = gcc
     11 OPT = -g -O2 -Wall
     12 DEFS = -DSLAPD_OVER_NOPS=SLAPD_MOD_DYNAMIC
     13 INCS = $(LDAP_INC)
     14 LIBS = $(LDAP_LIB)
     15 
     16 PROGRAMS = nops.la
     17 LTVER = 0:0:0
     18 
     19 prefix=/usr/local
     20 exec_prefix=$(prefix)
     21 ldap_subdir=/openldap
     22 
     23 libdir=$(exec_prefix)/lib
     24 libexecdir=$(exec_prefix)/libexec
     25 moduledir = $(libexecdir)$(ldap_subdir)
     26 
     27 .SUFFIXES: .c .o .lo
     28 
     29 .c.lo:
     30 	$(LIBTOOL) --mode=compile $(CC) $(OPT) $(DEFS) $(INCS) -c $<
     31 
     32 all: $(PROGRAMS)
     33 
     34 nops.la: nops.lo
     35 	$(LIBTOOL) --mode=link $(CC) $(OPT) -version-info $(LTVER) \
     36 	-rpath $(moduledir) -module -o $@ $? $(LIBS)
     37 
     38 clean:
     39 	rm -rf *.o *.lo *.la .libs
     40 
     41 install: $(PROGRAMS)
     42 	mkdir -p $(DESTDIR)$(moduledir)
     43 	for p in $(PROGRAMS) ; do \
     44 		$(LIBTOOL) --mode=install cp $$p $(DESTDIR)$(moduledir) ; \
     45 	done
     46 
     47