]> rtime.felk.cvut.cz Git - wvtest.git/commitdiff
Branch with OMK makefiles
authorMichal Sojka <sojkam1@fel.cvut.cz>
Thu, 27 Jan 2011 11:12:00 +0000 (12:12 +0100)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Thu, 27 Jan 2011 11:12:00 +0000 (12:12 +0100)
c/Makefile
c/Makefile.omk [new file with mode: 0644]

index a4c447bc57509102f5784e51e9ddc0d9fea4505a..08cf5ff32b1af596bdbbf00ceb090c934e395c71 100644 (file)
@@ -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 (file)
index 0000000..5ff9c0a
--- /dev/null
@@ -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