Blob


1 include ../Makefile.local
3 .PHONY: all clean runtime
5 all: puny-test testdata iri_test cert.pem
6 ./puny-test
7 ./runtime
8 ./iri_test
10 puny-test: puny-test.o ../puny.o ../utf8.o ../utils.o ../log.o
11 ${CC} puny-test.o ../puny.o ../utf8.o ../utils.o ../log.o -o puny-test ${LDFLAGS}
13 iri_test: iri_test.o ../iri.o ../utf8.o
14 ${CC} iri_test.o ../iri.o ../utf8.o -o iri_test
16 fill-file: fill-file.o
17 ${CC} fill-file.o -o fill-file
19 key.pem: cert.pem
21 # XXX: key size is NOT GOOD. This is only for testing. Smaller keys
22 # are quicker to generate. DON'T DO THIS AT HOME.
23 cert.pem:
24 printf ".\n.\n.\n.\n.\nlocalhost\n.\n" | \
25 openssl req -x509 -newkey rsa:2048 \
26 -keyout key.pem \
27 -out cert.pem \
28 -days 365 -nodes
29 @echo
31 clean:
32 rm -f *.o iri_test cert.pem key.pem
33 rm -rf testdata
35 testdata: fill-file
36 mkdir testdata
37 ./fill-file testdata/bigfile
38 ./sha testdata/bigfile testdata/bigfile.sha
39 printf "# hello world\n" > testdata/index.gmi
40 ./sha testdata/index.gmi testdata/index.gmi.sha
41 cp hello slow err invalid serve-bigfile env testdata/
42 mkdir testdata/dir
43 cp hello testdata/dir
44 cp testdata/index.gmi testdata/dir/foo.gmi
46 runtime: testdata
47 ./runtime