3 # Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
4 # Copyright (c) 1996-2003 by Internet Software Consortium
6 # Permission to use, copy, modify, and distribute this software for any
7 # purpose with or without fee is hereby granted, provided that the above
8 # copyright notice and this permission notice appear in all copies.
10 # THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
11 # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12 # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
13 # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14 # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15 # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
16 # OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
18 # Internet Systems Consortium, Inc.
20 # Redwood City, CA 94063
25 CATMANPAGES = omapi.cat3
26 SEDMANPAGES = omapi.man3
27 SRC = protocol.c buffer.c alloc.c result.c connection.c errwarn.c \
28 listener.c dispatch.c generic.c support.c handle.c message.c \
29 convert.c hash.c auth.c inet_addr.c array.c trace.c mrtrace.c \
32 OBJ = protocol.o buffer.o alloc.o result.o connection.o errwarn.o \
33 listener.o dispatch.o generic.o support.o handle.o message.o \
34 convert.o hash.o auth.o inet_addr.o array.o trace.o mrtrace.o \
36 # XXX: iscprint.o above is a kludge.
40 INCLUDES = $(BINDINC) -I$(TOP)/includes
41 CFLAGS = $(DEBUG) $(PREDEFINES) $(INCLUDES) $(COPTS)
43 all: libomapi.a svtest $(CATMANPAGES)
45 svtest: test.o libomapi.a $(BINDLIB) ../dst/libdst.a
46 $(CC) $(DEBUG) $(LFLAGS) -o svtest test.o $(BINDLIB) \
47 libomapi.a ../dst/libdst.a $(LIBS)
51 ar cruv libomapi.a $(OBJ)
55 for dir in $(LIBDIR) $(LIBMANDIR) $(INCDIR)/omapip $(INCDIR)/isc-dhcp;\
58 for bar in `echo $(DESTDIR)$${dir} |tr / ' '`; do \
60 if [ ! -d $$foo ]; then \
66 $(INSTALL) libomapi.a $(DESTDIR)$(LIBDIR)
67 $(CHMOD) 644 $(DESTDIR)$(LIBDIR)/libomapi.a
68 for file in alloc.h buffer.h omapip.h; do \
69 $(INSTALL) $(TOP)/includes/omapip/$$file \
70 $(DESTDIR)$(INCDIR)/omapip; \
71 $(CHMOD) 644 $(DESTDIR)$(INCDIR)/omapip/$$file; \
73 for file in boolean.h dst.h int.h lang.h list.h result.h types.h; do \
74 $(INSTALL) $(TOP)/includes/isc-dhcp/$$file \
75 $(DESTDIR)$(INCDIR)/isc-dhcp; \
76 $(CHMOD) 644 $(DESTDIR)$(INCDIR)/isc-dhcp/$$file; \
78 for man in $(MAN); do \
79 prefix=`echo $$man |sed -e 's/\.[0-9]$$//'`; \
80 suffix=`echo $$man |sed -e 's/.*\.\([0-9]\)$$/\1/'`; \
81 $(MANINSTALL) $(MANFROM) $${prefix}.$(MANCAT)$${suffix} $(MANTO) \
82 $(DESTDIR)$(LIBMANDIR)/$${prefix}$(LIBMANEXT); \
86 $(MKDEP) $(INCLUDES) $(PREDEFINES) $(SRC)
89 -rm -f $(OBJ) test.o svtest
92 -rm -f libomapi.a *~ $(CATMANPAGES) $(SEDMANPAGES)
98 @for foo in $(SRC) $(MAN) test.c; do \
99 if [ ! -b $$foo ]; then \
102 ln -s $(TOP)/omapip/$$foo $$foo; \
105 omapi.cat3: omapi.man3
106 nroff -man omapi.man3 >omapi.cat3
109 sed -e "s#ETCDIR#$(ETC)#g" -e "s#DBDIR#$(VARDB)#g" \
110 -e "s#RUNDIR#$(VARRUN)#g" < omapi.3 >omapi.man3
112 # Dependencies (semi-automatically-generated)