]> git.sur5r.net Git - openldap/blob - build/mod.mk
Tweak version.c dependencies
[openldap] / build / mod.mk
1 # $OpenLDAP$
2 ## Copyright 1998-2003 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: Makefile
26         $(RM) $@
27         $(MKVERSION) $(LIBBASE) > $@
28
29 version.o: version.c $(OBJS)
30
31 $(LIBRARY): version.lo
32         $(LTLINK_MOD) -module -o $@ $(OBJS) version.lo $(LINK_LIBS)
33
34 $(LIBSTAT): version.lo
35         $(AR) ruv $@ `echo $(OBJS) | sed 's/\.lo/.o/g'` version.o
36         @$(RANLIB) $@
37
38 clean-common: clean-lib FORCE
39 veryclean-common: veryclean-lib FORCE
40
41
42 lint-common: lint-$(BUILD_MOD)
43
44 5lint-common: 5lint-$(BUILD_MOD)
45
46 depend-common: depend-$(BUILD_MOD)
47
48 install-common: install-$(BUILD_MOD)
49
50 all-local-mod:
51 all-mod: $(LIBRARY) all-local-mod FORCE
52
53 all-local-lib:
54 all-yes: $(LIBSTAT) all-local-lib FORCE
55
56 install-mod: $(LIBRARY)
57         @-$(MKDIR) $(DESTDIR)$(moduledir)
58         $(LTINSTALL) $(INSTALLFLAGS) -m 755 $(LIBRARY) $(DESTDIR)$(moduledir)
59
60 install-local-lib:
61 install-yes: install-local-lib FORCE
62
63 lint-local-lib:
64 lint-yes lint-mod: lint-local-lib FORCE
65         $(LINT) $(DEFS) $(DEFINES) $(SRCS)
66
67 5lint-local-lib:
68 5lint-yes 5lint-mod: 5lint-local-lib FORCE
69         $(5LINT) $(DEFS) $(DEFINES) $(SRCS)
70
71 clean-local-lib:
72 clean-lib:      clean-local-lib FORCE
73         $(RM) $(LIBRARY) $(LIBSTAT) version.c *.o *.lo a.out core .libs/*
74
75 depend-local-lib:
76 depend-yes depend-mod: depend-local-lib FORCE
77         $(MKDEP) $(DEFS) $(DEFINES) $(SRCS)
78
79 veryclean-local-lib:
80 veryclean-lib:  clean-lib veryclean-local-lib
81
82 Makefile: $(top_srcdir)/build/mod.mk
83