• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1default: all
2
3top_srcdir = ..
4include $(top_srcdir)/test/Makefile.sources
5include $(top_srcdir)/Makefile.win32.common
6
7TEST_LDADD = \
8	$(top_builddir)/pixman/$(CFG_VAR)/$(LIBRARY).lib \
9	$(CFG_VAR)/libutils.lib \
10	$(NULL)
11
12libutils_OBJECTS = $(patsubst %.c, $(CFG_VAR)/%.obj, $(libutils_sources))
13
14SOURCES = $(patsubst %,   %.c,              $(TESTPROGRAMS) $(OTHERPROGRAMS))
15OBJECTS = $(patsubst %.c, $(CFG_VAR)/%.obj, $(SOURCES))
16TESTS   = $(patsubst %,   $(CFG_VAR)/%.exe, $(TESTPROGRAMS))
17OTHERS  = $(patsubst %,   $(CFG_VAR)/%.exe, $(OTHERPROGRAMS))
18
19all: pixman inform $(TESTS) $(OTHERS)
20
21check: pixman inform $(TESTS)
22	@failures=0 ; \
23	total=0 ; \
24	for test in $(TESTS) ; \
25	do \
26		total=`expr $$total + 1` ; \
27		if ./$$test ; \
28		then echo "PASS: $$test" ; \
29		else echo "FAIL: $$test" ; \
30		     failures=`expr $$failures + 1` ; \
31		fi ; \
32	done ; \
33	if test $$failures -eq 0 ; \
34	then banner="All $$total tests passed" ; \
35	else banner="$$failures of $$total tests failed" ; \
36	fi ; \
37	dashes=`echo "$$banner" | sed s/./=/g`; \
38	echo "$$dashes" ; \
39	echo "$$banner" ; \
40	echo "$$dashes" ; \
41	test $$failures -eq 0
42
43$(CFG_VAR)/libutils.lib: $(libutils_OBJECTS)
44	@$(AR) $(PIXMAN_ARFLAGS) -OUT:$@ $^
45
46$(CFG_VAR)/%.exe: $(CFG_VAR)/%.obj $(TEST_LDADD)
47	@$(LD) $(PIXMAN_LDFLAGS) -OUT:$@ $^
48
49$(top_builddir)/pixman/$(CFG_VAR)/$(LIBRARY).lib: pixman
50
51pixman:
52	@$(MAKE) -C $(top_builddir)/pixman -f Makefile.win32
53
54.PHONY: all check pixman
55