2 # makefile for public domain ndbm-clone: sdbm
3 # DUFF: use duff's device (loop unroll) in parts of the code
5 CFLAGS = -O -DSDBM -DDUFF -DBSD42 -pic
8 OBJS = sdbm.o pair.o hash.o
9 SRCS = sdbm.c pair.c hash.c dbu.c dba.c dbd.c util.c
10 HDRS = tune.h sdbm.h pair.h
11 MISC = README CHANGES COMPARE sdbm.3 dbe.c dbe.1 dbm.c dbm.h biblio \
16 dbu: dbu.o sdbm util.o
17 cc $(LDFLAGS) -o dbu dbu.o util.o libsdbm.a
20 cc $(LDFLAGS) -o dba dba.o util.o
22 cc $(LDFLAGS) -o dbd dbd.o util.o
24 cc $(LDFLAGS) -o dbe dbe.o libsdbm.a
27 ar cr libsdbm.a $(OBJS)
29 ### cp libsdbm.a /usr/lib/libsdbm.a
35 $(OBJS): sdbm.h tune.h pair.h
38 # dbu using berkelezoid ndbm routines [if you have them] for testing
41 # cc $(CFLAGS) -o x-dbu dbu.o util.o
46 rm -f *.o mon.out core
49 rm -f dbu libsdbm.a dbd dba dbe x-dbu *.dir *.pag
52 shar $(MISC) makefile $(SRCS) $(HDRS) >SDBM.SHAR
55 nroff -ms readme.ms | col -b >README