1 # 2 #pragma ident "%Z%%M% %I% %E% SMI" 3 # 4 # 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. 18 # 19 # 20 # Copyright (c) 1995 21 # Dalrymple Consulting 22 # 23 # 24 # $Header: /usr/src/docbook-to-man/Instant/tptregexp/RCS/Makefile,v 1.2 1996/06/15 22:55:56 fld Exp $ 25 # 26 include ../../../../../Makefile.cmd 27 28 ROOT = /usr/lib/sgml 29 30 MAKE = make 31 SHELL = /bin/sh 32 33 LIBDIR = $(ROOT)/lib 34 #CC = gcc 35 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 45 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. 50 51 # Things you might want to put in PROF: 52 # -Dstatic='/* */' make everything global so profiler can see it. 53 # -p profiler 54 PROF= 55 56 OPT= 57 58 CFLAGS += $(OPT) $(ENV) $(TEST) $(PROF) 59 LINTFLAGS = $(LENV) $(TEST) -ha 60 LDFLAGS = 61 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 66 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) 71 72 try: try.o $(OBJ) 73 $(CC) $(LDFLAGS) try.o $(OBJ) -o try 74 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 79 80 timer.o: timer.c timer.t.h 81 82 timer.t.h: tests 83 sed 's/ /","/g;s/\\/&&/g;s/.*/{"&"},/' tests >timer.t.h 84 85 # Regression test. 86 r: try tests 87 @echo 'No news is good news...' 88 try <tests 89 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 94 95 regexp.o: regexp.c tptregexp.h regmagic.h 96 regsub.o: regsub.c tptregexp.h regmagic.h 97 98 clean: 99 rm -f *.o core mon.out timer.t.h dMakefile dtr try timer 100 101 clobber: clean 102 rm -f libtptregexp.a 103 104 dtr: r makedtr $(DTR) 105 makedtr $(DTR) >dtr 106 107 dMakefile: Makefile 108 sed '/^L*ENV=/s/ *-DERRAVAIL//' Makefile >dMakefile 109 110 111 lib: libtptregexp.a 112 libtptregexp.a: $(OBJ) 113 ar rcv $@ $(OBJ) 114 if [ -f /usr/bin/ranlib ] ; then ranlib $@ ; else true ; fi 115 116 .PARALLEL: $(OBJ) 117 118