Blob


1 include ../Makefile.local
3 .PHONY: all clean runtime
5 all: iri_test runtime
6 ./iri_test
8 iri_test: iri_test.o ../iri.o ../utf8.o
9 ${CC} iri_test.o ../iri.o ../utf8.o -o iri_test ${LDFLAGS}
11 key.pem: cert.pem
13 # XXX: key size is NOT GOOD. This is only for testing. Smaller keys
14 # are quicker to generate. DON'T DO THIS AT HOME.
15 cert.pem:
16 printf ".\n.\n.\n.\n.\nlocalhost\n.\n" | \
17 openssl req -x509 -newkey rsa:1024 \
18 -keyout key.pem \
19 -out cert.pem \
20 -days 365 -nodes
21 @echo
23 clean:
24 rm -f *.o iri_test cert.pem key.pem
25 rm -rf testdata
27 testdata:
28 mkdir testdata
29 ./genbigfile testdata/bigfile
30 ./sha testdata/bigfile testdata/bigfile.sha
31 printf "# hello world\n" > testdata/index.gmi
32 ./sha testdata/index.gmi testdata/index.gmi.sha
33 cp hello slow err testdata/
34 mkdir testdata/dir
35 cp testdata/index.gmi testdata/dir/foo.gmi
37 runtime: testdata cert.pem
38 ./runtime