1 #-----------------------------------------------------------------------------
2 # Copyright (c) 1990 Regents of the University of Michigan.
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.
12 # lightweight ber library makefile
14 #-----------------------------------------------------------------------------
17 SRCS = decode.c encode.c io.c bprint.c
18 OBJS = decode.o encode.o io.o bprint.o
24 CFLAGS = $(INCLUDES) $(DEFINES) $(ACFLAGS)
29 $(AR) ruv $@ $(OBJS) version.o
30 @if [ ! -z "$(RANLIB)" ]; then \
34 $(LN) liblber/$@ ../$@
37 $(CC) $(ALDFLAGS) -o $@ idtest.c $(ISODEINCLUDEFLAG) \
38 $(KRBINCLUDEFLAG) $(ISODELIBFLAG) $(ISODELIBS) \
39 $(KRBLIBLFAG) $(KRBLIBS) $(ALIBS)
41 etest: liblber.a etest.o
42 $(CC) $(ALDFLAGS) -o $@ etest.o ./liblber.a $(ALIBS)
44 dtest: liblber.a dtest.o
45 $(CC) $(ALDFLAGS) -o $@ dtest.o ./liblber.a $(ALIBS)
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}|" \
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) \
63 $(LINT) $(INCLUDES) $(DEFINES) $(SRCS)
66 $(5LINT) $(INCLUDES) $(DEFINES) $(SRCS)
69 $(RM) liblber.a ../liblber.a *.o core a.out version.c dtest etest idtest
72 $(MKDEP) $(INCLUDES) $(DEFINES) $(SRCS)
75 @$(LN) .src/ldap* .src/*.[ch] .
77 # DO NOT DELETE THIS LINE -- mkdep uses it.
78 # DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
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
85 # IF YOU PUT ANYTHING HERE IT WILL GO AWAY