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