Permalink
Browse files

fix samples, build tests with make check

  • Loading branch information...
1 parent f25da04 commit 981998531763d6920f80db3ba24168adeaf31340 @josephholsten committed Jun 28, 2009
View
@@ -1,3 +1,3 @@
-SUBDIRS = libdecodeqr sample
+SUBDIRS = libdecodeqr sample test
#SUBDIRS = libdecodeqr $(SAMPLE)
-
+AM_CPPFLAGS = $(DEPS_CFLAGS)
@@ -1,3 +1,5 @@
+AM_CPPFLAGS = $(DEPS_CFLAGS)
noinst_PROGRAMS = simpletest
simpletest_SOURCES = simpletest.cpp
-simpletest_LIBADD = libdecodeqr/libdecodeqr.la
+simpletest_LDADD = ../../libdecodeqr/libdecodeqr.la
+simpletest_LDADD += $(DEPS_LIBS)
@@ -1,3 +1,5 @@
+AM_CPPFLAGS = $(DEPS_CFLAGS)
noinst_PROGRAMS = webcam
-simpletest_SOURCES = webcam.cpp
-simpletest_LIBADD = libdecodeqr/libdecodeqr.la
+webcam_SOURCES = webcam.cpp
+webcam_LDADD = ../../libdecodeqr/libdecodeqr.la
+webcam_LDADD += $(DEPS_LIBS)
@@ -0,0 +1,41 @@
+#
+# Makefile.in -- a part of libdecodeqr
+#
+# Copyright(C) 2007 NISHI Takao <zophos@koka-in.org>
+# JMA (Japan Medical Association)
+# NaCl (Network Applied Communication Laboratory Ltd.)
+#
+# This is free software with ABSOLUTELY NO WARRANTY.
+# You can redistribute and/or modify it under the terms of LGPL.
+#
+# $Id: Makefile 20 2006-11-20 03:26:52Z zophos $
+#
+LIBDECODEQR_DIR=../../libdecodeqr
+
+CXX=@CXX@
+CPPFLAGS=@CPPFLAGS@ @CXXFLAGS@ -c -I$(LIBDECODEQR_DIR)
+
+LIBCV=@LIBCV@
+LIBHIGHGUI=@LIBHIGHGUI@
+LIBS=$(LIBCV) $(LIBHIGHGUI) -ldecodeqr
+
+LDFLAGS=@LDFLAGS@ -L$(LIBDECODEQR_DIR)
+
+VPATH=./:$(LIBDECODEQR_DIR)
+
+.SUFFIXES: .cpp .o
+.cpp.o:
+ $(CXX) $(CPPFLAGS) $<
+
+
+sources:=$(wildcard *.cpp)
+objs:=$(patsubst %.cpp,%.o,$(wildcard *.cpp))
+dst:=webcam
+
+all: $(dst)
+
+$(dst): $(objs) libdecodeqr.a
+ $(CXX) $(LDFLAGS) -o $@ $(objs) $(LIBS)
+
+clean:
+ -rm *.o $(dst)
View
@@ -0,0 +1,6 @@
+TESTS = $(check_PROGRAMS)
+check_PROGRAMS = test_galois test_codedata
+test_codedata_SOURCES = test_codedata.cpp
+test_codedata_LDADD = ../libdecodeqr/libdecodeqr.la
+test_galois_SOURCES = test_galois.cpp
+test_galois_LDADD = ../libdecodeqr/libdecodeqr.la
View
@@ -1,46 +0,0 @@
-#
-# Makefile.in -- a part of libdecodeqr
-#
-# Copyright(C) 2007 NISHI Takao <zophos@koka-in.org>
-# JMA (Japan Medical Association)
-# NaCl (Network Applied Communication Laboratory Ltd.)
-#
-# This is free software with ABSOLUTELY NO WARRANTY.
-# You can redistribute and/or modify it under the terms of LGPL.
-#
-# $Id:$
-#
-LIBDECODEQR_DIR=../libdecodeqr
-
-CXX=@CXX@
-CPPFLAGS=@CPPFLAGS@ @CXXFLAGS@ -c
-LDFLAGS=@LDFLAGS@
-INCLUDES = $(DEPS_CFLAGS)
-LIBS = $(DEPS_LIBS)
-
-VPATH=./:$(LIBDECODEQR_DIR)
-
-.SUFFIXES: .cpp .o
-.cpp.o:
- $(CXX) $(CPPFLAGS) $<
-
-dst:=$(basename $(wildcard *.cpp))
-
-all: test-all
-
-test-all: test-galois test-codedata
-
-test-galois: test_galois
- ./$<
-
-test-codedata: test_codedata
- ./$<
-
-test_galois: test_galois.o galois.o
- $(CXX) -o $@ test_galois.o galois.o
-
-test_codedata: test_codedata.o codedata.o bitstream.o galois.o ecidecoder.o
- $(CXX) -o $@ test_codedata.o codedata.o bitstream.o galois.o ecidecoder.o
-
-clean:
- -rm *.o $(dst)

0 comments on commit 9819985

Please sign in to comment.