1 ## Copyright 1998,1999 The OpenLDAP Foundation
2 ## COPYING RESTRICTIONS APPLY. See COPYRIGHT File in top level directory
3 ## of this package for details.
4 ##---------------------------------------------------------------------------
6 ## Makefile Template for Server Modules
9 LIBRARY = $(LIBBASE).la
10 LIBSTAT = lib$(LIBBASE).a
11 LTFLAGS = --only-$(LINKAGE)
13 all-no lint-no 5lint-no depend-no install-no: FORCE
14 @echo "run configure with $(BUILD_OPT) to make $(LIBBASE)"
16 all-common: all-$(BUILD_MOD)
20 $(MKVERSION) $(LIBBASE) > $@
22 $(LIBRARY): version.lo
23 $(LTLIBLINK) -module -rpath $(moduledir) -o $@ $(OBJS) version.lo
25 $(LIBSTAT): version.lo
26 $(AR) ruv $@ `echo $(OBJS) | sed 's/\.lo/.o/g'` version.o
29 clean-common: clean-lib FORCE
30 veryclean-common: veryclean-lib FORCE
33 lint-common: lint-$(BUILD_MOD)
35 5lint-common: 5lint-$(BUILD_MOD)
37 depend-common: depend-$(BUILD_MOD)
39 install-common: install-$(BUILD_MOD)
42 all-mod: $(LIBRARY) all-local-mod FORCE
45 all-yes: $(LIBSTAT) all-local-lib FORCE
47 install-mod: $(LIBRARY)
48 @-$(MKDIR) $(moduledir)
49 $(LTINSTALL) $(INSTALLFLAGS) -m 755 $(LIBRARY) $(moduledir)
52 install-yes: install-local-lib FORCE
55 lint-yes lint-mod: lint-local-lib FORCE
56 $(LINT) $(DEFS) $(DEFINES) $(SRCS)
59 5lint-yes 5lint-mod: 5lint-local-lib FORCE
60 $(5LINT) $(DEFS) $(DEFINES) $(SRCS)
63 clean-lib: clean-local-lib FORCE
64 $(RM) $(LIBRARY) $(LIBSTAT) version.c *.o *.lo a.out core .libs/*
67 depend-yes depend-mod: depend-local-lib FORCE
68 $(MKDEP) $(DEFS) $(DEFINES) $(SRCS)
71 veryclean-lib: clean-lib veryclean-local-lib
73 COMPILE = $(LIBTOOL) $(LTFLAGS) --mode=compile $(CC) $(CFLAGS) -c
81 Makefile: $(top_srcdir)/build/mod.mk