aboutsummaryrefslogtreecommitdiff
path: root/zinclib.d/test/Makefile
diff options
context:
space:
mode:
authorlecoanet2005-05-10 14:55:18 +0000
committerlecoanet2005-05-10 14:55:18 +0000
commit5abe4bd15642bbc83f46553aa5275430b14f5f91 (patch)
treeee9303b7dbeb1df88debd5ddef167db86df3bdac /zinclib.d/test/Makefile
parentb8356d1bffb6a8fcb83af50fe8725140ae0ddd47 (diff)
downloadtkzinc-5abe4bd15642bbc83f46553aa5275430b14f5f91.zip
tkzinc-5abe4bd15642bbc83f46553aa5275430b14f5f91.tar.gz
tkzinc-5abe4bd15642bbc83f46553aa5275430b14f5f91.tar.bz2
tkzinc-5abe4bd15642bbc83f46553aa5275430b14f5f91.tar.xz
*** empty log message ***
Diffstat (limited to 'zinclib.d/test/Makefile')
-rw-r--r--zinclib.d/test/Makefile36
1 files changed, 36 insertions, 0 deletions
diff --git a/zinclib.d/test/Makefile b/zinclib.d/test/Makefile
new file mode 100644
index 0000000..84938e6
--- /dev/null
+++ b/zinclib.d/test/Makefile
@@ -0,0 +1,36 @@
+########################################
+# zinclib tests makefile
+########################################
+
+# list of tests to make
+EXECS = items widget test itemconf
+
+# default : all tests
+all: $(EXECS)
+
+# usefull commons
+include ../../../v0.1/common.mk
+
+# specific options
+INCLUDE = -I../src
+LIBDIR = ../tmp
+LDFLAGS += -L../../../v0.1/lib -ltcl8.4 -ltk8.4 -lTkZinc $(LIBDIR)/zinclib.o
+
+# generic target
+%.o: %.cpp
+ $(CXX) $(CXXFLAGS) -o $@ -c $<
+
+clean:
+ rm -f *.o $(PROFFILES) $(EXECS) core.* *.exe
+
+clean_code: clean
+ rm -f *~ .\#*
+
+# function to create a target for each test
+define funct
+$(1): $(1).o $(LIBDIR)/zinclib.o
+ $$(GCC) $$(LDFLAGS) -o $$@ $$<
+endef
+
+# create a target for each test
+$(foreach prog,$(EXECS),$(eval $(call funct,$(prog))))