]> git.sur5r.net Git - openldap/blob - libraries/liblthread/Make-template
Add Reader/Writer Locks to library
[openldap] / libraries / liblthread / Make-template
1 #-----------------------------------------------------------------------------
2 # Copyright (c) 1995 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 #       lthreads library makefile
13 #
14 #-----------------------------------------------------------------------------
15
16 LDAPSRC = ../..
17
18 SRCS    = rdwr.c thread.c stack.c
19 OBJS    = rdwr.o thread.o stack.o
20
21 HDIR    = ../../include
22
23 INCLUDES= -I$(HDIR)
24 DEFINES = $(DEFS) $(THREADS)
25
26 CFLAGS  = $(INCLUDES) $(THREADSINCLUDE) $(DEFINES) $(ACFLAGS)
27
28 all:    liblthread.a
29
30 liblthread.a:   version.o
31         $(AR) ruv $@ $(OBJS) version.o
32         @if [ ! -z "$(RANLIB)" ]; then \
33                 $(RANLIB) $@; \
34         fi; \
35         $(RM) ../$@; \
36         $(LN) liblthread/$@ ../$@
37
38 version.c:      $(OBJS)
39         $(RM) $@
40         (u=$${USER-root} v=`$(CAT) ../../build/version` d=`$(PWD)` \
41         h=`$(HOSTNAME)` t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \
42         -e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \
43         -e "s|%VERSION%|$${v}|" \
44         < Version.c > $@)
45
46 install:        all
47
48 lint:   FORCE
49         $(LINT) $(INCLUDES) $(DEFINES) $(SRCS)
50
51 5lint:  FORCE
52         $(5LINT) $(INCLUDES) $(DEFINES) $(SRCS)
53
54 clean:  FORCE
55         $(RM) liblthread.a ../liblthread.a *.o core a.out version.c
56
57 depend: FORCE
58         $(MKDEP) $(INCLUDES) $(DEFINES) $(SRCS)
59
60 links:
61         @$(LN) .src/*.[ch] .
62