1 # Things you might want to put in ENV and LENV:
2 # -Dvoid=int compilers that don't do void
3 # -DCHARBITS=0377 compilers that don't do unsigned char
4 # -DSTATIC=extern compilers that don't like "static foo();" as forward decl
5 # -DSTRCSPN library does not have strcspn()
6 # -Dstrchr=index library does not have strchr()
7 # -DERRAVAIL have utzoo-compatible error() function and friends
11 # Things you might want to put in TEST:
12 # -DDEBUG debugging hooks
13 # -I. regexp.h from current directory, not /usr/include
16 # Things you might want to put in PROF:
17 # -Dstatic='/* */' make everything global so profiler can see it.
21 CFLAGS=-O $(ENV) $(TEST) $(PROF)
22 LINTFLAGS=$(LENV) $(TEST) -ha
26 LSRC=regexp.c regsub.c regerror.c
27 DTR=README dMakefile regexp.3 regexp.h regexp.c regsub.c regerror.c \
28 regmagic.h try.c timer.c tests
31 cc $(LDFLAGS) try.o $(OBJ) -o try
33 # Making timer will probably require putting stuff in $(PROF) and then
34 # recompiling everything; the following is just the final stage.
36 cc $(LDFLAGS) $(PROF) timer.o $(OBJ) -o timer
38 timer.o: timer.c timer.t.h
41 sed 's/ /","/g;s/\\/&&/g;s/.*/{"&"},/' tests >timer.t.h
45 @echo 'No news is good news...'
49 @echo 'Complaints about multiply-declared regerror() are legit.'
50 lint $(LINTFLAGS) $(LSRC) try.c
51 lint $(LINTFLAGS) $(LSRC) timer.c
53 regexp.o: regexp.c regexp.h regmagic.h
54 regsub.o: regsub.c regexp.h regmagic.h
57 rm -f *.o core mon.out timer.t.h dMakefile dtr try timer
63 sed '/^L*ENV=/s/ *-DERRAVAIL//' Makefile >dMakefile