2 ## Copyright 1998,1999 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
12 LTFLAGS = --only-$(LINKAGE)
14 all-no lint-no 5lint-no depend-no install-no: FORCE
15 @echo "run configure with $(BUILD_OPT) to make $(LIBBASE)"
17 all-common: all-$(BUILD_MOD)
21 $(MKVERSION) $(LIBBASE) > $@
23 $(LIBRARY): version.lo
24 $(LTLIBLINK) -module -rpath $(moduledir) -o $@ $(OBJS) version.lo $(MODLIBS)
26 $(LIBSTAT): version.lo
27 $(AR) ruv $@ `echo $(OBJS) | sed 's/\.lo/.o/g'` version.o
30 clean-common: clean-lib FORCE
31 veryclean-common: veryclean-lib FORCE
34 lint-common: lint-$(BUILD_MOD)
36 5lint-common: 5lint-$(BUILD_MOD)
38 depend-common: depend-$(BUILD_MOD)
40 install-common: install-$(BUILD_MOD)
43 all-mod: $(LIBRARY) all-local-mod FORCE
46 all-yes: $(LIBSTAT) all-local-lib FORCE
48 install-mod: $(LIBRARY)
49 @-$(MKDIR) $(DESTDIR)$(moduledir)
50 $(LTINSTALL) $(INSTALLFLAGS) -m 755 $(LIBRARY) $(DESTDIR)$(moduledir)
53 install-yes: install-local-lib FORCE
56 lint-yes lint-mod: lint-local-lib FORCE
57 $(LINT) $(DEFS) $(DEFINES) $(SRCS)
60 5lint-yes 5lint-mod: 5lint-local-lib FORCE
61 $(5LINT) $(DEFS) $(DEFINES) $(SRCS)
64 clean-lib: clean-local-lib FORCE
65 $(RM) $(LIBRARY) $(LIBSTAT) version.c *.o *.lo a.out core .libs/*
68 depend-yes depend-mod: depend-local-lib FORCE
69 $(MKDEP) $(DEFS) $(DEFINES) $(SRCS)
72 veryclean-lib: clean-lib veryclean-local-lib
74 COMPILE = $(LIBTOOL) $(LTFLAGS) --mode=compile $(CC) $(CFLAGS) -c
82 Makefile: $(top_srcdir)/build/mod.mk