summaryrefslogtreecommitdiff
path: root/test/Makefile.win32
blob: 52357696ef1424af762bdf250248b8dca3410bb1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
top_srcdir = ..
include $(top_srcdir)/build/Makefile.win32.common
include $(top_srcdir)/test/Makefile.sources

CFLAGS += -I$(top_srcdir)/boilerplate -I./pdiff

TEST_LIBS = ./pdiff/$(CFG)/pdiff.lib $(top_builddir)/src/$(CFG)/cairo-static.lib $(top_builddir)/boilerplate/$(CFG)/boiler.lib

all: inform $(CFG)/cairo-test-suite.exe

cairo-test-constructors.c: Makefile.sources Makefile.win32 $(test_sources) make-cairo-test-constructors.sh
	sh ./make-cairo-test-constructors.sh $(test_sources) > $@

SOURCES = $(cairo_test_suite_sources) $(test_sources) cairo-test-constructors.c

OBJECTS = $(patsubst %.c, $(CFG)/%-static.obj, $(SOURCES))

$(CFG)/cairo-test-suite.exe: $(OBJECTS) $(TEST_LIBS)
	@$(LD) $(CAIRO_LDFLAGS) -OUT:$@ $(OBJECTS) $(TEST_LIBS) $(CAIRO_LIBS)

./pdiff/$(CFG)/pdiff.lib:
	$(MAKE) -C pdiff -f Makefile.win32

$(top_builddir)/src/$(CFG)/cairo-static.lib:
	$(MAKE) -C $(top_srcdir)/src -f Makefile.win32

$(top_builddir)/boilerplate/$(CFG)/boiler.lib:
	$(MAKE) -C $(top_srcdir)/boilerplate -f Makefile.win32

.PHONY: check test

check: inform $(CFG)/cairo-test-suite.exe
	./$(CFG)/cairo-test-suite.exe

test: inform check