]> mj.ucw.cz Git - moe.git/blobdiff - submit/Makefile
Changed buffer flushing to explicit in a vain attempt to hunt down problems
[moe.git] / submit / Makefile
index 71a392b13682f3fd463a8af0e2e87c7585de4b44..b1b3b116895fe836ef165ec072fb39a9f6427564 100644 (file)
@@ -2,22 +2,19 @@ TLSCF:=$(shell libgnutls-config --cflags)
 TLSLF:=$(shell libgnutls-config --libs)
 GCRCF:=$(shell libgcrypt-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) $(GCRCF)
-LDFLAGS=$(TLSLF)
-
-CC=gcc-4.1.1
-CFLAGS+=-Wno-pointer-sign -Wdisabled-optimization -Wno-missing-field-initializers
+CFLAGS+=-I$(LIBUCW)/include $(TLSCF) $(GCRCF)
+LDFLAGS+=$(TLSLF)
 LDFLAGS+=-lpthread     # FIXME: Use libucw without threads
 
 LDFLAGS+=-lpthread     # FIXME: Use libucw without threads
 
-all: submitd connect privkey
+all: submitd privkey lib
 
 
-submitd: submitd.o commands.o tasks.o lib/libsh.a lib/libucw.a
+submitd: submitd.o commands.o tasks.o $(LIBUCW)/lib/libsh.a $(LIBUCW)/lib/libucw.a
 submitd.o: submitd.c submitd.h
 commands.o: commands.c submitd.h
 tasks.o: tasks.c submitd.h
 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: connect.o $(LIBUCW)/lib/libucw.a
 connect.o: connect.c
 connect.o: connect.c
-privkey: privkey.o lib/libucw.a
+privkey: privkey.o $(LIBUCW)/lib/libucw.a
 privkey.o: privkey.c
 
 certs:
 privkey.o: privkey.c
 
 certs:
@@ -31,6 +28,21 @@ certs:
        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
        # Beware of serial numbers
 
        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
        # Beware of serial numbers
 
+lib: .lib-stamp lib/perl5/MO/Submit.pm lib/perl5/Sherlock/Object.pm
+
+.lib-stamp:
+       mkdir -p lib/perl5/{MO,Sherlock}
+       touch .lib-stamp
+
+lib/perl5/MO/Submit.pm: MO/Submit.pm
+       cp $^ $@
+
+lib/perl5/Sherlock/Object.pm: $(LIBUCW)/lib/perl5/Sherlock/Object.pm
+       cp $^ $@
+
 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
+       rm -rf lib .lib-stamp
+
+.PHONY: lib