diff options
Diffstat (limited to 'pixman/pixman/Makefile.win32')
-rw-r--r-- | pixman/pixman/Makefile.win32 | 107 |
1 files changed, 13 insertions, 94 deletions
diff --git a/pixman/pixman/Makefile.win32 b/pixman/pixman/Makefile.win32 index 7c92722c3..beff4a068 100644 --- a/pixman/pixman/Makefile.win32 +++ b/pixman/pixman/Makefile.win32 @@ -1,12 +1,8 @@ -LIBRARY = pixman-1 +default: all -CC = cl -LINK = link - -CFG_VAR = $(CFG) -ifeq ($(CFG_VAR),) -CFG_VAR=release -endif +top_srcdir = .. +include $(top_srcdir)/pixman/Makefile.sources +include $(top_srcdir)/Makefile.win32.common MMX_VAR = $(MMX) ifeq ($(MMX_VAR),) @@ -18,83 +14,25 @@ ifeq ($(SSE2_VAR),) SSE2_VAR=on endif -CFLAGS = -MD -nologo -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -I../pixman/src -I. -DPACKAGE=$(LIBRARY) -DPACKAGE_VERSION="" -DPACKAGE_BUGREPORT="" MMX_CFLAGS = -DUSE_MMX -w14710 -w14714 SSE2_CFLAGS = -DUSE_SSE2 -# optimization flags -ifeq ($(CFG_VAR),debug) -CFLAGS += -Od -Zi -else -CFLAGS += -O2 -endif - -SOURCES = \ - pixman-image.c \ - pixman-access.c \ - pixman-access-accessors.c \ - pixman-region16.c \ - pixman-region32.c \ - pixman-combine32.c \ - pixman-combine64.c \ - pixman-utils.c \ - pixman-edge.c \ - pixman-edge-accessors.c \ - pixman-trap.c \ - pixman-timer.c \ - pixman-matrix.c \ - pixman-gradient-walker.c \ - pixman-conical-gradient.c \ - pixman-linear-gradient.c \ - pixman-radial-gradient.c \ - pixman-bits-image.c \ - pixman.c \ - pixman-noop.c \ - pixman-cpu.c \ - pixman-fast-path.c \ - pixman-implementation.c \ - pixman-solid-fill.c \ - pixman-general.c \ - $(NULL) - -BUILT_SOURCES = pixman-combine32.h pixman-combine32.c pixman-combine64.h pixman-combine64.c - # MMX compilation flags ifeq ($(MMX_VAR),on) -CFLAGS += $(MMX_CFLAGS) -SOURCES += pixman-mmx.c +PIXMAN_CFLAGS += $(MMX_CFLAGS) +libpixman_sources += pixman-mmx.c endif # SSE2 compilation flags ifeq ($(SSE2_VAR),on) -CFLAGS += $(SSE2_CFLAGS) -SOURCES += pixman-sse2.c +PIXMAN_CFLAGS += $(SSE2_CFLAGS) +libpixman_sources += pixman-sse2.c endif -OBJECTS = $(patsubst %.c, $(CFG_VAR)/%.obj, $(SOURCES)) +OBJECTS = $(patsubst %.c, $(CFG_VAR)/%.obj, $(libpixman_sources)) # targets all: inform informMMX informSSE2 $(CFG_VAR)/$(LIBRARY).lib - @exit 0 -clean: inform clean_r - @exit 0 -pixman: inform informMMX informSSE2 $(CFG_VAR)/$(LIBRARY).lib - @exit 0 - -inform: -ifneq ($(CFG),release) -ifneq ($(CFG),debug) -ifneq ($(CFG),) - @echo "Invalid specified configuration option : "$(CFG)"." - @echo - @echo -n "Possible choices for configuration are " - @echo "'release' and 'debug'" - @echo "" - @exit 1 -endif - @echo "Using default RELEASE configuration... (use CFG=release or CFG=debug)" -endif -endif informMMX: ifneq ($(MMX),off) @@ -102,8 +40,7 @@ ifneq ($(MMX),on) ifneq ($(MMX),) @echo "Invalid specified MMX option : "$(MMX_VAR)"." @echo - @echo -n "Possible choices for MMX are 'on' or 'off'" - @echo "" + @echo "Possible choices for MMX are 'on' or 'off'" @exit 1 endif @echo "Setting MMX flag to default value 'on'... (use MMX=on or MMX=off)" @@ -116,32 +53,14 @@ ifneq ($(SSE2),on) ifneq ($(SSE2),) @echo "Invalid specified SSE option : "$(SSE2)"." @echo - @echo -n "Possible choices for SSE2 are 'on' or 'off'" - @echo "" + @echo "Possible choices for SSE2 are 'on' or 'off'" @exit 1 endif @echo "Setting SSE2 flag to default value 'on'... (use SSE2=on or SSE2=off)" endif endif -# pixman compilation and linking -$(CFG_VAR)/%.obj: %.c $(BUILT_SOURCES) - @mkdir -p $(CFG_VAR) - @$(CC) -c $(CFLAGS) -Fo"$@" $< +# pixman linking $(CFG_VAR)/$(LIBRARY).lib: $(OBJECTS) - lib -NOLOGO -OUT:$@ $(OBJECTS) || exit 0 - -pixman-combine32.c: pixman-combine.c.template pixman-combine32.h make-combine.pl - perl ./make-combine.pl 8 < $< > $@ || ($(RM) $@; exit 1) -pixman-combine32.h: pixman-combine.h.template make-combine.pl - perl ./make-combine.pl 8 < $< > $@ || ($(RM) $@; exit 1) - -pixman-combine64.c: pixman-combine.c.template pixman-combine64.h make-combine.pl - perl ./make-combine.pl 16 < $< > $@ || ($(RM) $@; exit 1) -pixman-combine64.h: pixman-combine.h.template make-combine.pl - perl ./make-combine.pl 16 < $< > $@ || ($(RM) $@; exit 1) - -clean_r: - @rm -f $(CFG_VAR)/*.obj $(CFG_VAR)/*.lib $(CFG_VAR)/*.pdb $(CFG)/*.ilk || exit 0 - @rm -f $(CFG)/*.obj $(CFG)/*.lib $(CFG)/*.pdb $(CFG)/*.ilk $(BUILT_SOURCES) || exit 0 + @$(AR) $(PIXMAN_ARFLAGS) -OUT:$@ $^ |