]> git.sur5r.net Git - openldap/blob - libraries/liblber/Make-template
Modified make system to support CVS instead of RCS
[openldap] / libraries / liblber / Make-template
1 #-----------------------------------------------------------------------------
2 # Copyright (c) 1990 Regents of the University of Michigan.
3 # All rights reserved.
4 #
5 # Redistribution and use in source and binary forms are permitted
6 # provided that this notice is preserved and that due credit is given
7 # to the University of Michigan at Ann Arbor. The name of the University
8 # may not be used to endorse or promote products derived from this
9 # software without specific prior written permission. This software
10 # is provided ``as is'' without express or implied warranty.
11 #
12 #       lightweight ber library makefile
13 #
14 #-----------------------------------------------------------------------------
15
16 LDAPSRC = ../..
17 SRCS    = decode.c encode.c io.c bprint.c
18 OBJS    = decode.o encode.o io.o bprint.o
19
20 HDIR    = ../../include
21
22 INCLUDES= -I$(HDIR)
23 DEFINES = $(DEFS)
24 CFLAGS  = $(INCLUDES) $(DEFINES) $(ACFLAGS)
25
26 all:    liblber.a
27
28 liblber.a:      version.o
29         $(AR) ruv $@ $(OBJS) version.o
30         @if [ ! -z "$(RANLIB)" ]; then \
31                 $(RANLIB) $@; \
32         fi; \
33         $(RM) ../$@; \
34         $(LN) liblber/$@ ../$@
35
36 idtest: idtest.o
37         $(CC) $(ALDFLAGS) -o $@ idtest.c $(ISODEINCLUDEFLAG) \
38                 $(KRBINCLUDEFLAG) $(ISODELIBFLAG) $(ISODELIBS) \
39                 $(KRBLIBLFAG) $(KRBLIBS) $(ALIBS)
40
41 etest:  liblber.a etest.o
42         $(CC) $(ALDFLAGS) -o $@ etest.o ./liblber.a $(ALIBS)
43
44 dtest:  liblber.a dtest.o
45         $(CC) $(ALDFLAGS) -o $@ dtest.o ./liblber.a $(ALIBS)
46
47 version.c: $(OBJS)
48         $(RM) $@
49         (u=$${USER-root} v=`$(CAT) ../../build/version` d=`$(PWD)` \
50         h=`$(HOSTNAME)` t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \
51         -e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \
52         -e "s|%VERSION%|$${v}|" \
53         < Version.c > $@)
54
55 install:        liblber.a FORCE
56         -$(MKDIR) -p $(LIBDIR)
57         $(INSTALL) $(INSTALLFLAGS) -m 644 liblber.a $(LIBDIR)
58         @if [ ! -z "$(RANLIB)" ]; then \
59                 (cd /tmp; $(RANLIB) $(LIBDIR)/liblber.a) \
60         fi
61
62 lint:   FORCE
63         $(LINT) $(INCLUDES) $(DEFINES) $(SRCS)
64
65 5lint:  FORCE
66         $(5LINT) $(INCLUDES) $(DEFINES) $(SRCS)
67
68 clean:  FORCE
69         $(RM) liblber.a ../liblber.a *.o core a.out version.c dtest etest idtest
70
71 depend: FORCE
72         $(MKDEP) $(INCLUDES) $(DEFINES) $(SRCS)
73
74 links:
75         @$(LN) .src/ldap* .src/*.[ch] .
76
77 # DO NOT DELETE THIS LINE -- mkdep uses it.
78 # DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
79
80 decode.o: decode.c ../../include/proto-lber.h
81 encode.o: encode.c ../../include/lber.h
82 io.o: io.c ../../include/proto-lber.h
83 bprint.o: bprint.c ../../include/proto-lber.h
84
85 # IF YOU PUT ANYTHING HERE IT WILL GO AWAY