]> git.sur5r.net Git - openldap/blob - build/lib.mk
Fixed make clean/install for everything but man pages.
[openldap] / build / lib.mk
1 ##---------------------------------------------------------------------------
2 ##
3 ## Makefile Template for Libraries
4 ##
5
6 all-common: $(LIBRARY) $(PROGRAMS)
7
8 $(LIBRARY): version.o
9         $(AR) ru $@ $(OBJS) version.o
10         @$(RANLIB) $@;  \
11         $(RM) ../$@;    \
12         (d=`$(PWD)` ; $(LN_S) `$(BASENAME) $$d`/$@ ../$@)
13
14 version.c: $(OBJS)
15         $(RM) $@
16         (u=$${USER-root} v=`$(CAT) $(VERSIONFILE)` d=`$(PWD)` \
17         h=`$(HOSTNAME)` t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \
18         -e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \
19         -e "s|%VERSION%|$${v}|" \
20         < Version.c > $@)
21
22 install-common: all-common install-local
23
24 lint: lint-local FORCE
25         $(LINT) $(DEFS) $(DEFINES) $(SRCS)
26
27 lint5: lint5-local FORCE
28         $(5LINT) $(DEFS) $(DEFINES) $(SRCS)
29
30 clean-common:   clean-local
31         $(RM) $(LIBRARY) ../$(LIBRARY) $(PROGRAMS) $(XPROGRAMS) $(XSRCS) \
32                 *.o a.out core version.c
33
34 depend-common: depend-local
35         $(MKDEP) $(DEFS) $(DEFINES) $(SRCS)
36
37 veryclean-common: veryclean-local clean-common
38
39 lint-local: FORCE
40 lint5-local: FORCE