]> git.sur5r.net Git - openldap/blob - build/mod.mk
Ready for release
[openldap] / build / mod.mk
1 # $OpenLDAP$
2 ## Copyright 1998-2003 The OpenLDAP Foundation.
3 ## All rights reserved.
4 ##
5 ## Redistribution and use in source and binary forms, with or without
6 ## modification, are permitted only as authorized by the OpenLDAP
7 ## Public License.
8 ##
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 ##---------------------------------------------------------------------------
13 #
14 # Makefile Template for Server Modules
15 #
16
17 LIBRARY = $(LIBBASE).la
18 LIBSTAT = lib$(LIBBASE).a
19
20 MKDEPFLAG = -l
21
22 .SUFFIXES: .c .o .lo
23
24 .c.lo:
25         $(LTCOMPILE_MOD) $<
26
27 all-no lint-no 5lint-no depend-no install-no: FORCE
28         @echo "run configure with $(BUILD_OPT) to make $(LIBBASE)"
29
30 all-common: all-$(BUILD_MOD)
31
32 version.c: Makefile
33         $(RM) $@
34         $(MKVERSION) $(LIBBASE) > $@
35
36 version.lo: version.c $(OBJS)
37
38 $(LIBRARY): version.lo
39         $(LTLINK_MOD) -module -o $@ $(OBJS) version.lo $(LINK_LIBS)
40
41 $(LIBSTAT): version.lo
42         $(AR) ruv $@ `echo $(OBJS) | sed 's/\.lo/.o/g'` version.o
43         @$(RANLIB) $@
44
45 clean-common: clean-lib FORCE
46 veryclean-common: veryclean-lib FORCE
47
48
49 lint-common: lint-$(BUILD_MOD)
50
51 5lint-common: 5lint-$(BUILD_MOD)
52
53 depend-common: depend-$(BUILD_MOD)
54
55 install-common: install-$(BUILD_MOD)
56
57 all-local-mod:
58 all-mod: $(LIBRARY) all-local-mod FORCE
59
60 all-local-lib:
61 all-yes: $(LIBSTAT) all-local-lib FORCE
62
63 install-mod: $(LIBRARY)
64         @-$(MKDIR) $(DESTDIR)$(moduledir)
65         $(LTINSTALL) $(INSTALLFLAGS) -m 755 $(LIBRARY) $(DESTDIR)$(moduledir)
66
67 install-local-lib:
68 install-yes: install-local-lib FORCE
69
70 lint-local-lib:
71 lint-yes lint-mod: lint-local-lib FORCE
72         $(LINT) $(DEFS) $(DEFINES) $(SRCS)
73
74 5lint-local-lib:
75 5lint-yes 5lint-mod: 5lint-local-lib FORCE
76         $(5LINT) $(DEFS) $(DEFINES) $(SRCS)
77
78 clean-local-lib:
79 clean-lib:      clean-local-lib FORCE
80         $(RM) $(LIBRARY) $(LIBSTAT) version.c *.o *.lo a.out core .libs/*
81
82 depend-local-lib:
83 depend-yes depend-mod: depend-local-lib FORCE
84         $(MKDEP) $(DEFS) $(DEFINES) $(SRCS)
85
86 veryclean-local-lib:
87 veryclean-lib:  clean-lib veryclean-local-lib
88
89 Makefile: $(top_srcdir)/build/mod.mk
90