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 fill-file: fill-file.o
12 ${CC} fill-file.o -o fill-file
14 key.pem: cert.pem
16 # XXX: key size is NOT GOOD. This is only for testing. Smaller keys
17 # are quicker to generate. DON'T DO THIS AT HOME.
18 cert.pem:
19 printf ".\n.\n.\n.\n.\nlocalhost\n.\n" | \
20 openssl req -x509 -newkey rsa:2048 \
21 -keyout key.pem \
22 -out cert.pem \
23 -days 365 -nodes
24 @echo
26 clean:
27 rm -f *.o iri_test cert.pem key.pem
28 rm -rf testdata
30 testdata: fill-file
31 mkdir testdata
32 ./fill-file testdata/bigfile
33 ./sha testdata/bigfile testdata/bigfile.sha
34 printf "# hello world\n" > testdata/index.gmi
35 ./sha testdata/index.gmi testdata/index.gmi.sha
36 cp hello slow err invalid serve-bigfile testdata/
37 mkdir testdata/dir
38 cp hello testdata/dir
39 cp testdata/index.gmi testdata/dir/foo.gmi
41 runtime: testdata cert.pem
42 ./runtime