]> mj.ucw.cz Git - eval.git/blobdiff - submit/Makefile
Makefile cleanup.
[eval.git] / submit / Makefile
index ccac81a243c93f75b0e1d10c0ee2419f7ba88e3e..5e48d95b34d9820db53a16583e0e8c3bb438e35f 100644 (file)
@@ -1,15 +1,24 @@
 TLSCF:=$(shell libgnutls-config --cflags)
 TLSLF:=$(shell libgnutls-config --libs)
 TLSCF:=$(shell libgnutls-config --cflags)
 TLSLF:=$(shell libgnutls-config --libs)
+GCRCF:=$(shell libgcrypt-config --cflags)
 
 
-CFLAGS=-O2 -Iinclude -g -Wall -W -Wno-parentheses -Wstrict-prototypes -Wmissing-prototypes -Wundef -Wredundant-decls -std=gnu99 $(TLSCF)
+CFLAGS=-O2 -Iinclude -g -Wall -W -Wno-parentheses -Wstrict-prototypes -Wmissing-prototypes -Wundef -Wredundant-decls -std=gnu99 $(TLSCF) $(GCRCF)
 LDFLAGS=$(TLSLF)
 
 LDFLAGS=$(TLSLF)
 
-all: submitd connect
+CC=gcc-4.1.1
+CFLAGS+=-Wno-pointer-sign -Wdisabled-optimization -Wno-missing-field-initializers
+LDFLAGS+=-lpthread     # FIXME: Use libucw without threads
 
 
-submitd: submitd.o lib/libucw.a lib/libsh.a
-submitd.o: submitd.c
+all: submitd privkey
+
+submitd: submitd.o commands.o tasks.o lib/libsh.a lib/libucw.a
+submitd.o: submitd.c submitd.h
+commands.o: commands.c submitd.h
+tasks.o: tasks.c submitd.h
 connect: connect.o lib/libucw.a
 connect.o: connect.c
 connect: connect.o lib/libucw.a
 connect.o: connect.c
+privkey: privkey.o lib/libucw.a
+privkey.o: privkey.c
 
 certs:
        certtool --generate-privkey --outfile ca-key.pem
 
 certs:
        certtool --generate-privkey --outfile ca-key.pem
@@ -24,4 +33,4 @@ certs:
 
 clean:
        rm -f `find . -name "*~" -or -name "*.[oa]" -or -name "\#*\#" -or -name TAGS -or -name core -or -name .depend -or -name .#*`
 
 clean:
        rm -f `find . -name "*~" -or -name "*.[oa]" -or -name "\#*\#" -or -name TAGS -or -name core -or -name .depend -or -name .#*`
-       rm -f submitd connect
+       rm -f submitd connect privkey