diff options
author | Andrea Canciani <ranma42@gmail.com> | 2012-06-21 06:07:07 +0200 |
---|---|---|
committer | Andrea Canciani <ranma42@gmail.com> | 2012-09-15 07:49:53 +0200 |
commit | 46e4faf8ef34d49f15e1946d105289fb06365553 (patch) | |
tree | e3783932c8669cab8911e6f35a1ef811808dc8c4 | |
parent | c89efdd211cf7cd3dc69a4140045ceab6f445730 (diff) |
build: Improve win32 build system
Handle cross-directory dependencies using PHONY targets and clean up
some redundancies.
-rw-r--r-- | Makefile.win32 | 14 | ||||
-rw-r--r-- | Makefile.win32.common | 4 | ||||
-rw-r--r-- | pixman/Makefile.win32 | 2 | ||||
-rw-r--r-- | test/Makefile.win32 | 10 |
4 files changed, 19 insertions, 11 deletions
diff --git a/Makefile.win32 b/Makefile.win32 index 91cd12a..c3ca3bc 100644 --- a/Makefile.win32 +++ b/Makefile.win32 @@ -3,23 +3,23 @@ default: all top_srcdir = . include $(top_srcdir)/Makefile.win32.common -# Recursive targets -pixman_r: +all: pixman test + +pixman: @$(MAKE) -C pixman -f Makefile.win32 -test_r: +test: @$(MAKE) -C test -f Makefile.win32 clean_r: @$(MAKE) -C pixman -f Makefile.win32 clean @$(MAKE) -C test -f Makefile.win32 clean -check_r: +check: @$(MAKE) -C test -f Makefile.win32 check -# Base targets -all: test_r clean: clean_r -check: check_r + +.PHONY: all pixman test clean check diff --git a/Makefile.win32.common b/Makefile.win32.common index 56c3593..777f94c 100644 --- a/Makefile.win32.common +++ b/Makefile.win32.common @@ -46,9 +46,11 @@ endif endif -$(CFG_VAR)/%.obj: %.c $(BUILT_SOURCES) +$(CFG_VAR)/%.obj: %.c $(libpixman_headers) @mkdir -p $(CFG_VAR) @$(CC) -c $(PIXMAN_CFLAGS) -Fo"$@" $< clean: inform @$(RM) $(CFG_VAR)/*.{exe,ilk,lib,obj,pdb} $(BUILT_SOURCES) || exit 0 + +.PHONY: inform clean diff --git a/pixman/Makefile.win32 b/pixman/Makefile.win32 index 381f2cd..57ed7a5 100644 --- a/pixman/Makefile.win32 +++ b/pixman/Makefile.win32 @@ -64,3 +64,5 @@ endif # pixman linking $(CFG_VAR)/$(LIBRARY).lib: $(OBJECTS) @$(AR) $(PIXMAN_ARFLAGS) -OUT:$@ $^ + +.PHONY: all informMMX informSSE2 diff --git a/test/Makefile.win32 b/test/Makefile.win32 index c88d087..b6254a3 100644 --- a/test/Makefile.win32 +++ b/test/Makefile.win32 @@ -16,9 +16,9 @@ OBJECTS = $(patsubst %.c, $(CFG_VAR)/%.obj, $(SOURCES)) TESTS = $(patsubst %, $(CFG_VAR)/%.exe, $(TESTPROGRAMS)) BENCHS = $(patsubst %, $(CFG_VAR)/%.exe, $(BENCHMARKS)) -all: inform $(TESTS) $(BENCHS) +all: pixman inform $(TESTS) $(BENCHS) -check: inform $(TESTS) +check: pixman inform $(TESTS) @failures=0 ; \ total=0 ; \ for test in $(TESTS) ; \ @@ -46,5 +46,9 @@ $(CFG_VAR)/libutils.lib: $(libutils_OBJECTS) $(CFG_VAR)/%.exe: $(CFG_VAR)/%.obj $(TEST_LDADD) @$(LD) $(PIXMAN_LDFLAGS) -OUT:$@ $^ -$(top_builddir)/pixman/$(CFG_VAR)/$(LIBRARY).lib: +$(top_builddir)/pixman/$(CFG_VAR)/$(LIBRARY).lib: pixman + +pixman: @$(MAKE) -C $(top_builddir)/pixman -f Makefile.win32 + +.PHONY: all check pixman |