55 lines
1.4 KiB
Plaintext
55 lines
1.4 KiB
Plaintext
# Things you might want to put in ENV and LENV:
|
|
# -Dvoid=int compilers that don't do void
|
|
# -DCHARBITS=0377 compilers that don't do unsigned char
|
|
# -DSTATIC=extern compilers that don't like "static foo();" as forward decl
|
|
# -DSTRCSPN library does not have strcspn()
|
|
# -Dstrchr=index library does not have strchr()
|
|
# -DERRAVAIL have utzoo-compatible error() function and friends
|
|
#ENV=-Dvoid=int -DCHARBITS=0377 -DSTATIC=extern
|
|
#ENV=-IC:\turboc\include -IC:\netgen -LC:\turboc\lib
|
|
ENV=
|
|
#LENV=-Dvoid=int -DCHARBITS=0377
|
|
|
|
# Things you might want to put in TEST:
|
|
# -DDEBUG debugging hooks
|
|
# -I. regexp.h from current directory, not /usr/include
|
|
TEST=
|
|
|
|
# Things you might want to put in PROF:
|
|
# -Dstatic='/* */' make everything global so profiler can see it.
|
|
# -p profiler
|
|
#PROF= -pg
|
|
PROF=
|
|
|
|
CFLAGS=$(ENV) $(TEST) $(PROF) -O
|
|
|
|
REGOBJ=regexp.o regsub.o regerror.o
|
|
|
|
CC=gcc
|
|
|
|
# generate REGEX stuff
|
|
|
|
regexp.a: regerror.o regexp.o regsub.o
|
|
ar r regexp.a regerror.o regsub.o regexp.o
|
|
ranlib regexp.a
|
|
|
|
try: try.o $(REGOBJ)
|
|
$(CC) $(CFLAGS) -o try try.o $(REGOBJ)
|
|
|
|
fixtabs: fixtabs.c
|
|
$(CC) $(CFLAGS) -o fixtabs fixtabs.c
|
|
|
|
regerror.o: regerror.c
|
|
regexp.o: regexp.c regexp.h regmagic.h
|
|
regsub.o: regsub.c regexp.h regmagic.h
|
|
try.o: regexp.h try.c
|
|
|
|
|
|
# Regression test.
|
|
r: try tests
|
|
echo 'No news is good news...'
|
|
try <tests
|
|
|
|
clean:
|
|
-rm *.o *.a
|