Makefile 990 Bytes
Newer Older
1
# $OpenLDAP$
2

3
LDAP_SRC = ../../..
4
LDAP_BUILD = $(LDAP_SRC)
5
6
7
8
9
10
11
12
13
14
15
16
17
LDAP_INC = -I$(LDAP_BUILD)/include -I$(LDAP_SRC)/include -I$(LDAP_SRC)/servers/slapd
LDAP_LIB = $(LDAP_BUILD)/libraries/libldap_r/libldap_r.la \
	$(LDAP_BUILD)/libraries/liblber/liblber.la

LIBTOOL = $(LDAP_BUILD)/libtool
CC = gcc
OPT = -g -O2 -Wall
DEFS = 
INCS = $(LDAP_INC)
LIBS = $(LDAP_LIB)

PROGRAMS = autogroup.la
LTVER = 0:0:0
18

19
prefix=/usr/local
20
21
22
23
24
25
exec_prefix=$(prefix)
ldap_subdir=/openldap

libdir=$(exec_prefix)/lib
libexecdir=$(exec_prefix)/libexec
moduledir = $(libexecdir)$(ldap_subdir)
26

27
.SUFFIXES: .c .o .lo
28

29
30
.c.lo:
	$(LIBTOOL) --mode=compile $(CC) $(OPT) $(DEFS) $(INCS) -c $<
Emmanuel Dreyfus's avatar
Emmanuel Dreyfus committed
31

32
33
34
35
all: $(PROGRAMS)

autogroup.la: autogroup.lo
	$(LIBTOOL) --mode=link $(CC) $(OPT) -version-info $(LTVER) \
36
	-rpath $(libdir) -module -o $@ $? $(LIBS)
37
38

clean:
39
	rm -rf *.o *.lo *.la .libs
Emmanuel Dreyfus's avatar
Emmanuel Dreyfus committed
40

41
install: $(PROGRAMS)
42
	mkdir -p $(DESTDIR)$(moduledir)
43
44
45
46
	for p in $(PROGRAMS) ; do \
		$(LIBTOOL) --mode=install cp $$p $(DESTDIR)$(moduledir) ; \
	done