2 ## Copyright 1998-2000 The OpenLDAP Foundation
3 ## COPYING RESTRICTIONS APPLY. See COPYRIGHT File in top level directory
4 ## of this package for details.
5 ##---------------------------------------------------------------------------
7 ## Makefile Template for Server Modules
10 LIBRARY = $(LIBBASE).la
11 LIBSTAT = lib$(LIBBASE).a
13 LTFLAGS = --only-$(LINKAGE)
15 COMPILE = $(LIBTOOL) $(LTFLAGS) --mode=compile $(CC) $(CFLAGS) $(MODDEFS) -c
16 LTLIBLINK = $(LIBTOOL) $(LTFLAGS) --mode=link $(CC) -rpath $(moduledir) \
17 $(CFLAGS) $(LDFLAGS) $(LTVERSION) $(LT_NO_UNDEF)
26 all-no lint-no 5lint-no depend-no install-no: FORCE
27 @echo "run configure with $(BUILD_OPT) to make $(LIBBASE)"
29 all-common: all-$(BUILD_MOD)
33 $(MKVERSION) $(LIBBASE) > $@
35 $(LIBRARY): $(MODDEPS) version.lo
36 $(LTLIBLINK) -module -o $@ $(OBJS) version.lo \
39 $(LIBSTAT): version.lo
40 $(AR) ruv $@ `echo $(OBJS) | sed 's/\.lo/.o/g'` version.o
43 clean-common: clean-lib FORCE
44 veryclean-common: veryclean-lib FORCE
47 lint-common: lint-$(BUILD_MOD)
49 5lint-common: 5lint-$(BUILD_MOD)
51 depend-common: depend-$(BUILD_MOD)
53 install-common: install-$(BUILD_MOD)
56 all-mod: $(LIBRARY) all-local-mod FORCE
59 all-yes: $(LIBSTAT) all-local-lib FORCE
61 install-mod: $(LIBRARY)
62 @-$(MKDIR) $(DESTDIR)$(moduledir)
63 $(LTINSTALL) $(INSTALLFLAGS) -m 755 $(LIBRARY) $(DESTDIR)$(moduledir)
66 install-yes: install-local-lib FORCE
69 lint-yes lint-mod: lint-local-lib FORCE
70 $(LINT) $(DEFS) $(DEFINES) $(SRCS)
73 5lint-yes 5lint-mod: 5lint-local-lib FORCE
74 $(5LINT) $(DEFS) $(DEFINES) $(SRCS)
77 clean-lib: clean-local-lib FORCE
78 $(RM) $(LIBRARY) $(LIBSTAT) version.c *.o *.lo a.out core .libs/*
81 depend-yes depend-mod: depend-local-lib FORCE
82 $(MKDEP) $(DEFS) $(DEFINES) $(SRCS)
85 veryclean-lib: clean-lib veryclean-local-lib
87 Makefile: $(top_srcdir)/build/mod.mk