3065 some functions in the tcp module can be static
[unleashed.git] / usr / src / cmd / man / src / util / instant.src / tptregexp / Makefile
blobb677158fbb2fd0267bad8f63e5f5ea439444c56d
2 #pragma ident "%Z%%M% %I% %E% SMI"
5 # Copyright (c) 1994
6 # Open Software Foundation, Inc.
7 #
8 # Permission is hereby granted to use, copy, modify and freely distribute
9 # the software in this file and its documentation for any purpose without
10 # fee, provided that the above copyright notice appears in all copies and
11 # that both the copyright notice and this permission notice appear in
12 # supporting documentation. Further, provided that the name of Open
13 # Software Foundation, Inc. ("OSF") not be used in advertising or
14 # publicity pertaining to distribution of the software without prior
15 # written permission from OSF. OSF makes no representations about the
16 # suitability of this software for any purpose. It is provided "as is"
17 # without express or implied warranty.
20 # Copyright (c) 1995
21 # Dalrymple Consulting
24 # $Header: /usr/src/docbook-to-man/Instant/tptregexp/RCS/Makefile,v 1.2 1996/06/15 22:55:56 fld Exp $
26 include ../../../../../Makefile.cmd
28 ROOT = /usr/lib/sgml
30 MAKE = make
31 SHELL = /bin/sh
33 LIBDIR = $(ROOT)/lib
34 #CC = gcc
36 # Things you might want to put in ENV and LENV:
37 # -Dvoid=int compilers that don't do void
38 # -DCHARBITS=0377 compilers that don't do unsigned char
39 # -DSTATIC=extern compilers that don't like "static foo();" as forward decl
40 # -DSTRCSPN library does not have strcspn()
41 # -Dstrchr=index library does not have strchr()
42 # -DERRAVAIL have utzoo-compatible error() function and friends
43 #ENV=-Dvoid=int -DCHARBITS=0377 -DSTATIC=extern
44 #LENV=-Dvoid=int -DCHARBITS=0377
46 # Things you might want to put in TEST:
47 # -DDEBUG debugging hooks
48 # -I. tptregexp.h from current directory, not /usr/include
49 TEST= -I.
51 # Things you might want to put in PROF:
52 # -Dstatic='/* */' make everything global so profiler can see it.
53 # -p profiler
54 PROF=
56 OPT=
58 CFLAGS += $(OPT) $(ENV) $(TEST) $(PROF)
59 LINTFLAGS = $(LENV) $(TEST) -ha
60 LDFLAGS =
62 OBJ=regexp.o regsub.o regerror.o strerror.o
63 LSRC=regexp.c regsub.c regerror.c strerror.c
64 DTR=README dMakefile regexp.3 tptregexp.h regexp.c regsub.c regerror.c \
65 regmagic.h try.c timer.c tests
67 all: libtptregexp.a
68 install: libtptregexp.a
69 # @echo "No install of regex lib - install in a lib directory by hand if desired."
70 cp libtptregexp.a $(LIBDIR)
72 try: try.o $(OBJ)
73 $(CC) $(LDFLAGS) try.o $(OBJ) -o try
75 # Making timer will probably require putting stuff in $(PROF) and then
76 # recompiling everything; the following is just the final stage.
77 timer: timer.o $(OBJ)
78 $(CC) $(LDFLAGS) $(PROF) timer.o $(OBJ) -o timer
80 timer.o: timer.c timer.t.h
82 timer.t.h: tests
83 sed 's/ /","/g;s/\\/&&/g;s/.*/{"&"},/' tests >timer.t.h
85 # Regression test.
86 r: try tests
87 @echo 'No news is good news...'
88 try <tests
90 lint: timer.t.h
91 @echo 'Complaints about multiply-declared regerror() are legit.'
92 lint $(LINTFLAGS) $(LSRC) try.c
93 lint $(LINTFLAGS) $(LSRC) timer.c
95 regexp.o: regexp.c tptregexp.h regmagic.h
96 regsub.o: regsub.c tptregexp.h regmagic.h
98 clean:
99 rm -f *.o core mon.out timer.t.h dMakefile dtr try timer
101 clobber: clean
102 rm -f libtptregexp.a
104 dtr: r makedtr $(DTR)
105 makedtr $(DTR) >dtr
107 dMakefile: Makefile
108 sed '/^L*ENV=/s/ *-DERRAVAIL//' Makefile >dMakefile
111 lib: libtptregexp.a
112 libtptregexp.a: $(OBJ)
113 ar rcv $@ $(OBJ)
114 if [ -f /usr/bin/ranlib ] ; then ranlib $@ ; else true ; fi
116 .PARALLEL: $(OBJ)