From: Michal Sojka Date: Thu, 27 Jan 2011 11:12:00 +0000 (+0100) Subject: Branch with OMK makefiles X-Git-Url: http://rtime.felk.cvut.cz/gitweb/wvtest.git/commitdiff_plain/9974e2c5b30b5985ed4f834646c11ca624713ee5 Branch with OMK makefiles --- diff --git a/c/Makefile b/c/Makefile index a4c447b..08cf5ff 100644 --- a/c/Makefile +++ b/c/Makefile @@ -1,14 +1,14 @@ +# Generic directory or leaf node makefile for OCERA make framework -all: t/wvtest +ifndef MAKERULES_DIR +MAKERULES_DIR := $(shell ( old_pwd="" ; while [ ! -e Makefile.rules ] ; do if [ "$$old_pwd" = `pwd` ] ; then exit 1 ; else old_pwd=`pwd` ; cd -L .. 2>/dev/null ; fi ; done ; pwd ) ) +endif -t/wvtest: wvtestmain.c wvtest.c t/wvtest.t.c - gcc -D WVTEST_CONFIGURED -o $@ -I. $^ +ifeq ($(MAKERULES_DIR),) +all : default +.DEFAULT:: + @echo -e "\nThe Makefile.rules has not been found in this or partent directory\n" +else +include $(MAKERULES_DIR)/Makefile.rules +endif -runtests: all - t/wvtest - -test: all - ../wvtestrun $(MAKE) runtests - -clean:: - rm -f *~ t/*~ *.o t/*.o t/wvtest diff --git a/c/Makefile.omk b/c/Makefile.omk new file mode 100644 index 0000000..5ff9c0a --- /dev/null +++ b/c/Makefile.omk @@ -0,0 +1,9 @@ +include_HEADERS = wvtest.h + +CFLAGS += -DWVTEST_CONFIGURED + +lib_LIBRARIES = wvtest +wvtest_SOURCES = wvtestmain.c wvtest.c + +wvtest_PROGRAMS = wvtest.t +wvtest.t_SOURCES = t/wvtest.t.c