3 # Copyright (c) 1996-2001 Internet Software Consortium.
4 # Use is subject to license terms which appear in the file named
5 # ISC-LICENSE that should have accompanied this file when you
6 # received it. If a file named ISC-LICENSE did not accompany this
7 # file, or you are not sure the one you have is correct, you may
8 # obtain an applicable copy of the license at:
10 # http://www.isc.org/isc-license-1.0.html.
12 # This file is part of the ISC DHCP distribution. The documentation
13 # associated with this file is listed in the file DOCUMENTATION,
14 # included in the top-level directory of this release.
16 # Support and other services are available for ISC products - see
17 # http://www.isc.org for more information.
20 CATMANPAGES = omapi.cat3
21 SEDMANPAGES = omapi.man3
22 SRC = protocol.c buffer.c alloc.c result.c connection.c errwarn.c \
23 listener.c dispatch.c generic.c support.c handle.c message.c \
24 convert.c hash.c auth.c inet_addr.c array.c trace.c mrtrace.c \
27 OBJ = protocol.o buffer.o alloc.o result.o connection.o errwarn.o \
28 listener.o dispatch.o generic.o support.o handle.o message.o \
29 convert.o hash.o auth.o inet_addr.o array.o trace.o mrtrace.o \
34 INCLUDES = $(BINDINC) -I$(TOP)/includes
35 CFLAGS = $(DEBUG) $(PREDEFINES) $(INCLUDES) $(COPTS)
37 all: libomapi.a svtest $(CATMANPAGES)
39 svtest: test.o libomapi.a $(BINDLIB) ../dst/libdst.a
40 $(CC) $(DEBUG) $(LFLAGS) -o svtest test.o $(BINDLIB) \
41 libomapi.a ../dst/libdst.a $(LIBS)
45 ar cruv libomapi.a $(OBJ)
49 for dir in $(LIBDIR) $(LIBMANDIR) $(INCDIR)/omapip $(INCDIR)/isc-dhcp;\
52 for bar in `echo $(DESTDIR)$${dir} |tr / ' '`; do \
54 if [ ! -d $$foo ]; then \
60 $(INSTALL) libomapi.a $(DESTDIR)$(LIBDIR)
61 $(CHMOD) 644 $(DESTDIR)$(LIBDIR)/libomapi.a
62 for file in alloc.h buffer.h omapip.h; do \
63 $(INSTALL) $(TOP)/includes/omapip/$$file \
64 $(DESTDIR)$(INCDIR)/omapip; \
65 $(CHMOD) 644 $(DESTDIR)$(INCDIR)/omapip/$$file; \
67 for file in boolean.h dst.h int.h lang.h list.h result.h types.h; do \
68 $(INSTALL) $(TOP)/includes/isc-dhcp/$$file \
69 $(DESTDIR)$(INCDIR)/isc-dhcp; \
70 $(CHMOD) 644 $(DESTDIR)$(INCDIR)/isc-dhcp/$$file; \
72 for man in $(MAN); do \
73 prefix=`echo $$man |sed -e 's/\.[0-9]$$//'`; \
74 suffix=`echo $$man |sed -e 's/.*\.\([0-9]\)$$/\1/'`; \
75 $(MANINSTALL) $(MANFROM) $${prefix}.$(MANCAT)$${suffix} $(MANTO) \
76 $(DESTDIR)$(LIBMANDIR)/$${prefix}$(LIBMANEXT); \
80 $(MKDEP) $(INCLUDES) $(PREDEFINES) $(SRC)
83 -rm -f $(OBJ) test.o svtest
86 -rm -f libomapi.a *~ $(CATMANPAGES) $(SEDMANPAGES)
92 @for foo in $(SRC) $(MAN) test.c; do \
93 if [ ! -b $$foo ]; then \
96 ln -s $(TOP)/omapip/$$foo $$foo; \
99 omapi.cat3: omapi.man3
100 nroff -man omapi.man3 >omapi.cat3
103 sed -e "s#ETCDIR#$(ETC)#g" -e "s#DBDIR#$(VARDB)#g" \
104 -e "s#RUNDIR#$(VARRUN)#g" < omapi.3 >omapi.man3
106 # Dependencies (semi-automatically-generated)