Fill out parts of iters in _pixman_implementation_{src,dest}_iter_init()
[profile/ivi/pixman.git] / pixman / Makefile.win32
1 LIBRARY     = pixman-1
2
3 CC   = cl
4 LINK = link
5
6 CFG_VAR = $(CFG)
7 ifeq ($(CFG_VAR),)
8 CFG_VAR=release
9 endif
10
11 MMX_VAR = $(MMX)
12 ifeq ($(MMX_VAR),)
13 MMX_VAR=on
14 endif
15
16 SSE2_VAR = $(SSE2)
17 ifeq ($(SSE2_VAR),)
18 SSE2_VAR=on
19 endif
20
21 CFLAGS     = -MD -nologo -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -I../pixman/src -I. -DPACKAGE=$(LIBRARY) -DPACKAGE_VERSION="" -DPACKAGE_BUGREPORT=""
22 MMX_CFLAGS = -DUSE_MMX -w14710 -w14714
23 SSE2_CFLAGS = -DUSE_SSE2
24
25 # optimization flags
26 ifeq ($(CFG_VAR),debug)
27 CFLAGS += -Od -Zi
28 else
29 CFLAGS += -O2
30 endif
31
32 SOURCES =                               \
33         pixman-image.c                  \
34         pixman-access.c                 \
35         pixman-access-accessors.c       \
36         pixman-region16.c               \
37         pixman-region32.c               \
38         pixman-combine32.c              \
39         pixman-combine64.c              \
40         pixman-utils.c                  \
41         pixman-edge.c                   \
42         pixman-edge-accessors.c         \
43         pixman-trap.c                   \
44         pixman-timer.c                  \
45         pixman-matrix.c                 \
46         pixman-gradient-walker.c        \
47         pixman-conical-gradient.c       \
48         pixman-linear-gradient.c        \
49         pixman-radial-gradient.c        \
50         pixman-bits-image.c             \
51         pixman.c                        \
52         pixman-cpu.c                    \
53         pixman-fast-path.c              \
54         pixman-implementation.c         \
55         pixman-solid-fill.c             \
56         pixman-general.c                \
57         $(NULL)
58
59 BUILT_SOURCES = pixman-combine32.h pixman-combine32.c pixman-combine64.h pixman-combine64.c
60
61 # MMX compilation flags
62 ifeq ($(MMX_VAR),on)
63 CFLAGS += $(MMX_CFLAGS)
64 SOURCES += pixman-mmx.c
65 endif
66
67 # SSE2 compilation flags
68 ifeq ($(SSE2_VAR),on)
69 CFLAGS += $(SSE2_CFLAGS)
70 SOURCES += pixman-sse2.c
71 endif
72
73 OBJECTS     = $(patsubst %.c, $(CFG_VAR)/%.obj, $(SOURCES))
74
75 # targets
76 all: inform informMMX informSSE2 $(CFG_VAR)/$(LIBRARY).lib
77         @exit 0
78 clean: inform clean_r 
79         @exit 0
80 pixman: inform informMMX informSSE2 $(CFG_VAR)/$(LIBRARY).lib 
81         @exit 0
82
83 inform:
84 ifneq ($(CFG),release)
85 ifneq ($(CFG),debug)
86 ifneq ($(CFG),)
87         @echo "Invalid specified configuration option : "$(CFG)"."
88         @echo
89         @echo -n "Possible choices for configuration are "
90         @echo "'release' and 'debug'"
91         @echo ""
92         @exit 1
93 endif
94         @echo "Using default RELEASE configuration... (use CFG=release or CFG=debug)"
95 endif
96 endif
97
98 informMMX:
99 ifneq ($(MMX),off)
100 ifneq ($(MMX),on)
101 ifneq ($(MMX),)
102         @echo "Invalid specified MMX option : "$(MMX_VAR)"."
103         @echo
104         @echo -n "Possible choices for MMX are 'on' or 'off'"
105         @echo ""
106         @exit 1
107 endif
108         @echo "Setting MMX flag to default value 'on'... (use MMX=on or MMX=off)"
109 endif
110 endif
111
112 informSSE2:
113 ifneq ($(SSE2),off)
114 ifneq ($(SSE2),on)
115 ifneq ($(SSE2),)
116         @echo "Invalid specified SSE option : "$(SSE2)"."
117         @echo
118         @echo -n "Possible choices for SSE2 are 'on' or 'off'"
119         @echo ""
120         @exit 1
121 endif
122         @echo "Setting SSE2 flag to default value 'on'... (use SSE2=on or SSE2=off)"
123 endif
124 endif
125
126 # pixman compilation and linking
127 $(CFG_VAR)/%.obj: %.c $(BUILT_SOURCES)
128         @mkdir -p $(CFG_VAR)
129         @$(CC) -c $(CFLAGS) -Fo"$@" $<
130
131 $(CFG_VAR)/$(LIBRARY).lib: $(OBJECTS)
132         lib -NOLOGO -OUT:$@ $(OBJECTS) || exit 0
133
134 pixman-combine32.c: pixman-combine.c.template pixman-combine32.h make-combine.pl
135         perl ./make-combine.pl 8 < $< > $@ || ($(RM) $@; exit 1)
136 pixman-combine32.h: pixman-combine.h.template make-combine.pl
137         perl ./make-combine.pl 8 < $< > $@ || ($(RM) $@; exit 1)
138
139 pixman-combine64.c: pixman-combine.c.template pixman-combine64.h make-combine.pl
140         perl ./make-combine.pl 16 < $< > $@ || ($(RM) $@; exit 1)
141 pixman-combine64.h: pixman-combine.h.template make-combine.pl
142         perl ./make-combine.pl 16 < $< > $@ || ($(RM) $@; exit 1)
143
144 clean_r:
145         @rm -f $(CFG_VAR)/*.obj $(CFG_VAR)/*.lib $(CFG_VAR)/*.pdb $(CFG)/*.ilk || exit 0
146         @rm -f $(CFG)/*.obj $(CFG)/*.lib $(CFG)/*.pdb $(CFG)/*.ilk $(BUILT_SOURCES) || exit 0