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