home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Gold Fish 1
/
GoldFishApril1994_CD2.img
/
d4xx
/
d473
/
cnewssrc
/
cnews_src.lzh
/
dbz
/
Makefile
< prev
next >
Wrap
Makefile
|
1990-12-15
|
5KB
|
170 lines
#
# $Id$
#
# if no DBZDEBUG, use "COPTS = -bs -sob -wl -pa -DAMIGA -DFJE"
COPTS = -bs -sabm -wl -pa -DAMIGA -DFJE -DDBZDEBUG
CC = cc
# -lc before libcnews.a so we get fread etc. from system
# DBMLIBS = -lc ../libcnews.a
# FLAGS = -I../include
# RFC = -DHAVERFCIZE
CNLIB = +l /libcnews.lib +l
FLAGS = -I/include
RFC =
DEBUG = -DDBZDEBUG
CFLAGS = $(COPTS) $(FLAGS)
# LINTFLAGS = -h $(FLAGS) $(DEBUG) $(RFC)
LDFLAGS = -g -w
# -lmisc is replacement routines for some inefficient system functions;
# if you [probably] don't have it just delete it from the next line...
LIB = -lmisc -lc
LD = ln
# workaround for System V make bug
SHELL = /bin/sh
# database sizes for performance tests, regression, and regression prime-find
TSIZE=12007
RSIZE=4019
RPSIZE=3012
# history files for regression and performance tests
RHIST=hist3.3
R2HIST=hist10
THIST=hist13
.c.o:
$(CC) $(CFLAGS) $*.c
it: dbz.o
all: dbz
bininstall: dbz
cp dbz $(NEWSBIN)
newsinstall:
: nothing
t: tdbz fake
#rdbz.o: dbz.c
# $(CC) $(CFLAGS) $(DEBUG) -DDEFSIZE=$(RSIZE) -o rdbz.o dbz.c
#rdbzmain.o: dbzmain.c
# $(CC) $(CFLAGS) $(RFC) -o rdbzmain.o dbzmain.c
tdbz.o: dbz.c
$(CC) $(CFLAGS) -DDEFSIZE=$(TSIZE) -o tdbz.o dbz.c
dbz: dbzmain.o dbz.o
$(LD) $(LDFLAGS) dbzmain.o dbz.o -o $@ $(LIB) $(CNLIB)
tdbz: dbzmain.o tdbz.o
$(LD) $(LDFLAGS) dbzmain.o tdbz.o -o $@ $(LIB) $(CNLIB)
#rdbz: rdbzmain.o rdbz.o
# $(LD) $(LDFLAGS) rdbzmain.o rdbz.o -o $@ $(LIB) $(CNLIB)
#fake: fake.o random.o
# $(LD) $(LDFLAGS) fake.o random.o -o $@ $(LIB) $(CNLIB)
#byteflip: byteflip.o
# $(LD) $(LDFLAGS) byteflip.o -o $@ $(LIB) $(CNLIB)
#hist10: fake
# fake -t -e 75 10000 >$@
#hist3.3: fake
# fake -t -e 75 3300 >$@
#hist13: fake
# fake -t -e 75 13000 >$@
#r: rdbz $(RHIST) $(R2HIST) byteflip getmap revbytes altbytes
# : 'WARNING: creates about 2MB of debris; do "make rclean" afterward'
# rm -f dbase dbase[23] dbase.* dbase[23].*
# test ! -d xx || rmdir xx
# : crude check of synthetic history file
# ( sed 25q $(RHIST) ; tail -25 $(RHIST) ) >histjunk
# cmp histjunk firstlast25
# rm histjunk
# : basic tests, exercising as many options as possible
# cp $(RHIST) dbase
# mkdir xx
# chmod -w xx
# rdbz -E 1000 -0 -M -i -S -u -U -C xx dbase
# rmdir xx
# sed '/> 0/d' $(RHIST) >dbase.used
# test "`cat dbase.used | wc -l`" -eq "`sed -n '2s/ .*//p' dbase.dir`" ;
# cp $(RHIST) dbase2
# rdbz -E 1000 -0 -p $(RPSIZE) -t ' ' dbase2
# cmp $(RHIST) dbase
# cmp dbase dbase2
# cmp dbase.dir dbase2.dir
# cmp dbase.pag dbase2.pag
# rdbz -E 1000 -0 -c dbase
# rdbz -E 1000 -0 -c -i -q -M -U dbase
# : build a database and then add to it
# sed 1000q $(RHIST) >dbase2
# sed 1,1000d $(RHIST) >dbase2.add
# rdbz -E 1000 -0 dbase2
# rdbz -E 1000 -0 -a dbase2 dbase2.add
# cmp dbase dbase2
# cmp dbase.dir dbase2.dir
# cmp dbase.pag dbase2.pag
# : build based on existing one, test extraction and readonly files
# rdbz -E 1000 -0 -f dbase dbase2
# test "`cat dbase.used | wc -l`" -eq "`awk 'NR==2{print $$1}' dbase2.dir`" ;
# test "`cat dbase.used | wc -l`" -eq "`awk 'NR==2{print $$2}' dbase2.dir`" ;
# chmod -w dbase2.dir dbase2.pag
# rdbz -E 1000 -x dbase2 dbase >dbase.temp
# cmp dbase.used dbase.temp
# : try some small case perversions
# sed 's/\(@[^ ]*\)A/\1a/' dbase >dbase.ick
# rdbz -E 1000 -x dbase2 dbase.ick >dbase.temp
# cmp dbase.used dbase.temp
# sed -n 's/A\([^ ]*@\)/a\1/p' dbase >dbase.ick
# rdbz -x dbase2 dbase.ick >dbase.temp
# test ! -s dbase.temp ;
# rm -f dbase2.dir dbase2.pag
# : try it without tags, case-insensitive, with case perversions
# rdbz -E 1000 -0 -p '0 b 1' dbase2
# tr '[A-M][n-z]' '[a-m][N-Z]' <dbase2 >dbase.ick
# rdbz -E 1000 -x dbase2 dbase.ick >dbase.temp
# cmp dbase.used dbase.temp
# rm -f dbase.temp dbase.ick
# : test various perversions of byte ordering
# awk -f revbytes dbase.dir >dbase2.dir
# chmod +x getmap
# byteflip `./getmap dbase.dir` `./getmap dbase2.dir` <dbase.pag >dbase2.pag
# cp dbase dbase2
# rdbz -E 1000 -0 -c dbase2
# awk -f altbytes dbase.dir >dbase2.dir
# dd conv=swab <dbase.pag >dbase2.pag
# rdbz -E 1000 -0 -c dbase2
# cp dbase2 dbase3
# rdbz -E 1000 -0 -f dbase2 dbase3
# rdbz -E 1000 -0 -c dbase3
# test " `./getmap dbase2.dir`" = " `./getmap dbase3.dir`" ;
# : test massive overflow, throw in case sensitivity and tag mask
# cp $(R2HIST) dbase
# rdbz -E 1000 -0 -p '0 0 7ff00000' dbase
# rdbz -E 1000 -0 -cq dbase
# sed 100q dbase | egrep '[aA].* ' | tr aA Aa >dbase.ick
# rdbz -x dbase dbase.ick >dbase.temp
# test ! -s dbase.temp ;
# : success!
#rclean:
# rm -f dbase dbase[23] dbase.* dbase[23].* fake fake.o random.o
# rm -f rdbz rdbz.o rdbzmain.o $(RHIST) $(R2HIST) byteflip byteflip.o
# rm -f histjunk core
# test ! -d xx || rmdir xx
#clean: rclean
# rm -f *.o dbz [a-z]dbz [a-z][a-z]dbz junk* PostScript.out
# rm -f hist* dbase* *.bak mon.out gmon.out core dbm.h