gmid/regress/Makefile

48 lines
1.1 KiB
Makefile
Raw Normal View History

2021-01-22 17:48:04 +01:00
include ../Makefile.local
.PHONY: all clean runtime
2021-01-27 11:47:49 +01:00
all: puny-test testdata iri_test cert.pem
./puny-test
./runtime
2021-01-22 17:48:04 +01:00
./iri_test
2021-02-07 16:30:28 +01:00
puny-test: puny-test.o ../puny.o ../utf8.o ../utils.o ../log.o
${CC} puny-test.o ../puny.o ../utf8.o ../utils.o ../log.o -o puny-test ${LDFLAGS}
2021-01-27 11:47:49 +01:00
2021-01-22 17:48:04 +01:00
iri_test: iri_test.o ../iri.o ../utf8.o
2021-01-27 11:47:49 +01:00
${CC} iri_test.o ../iri.o ../utf8.o -o iri_test
2021-01-22 17:48:04 +01:00
fill-file: fill-file.o
${CC} fill-file.o -o fill-file
2021-01-22 17:48:04 +01:00
key.pem: cert.pem
# XXX: key size is NOT GOOD. This is only for testing. Smaller keys
# are quicker to generate. DON'T DO THIS AT HOME.
cert.pem:
printf ".\n.\n.\n.\n.\nlocalhost\n.\n" | \
openssl req -x509 -newkey rsa:2048 \
2021-01-22 17:48:04 +01:00
-keyout key.pem \
-out cert.pem \
-days 365 -nodes
@echo
clean:
rm -f *.o iri_test cert.pem key.pem
rm -rf testdata
testdata: fill-file
2021-01-22 17:48:04 +01:00
mkdir testdata
./fill-file testdata/bigfile
2021-01-22 17:48:04 +01:00
./sha testdata/bigfile testdata/bigfile.sha
printf "# hello world\n" > testdata/index.gmi
./sha testdata/index.gmi testdata/index.gmi.sha
2021-02-06 19:28:43 +01:00
cp hello slow err invalid serve-bigfile env testdata/
2021-01-22 17:48:04 +01:00
mkdir testdata/dir
2021-01-24 15:11:40 +01:00
cp hello testdata/dir
2021-01-22 17:48:04 +01:00
cp testdata/index.gmi testdata/dir/foo.gmi
2021-01-27 11:47:49 +01:00
runtime: testdata
2021-01-22 17:48:04 +01:00
./runtime