Blame


1 5c2e310e 2021-01-22 op include ../Makefile.local
2 5c2e310e 2021-01-22 op
3 5c2e310e 2021-01-22 op .PHONY: all clean runtime
4 5c2e310e 2021-01-22 op
5 5c2e310e 2021-01-22 op all: iri_test runtime
6 5c2e310e 2021-01-22 op ./iri_test
7 5c2e310e 2021-01-22 op
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}
10 5c2e310e 2021-01-22 op
11 5c2e310e 2021-01-22 op key.pem: cert.pem
12 5c2e310e 2021-01-22 op
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.
15 5c2e310e 2021-01-22 op cert.pem:
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
21 5c2e310e 2021-01-22 op @echo
22 5c2e310e 2021-01-22 op
23 5c2e310e 2021-01-22 op clean:
24 5c2e310e 2021-01-22 op rm -f *.o iri_test cert.pem key.pem
25 5c2e310e 2021-01-22 op rm -rf testdata
26 5c2e310e 2021-01-22 op
27 5c2e310e 2021-01-22 op 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
36 5c2e310e 2021-01-22 op
37 5c2e310e 2021-01-22 op runtime: testdata cert.pem
38 5c2e310e 2021-01-22 op ./runtime