]> mj.ucw.cz Git - moe.git/blob - submit/Makefile
First parts of submit command.
[moe.git] / submit / Makefile
1 TLSCF:=$(shell libgnutls-config --cflags)
2 TLSLF:=$(shell libgnutls-config --libs)
3
4 CFLAGS=-O2 -Iinclude -g -Wall -W -Wno-parentheses -Wstrict-prototypes -Wmissing-prototypes -Wundef -Wredundant-decls -std=gnu99 $(TLSCF)
5 LDFLAGS=$(TLSLF)
6
7 CC=gcc-4.1.1
8 CFLAGS+=-Wno-pointer-sign -Wdisabled-optimization -Wno-missing-field-initializers
9
10 all: submitd connect
11
12 submitd: submitd.o commands.o tasks.o lib/libsh.a lib/libucw.a
13 submitd.o: submitd.c submitd.h
14 commands.o: commands.c submitd.h
15 tasks.o: tasks.c submitd.h
16 connect: connect.o lib/libucw.a
17 connect.o: connect.c
18
19 certs:
20         certtool --generate-privkey --outfile ca-key.pem
21         certtool --generate-privkey --outfile ca-key.pem --template ca-cert.tpl
22         certtool --generate-privkey --outfile server-key.pem
23         certtool --generate-request --load-privkey server-key.pem --outfile server-req.pem --template server-cert.tpl
24         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
25         certtool --generate-privkey --outfile client-key.pem
26         certtool --generate-request --load-privkey client-key.pem --outfile client-req.pem --template client-cert.tpl
27         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
28         # Beware of serial numbers
29
30 clean:
31         rm -f `find . -name "*~" -or -name "*.[oa]" -or -name "\#*\#" -or -name TAGS -or -name core -or -name .depend -or -name .#*`
32         rm -f submitd connect