#DEBUG=-g

t: t.o old.o new.o
	$(CC) $(DEBUG) -static -o t t.o old.o new.o
t.o: t.c
	$(CC) $(DEBUG) -O2 -c t.c
old.o: old.c
	$(CC) $(DEBUG) -O2 -Din_cksum=old_in_cksum -Din4_cksum=old_in4_cksum -c old.c
new.o: new.c
	$(CC) $(DEBUG) -O2 -Din_cksum=new_in_cksum -Din4_cksum=new_in4_cksum -c new.c

test: test1 test2 test3 test4

test1:
	./t 16 1

test2:
	./t 16 2

test3:
	./t 16 3

test4:
	./t 16 4

bigtest:
	./t 16	1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
	./t 16	1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 \
	 	1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
	./t 16	1 3 1 3 1 3 1
	./t 16	40
	./t 16	2048
	./t 16	1536
	./t 16	576
	./t 16	1536 1536 1536 1536 1536 640

clean:
	rm -f t t.o old.o new.o t.core
