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