2 ## Copyright 1998-2003 The OpenLDAP Foundation.
3 ## All rights reserved.
5 ## Redistribution and use in source and binary forms, with or without
6 ## modification, are permitted only as authorized by the OpenLDAP
9 ## A copy of this license is available in the file LICENSE in the
10 ## top-level directory of the distribution or, alternatively, at
11 ## <http://www.OpenLDAP.org/license.html>.
12 ##---------------------------------------------------------------------------
14 # Makefile Template for Server Modules
17 LIBRARY = $(LIBBASE).la
18 LIBSTAT = lib$(LIBBASE).a
27 all-no lint-no 5lint-no depend-no install-no: FORCE
28 @echo "run configure with $(BUILD_OPT) to make $(LIBBASE)"
30 all-common: all-$(BUILD_MOD)
34 $(MKVERSION) $(LIBBASE) > $@
36 version.lo: version.c $(OBJS)
38 $(LIBRARY): version.lo
39 $(LTLINK_MOD) -module -o $@ $(OBJS) version.lo $(LINK_LIBS)
41 $(LIBSTAT): version.lo
42 $(AR) ruv $@ `echo $(OBJS) | sed 's/\.lo/.o/g'` version.o
45 clean-common: clean-lib FORCE
46 veryclean-common: veryclean-lib FORCE
49 lint-common: lint-$(BUILD_MOD)
51 5lint-common: 5lint-$(BUILD_MOD)
53 depend-common: depend-$(BUILD_MOD)
55 install-common: install-$(BUILD_MOD)
58 all-mod: $(LIBRARY) all-local-mod FORCE
61 all-yes: $(LIBSTAT) all-local-lib FORCE
63 install-mod: $(LIBRARY)
64 @-$(MKDIR) $(DESTDIR)$(moduledir)
65 $(LTINSTALL) $(INSTALLFLAGS) -m 755 $(LIBRARY) $(DESTDIR)$(moduledir)
68 install-yes: install-local-lib FORCE
71 lint-yes lint-mod: lint-local-lib FORCE
72 $(LINT) $(DEFS) $(DEFINES) $(SRCS)
75 5lint-yes 5lint-mod: 5lint-local-lib FORCE
76 $(5LINT) $(DEFS) $(DEFINES) $(SRCS)
79 clean-lib: clean-local-lib FORCE
80 $(RM) $(LIBRARY) $(LIBSTAT) version.c *.o *.lo a.out core .libs/*
83 depend-yes depend-mod: depend-local-lib FORCE
84 $(MKDEP) $(DEFS) $(DEFINES) $(SRCS)
87 veryclean-lib: clean-lib veryclean-local-lib
89 Makefile: $(top_srcdir)/build/mod.mk