1 UCWCF:=$(shell PKG_CONFIG_PATH=$(LIBUCW)/lib/pkgconfig pkg-config --cflags libucw libsh)
2 UCWLF:=$(shell PKG_CONFIG_PATH=$(LIBUCW)/lib/pkgconfig pkg-config --libs libucw libsh)
3 TLSCF:=$(shell libgnutls-config --cflags)
4 TLSLF:=$(shell libgnutls-config --libs)
5 GCRCF:=$(shell libgcrypt-config --cflags)
7 CFLAGS+=$(UCWCF) $(TLSCF) $(GCRCF)
8 LDFLAGS+=$(UCWLF) $(TLSLF)
10 all: submitd privkey lib
12 submitd: submitd.o commands.o tasks.o
13 submitd.o: submitd.c submitd.h
14 commands.o: commands.c submitd.h
15 tasks.o: tasks.c submitd.h
22 certtool --generate-privkey --outfile ca-key.pem
23 certtool --generate-privkey --outfile ca-key.pem --template ca-cert.tpl
24 certtool --generate-privkey --outfile server-key.pem
25 certtool --generate-request --load-privkey server-key.pem --outfile server-req.pem --template server-cert.tpl
26 certtool --generate-certificate --load-request server-req.pem --outfile server-cert.pem --load-ca-certificate ca-cert.pem --load-ca-privkey ca-key.pem --template server-cert.tpl
27 certtool --generate-privkey --outfile client-key.pem
28 certtool --generate-request --load-privkey client-key.pem --outfile client-req.pem --template client-cert.tpl
29 certtool --generate-certificate --load-request client-req.pem --outfile client-cert.pem --load-ca-certificate ca-cert.pem --load-ca-privkey ca-key.pem --template client-cert.tpl
30 # Beware of serial numbers
32 lib: .lib-stamp lib/perl5/MO/Submit.pm lib/perl5/Sherlock/Object.pm
35 mkdir -p lib/perl5/{MO,Sherlock}
38 lib/perl5/MO/Submit.pm: MO/Submit.pm
41 lib/perl5/Sherlock/Object.pm: $(LIBUCW)/lib/perl5/Sherlock/Object.pm
45 rm -f `find . -name "*~" -or -name "*.[oa]" -or -name "\#*\#" -or -name TAGS -or -name core -or -name .depend -or -name .#*`
46 rm -f submitd connect privkey