######################################## # 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))))