]> git.sur5r.net Git - openldap/blob - build/mod.mk
NT updates from jon@symas.com.
[openldap] / build / mod.mk
1 # $OpenLDAP$
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 ##---------------------------------------------------------------------------
6 ##
7 ## Makefile Template for Server Modules
8 ##
9
10 LIBRARY = $(LIBBASE).la
11 LIBSTAT = lib$(LIBBASE).a
12
13 MKDEPFLAG = -l
14
15 .SUFFIXES: .c .o .lo
16
17 .c.lo:
18         $(LTCOMPILE_MOD) $<
19
20 all-no lint-no 5lint-no depend-no install-no: FORCE
21         @echo "run configure with $(BUILD_OPT) to make $(LIBBASE)"
22
23 all-common: all-$(BUILD_MOD)
24
25 version.c: $(OBJS)
26         $(RM) $@
27         $(MKVERSION) $(LIBBASE) > $@
28
29 $(LIBRARY): version.lo
30         $(LTLINK_MOD) -module -o $@ $(OBJS) version.lo $(LINK_LIBS)
31
32 $(LIBSTAT): version.lo
33         $(AR) ruv $@ `echo $(OBJS) | sed 's/\.lo/.o/g'` version.o
34         @$(RANLIB) $@
35
36 clean-common: clean-lib FORCE
37 veryclean-common: veryclean-lib FORCE
38
39
40 lint-common: lint-$(BUILD_MOD)
41
42 5lint-common: 5lint-$(BUILD_MOD)
43
44 depend-common: depend-$(BUILD_MOD)
45
46 install-common: install-$(BUILD_MOD)
47
48 all-local-mod:
49 all-mod: $(LIBRARY) all-local-mod FORCE
50
51 all-local-lib:
52 all-yes: $(LIBSTAT) all-local-lib FORCE
53
54 install-mod: $(LIBRARY)
55         @-$(MKDIR) $(DESTDIR)$(moduledir)
56         $(LTINSTALL) $(INSTALLFLAGS) -m 755 $(LIBRARY) $(DESTDIR)$(moduledir)
57
58 install-local-lib:
59 install-yes: install-local-lib FORCE
60
61 lint-local-lib:
62 lint-yes lint-mod: lint-local-lib FORCE
63         $(LINT) $(DEFS) $(DEFINES) $(SRCS)
64
65 5lint-local-lib:
66 5lint-yes 5lint-mod: 5lint-local-lib FORCE
67         $(5LINT) $(DEFS) $(DEFINES) $(SRCS)
68
69 clean-local-lib:
70 clean-lib:      clean-local-lib FORCE
71         $(RM) $(LIBRARY) $(LIBSTAT) version.c *.o *.lo a.out core .libs/*
72
73 depend-local-lib:
74 depend-yes depend-mod: depend-local-lib FORCE
75         $(MKDEP) $(DEFS) $(DEFINES) $(SRCS)
76
77 veryclean-local-lib:
78 veryclean-lib:  clean-lib veryclean-local-lib
79
80 Makefile: $(top_srcdir)/build/mod.mk
81