From: Martin Mares Date: Thu, 28 Jun 2007 18:28:58 +0000 (+0200) Subject: Cleaned up installation of Perl modules. Also invoke submit makefile from X-Git-Tag: python-dummy-working~336 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=73bbb717e3a95e1b504f97f7f06287500c143669;p=moe.git Cleaned up installation of Perl modules. Also invoke submit makefile from the top-level makefile. --- diff --git a/Makefile b/Makefile index abfeafd..7bc8e4a 100644 --- a/Makefile +++ b/Makefile @@ -1,8 +1,20 @@ +# Makefile for mo-eval and related utilities +# (c) 2007 Martin Mares + VERSION=1.0.1 #DEBUG=-ggdb -CFLAGS=-O2 -Wall -W -Wno-parentheses -Wstrict-prototypes -Wmissing-prototypes -Winline $(DEBUG) +CFLAGS=-O2 -Wall -W -Wno-parentheses -Wstrict-prototypes -Wmissing-prototypes -Wundef -Wredundant-decls -Winline $(DEBUG) -std=gnu99 + +# Comment out if you are using a recent gcc +CFLAGS+=-Wno-pointer-sign -Wdisabled-optimization -Wno-missing-field-initializers + +# Comment out if you do not wish to build remote submit utilities +SUBMIT=submit +LIBUCW:=$(shell cd ../libucw && pwd) -all: bin/box bin/iwrapper bin/md5crypt bin/pedant +export LIBUCW CFLAGS LDFLAGS DEBUG + +all: bin/box bin/iwrapper bin/md5crypt bin/pedant $(SUBMIT) bin/%: src/%.o $(CC) $(LDFLAGS) -o $@ $^ @@ -12,10 +24,22 @@ bin/iwrapper: src/iwrapper.o bin/md5crypt: src/md5crypt.o src/md5.o bin/pedant: src/pedant.o -clean: +submit: + +clean:: rm -f `find . -name "*~" -or -name "*.[oa]" -or -name "\#*\#" -or -name TAGS -or -name core` rm -f bin/box bin/iwrapper bin/md5crypt bin/pedant distclean: clean -.PHONY: all clean distclean +ifdef SUBMIT + +submit: + $(MAKE) -C submit + +clean:: + $(MAKE) -C submit clean + +endif + +.PHONY: all clean distclean submit diff --git a/bin/mo-create-public b/bin/mo-create-public index bac7237..91c9c8e 100755 --- a/bin/mo-create-public +++ b/bin/mo-create-public @@ -19,9 +19,8 @@ done if [ -n "$REMOTE_SUBMIT" ] ; then cp $H/submit/{contest,remote-submit,remote-status} bin/ - mkdir -p lib/perl5/{MO,Sherlock} - cp $H/submit/MO/*.pm lib/perl5/MO/ - cp $H/submit/lib/perl5/Sherlock/Object.pm lib/perl5/Sherlock/ + mkdir lib + cp -a $H/submit/lib . fi mkdir -p problems diff --git a/submit/Makefile b/submit/Makefile index 8431079..b1b3b11 100644 --- a/submit/Makefile +++ b/submit/Makefile @@ -1,16 +1,12 @@ TLSCF:=$(shell libgnutls-config --cflags) TLSLF:=$(shell libgnutls-config --libs) GCRCF:=$(shell libgcrypt-config --cflags) -LIBUCW=../../libucw -CFLAGS=-O2 -I$(LIBUCW)/include -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 -all: submitd privkey +all: submitd privkey lib submitd: submitd.o commands.o tasks.o $(LIBUCW)/lib/libsh.a $(LIBUCW)/lib/libucw.a submitd.o: submitd.c submitd.h @@ -32,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 +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 .#*` rm -f submitd connect privkey + rm -rf lib .lib-stamp + +.PHONY: lib