]> git.sur5r.net Git - openldap/blob - build/mod.mk
Y2k copyright update
[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 LTFLAGS = --only-$(LINKAGE)
14
15 COMPILE = $(LIBTOOL) $(LTFLAGS) --mode=compile $(CC) $(CFLAGS) $(MODDEFS) -c
16 LTLIBLINK = $(LIBTOOL) $(LTFLAGS) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) \
17                 $(LTVERSION) $(LT_NO_UNDEF)
18
19 MKDEPFLAG = -l
20
21 .SUFFIXES: .c .o .lo
22
23 .c.lo:
24         $(COMPILE) $<
25
26 all-no lint-no 5lint-no depend-no install-no: FORCE
27         @echo "run configure with $(BUILD_OPT) to make $(LIBBASE)"
28
29 all-common: all-$(BUILD_MOD)
30
31 version.c: $(OBJS)
32         $(RM) $@
33         $(MKVERSION) $(LIBBASE) > $@
34
35 $(LIBRARY): $(MODDEPS) version.lo
36         $(LTLIBLINK) -module -rpath $(moduledir) -o $@ $(OBJS) version.lo \
37             $(MODLIBS)
38
39 $(LIBSTAT): version.lo
40         $(AR) ruv $@ `echo $(OBJS) | sed 's/\.lo/.o/g'` version.o
41         @$(RANLIB) $@
42
43 clean-common: clean-lib FORCE
44 veryclean-common: veryclean-lib FORCE
45
46
47 lint-common: lint-$(BUILD_MOD)
48
49 5lint-common: 5lint-$(BUILD_MOD)
50
51 depend-common: depend-$(BUILD_MOD)
52
53 install-common: install-$(BUILD_MOD)
54
55 all-local-mod:
56 all-mod: $(LIBRARY) all-local-mod FORCE
57
58 all-local-lib:
59 all-yes: $(LIBSTAT) all-local-lib FORCE
60
61 install-mod: $(LIBRARY)
62         @-$(MKDIR) $(DESTDIR)$(moduledir)
63         $(LTINSTALL) $(INSTALLFLAGS) -m 755 $(LIBRARY) $(DESTDIR)$(moduledir)
64
65 install-local-lib:
66 install-yes: install-local-lib FORCE
67
68 lint-local-lib:
69 lint-yes lint-mod: lint-local-lib FORCE
70         $(LINT) $(DEFS) $(DEFINES) $(SRCS)
71
72 5lint-local-lib:
73 5lint-yes 5lint-mod: 5lint-local-lib FORCE
74         $(5LINT) $(DEFS) $(DEFINES) $(SRCS)
75
76 clean-local-lib:
77 clean-lib:      clean-local-lib FORCE
78         $(RM) $(LIBRARY) $(LIBSTAT) version.c *.o *.lo a.out core .libs/*
79
80 depend-local-lib:
81 depend-yes depend-mod: depend-local-lib FORCE
82         $(MKDEP) $(DEFS) $(DEFINES) $(SRCS)
83
84 veryclean-local-lib:
85 veryclean-lib:  clean-lib veryclean-local-lib
86
87 Makefile: $(top_srcdir)/build/mod.mk
88