summaryrefslogtreecommitdiff
path: root/libs/pixman-0.40.0/pixman/Makefile.win32
blob: 7b64033bc513e4cf1f1aae64ac55e947daeff2a3 (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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
default: all

top_srcdir = ..
include $(top_srcdir)/pixman/Makefile.sources
include $(top_srcdir)/Makefile.win32.common

MMX_VAR = $(MMX)
ifeq ($(MMX_VAR),)
MMX_VAR=on
endif

SSE2_VAR = $(SSE2)
ifeq ($(SSE2_VAR),)
SSE2_VAR=on
endif

SSSE3_VAR = $(SSSE3)
ifeq ($(SSSE3_VAR),)
SSSE3_VAR=on
endif

MMX_CFLAGS = -DUSE_X86_MMX -w14710 -w14714
SSE2_CFLAGS = -DUSE_SSE2
SSSE3_CFLAGS = -DUSE_SSSE3

# MMX compilation flags
ifeq ($(MMX_VAR),on)
PIXMAN_CFLAGS += $(MMX_CFLAGS)
libpixman_sources += pixman-mmx.c
endif

# SSE2 compilation flags
ifeq ($(SSE2_VAR),on)
PIXMAN_CFLAGS += $(SSE2_CFLAGS)
libpixman_sources += pixman-sse2.c
endif

# SSSE3 compilation flags
ifeq ($(SSSE3_VAR),on)
PIXMAN_CFLAGS += $(SSSE3_CFLAGS)
libpixman_sources += pixman-ssse3.c
endif

OBJECTS = $(patsubst %.c, $(CFG_VAR)/%.obj, $(libpixman_sources))

# targets
all: inform informMMX informSSE2 informSSSE3 $(CFG_VAR)/$(LIBRARY).lib

informMMX:
ifneq ($(MMX),off)
ifneq ($(MMX),on)
ifneq ($(MMX),)
	@echo "Invalid specified MMX option : "$(MMX_VAR)"."
	@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)"
endif
endif

informSSE2:
ifneq ($(SSE2),off)
ifneq ($(SSE2),on)
ifneq ($(SSE2),)
	@echo "Invalid specified SSE option : "$(SSE2)"."
	@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

informSSSE3:
ifneq ($(SSSE3),off)
ifneq ($(SSSE3),on)
ifneq ($(SSSE3),)
	@echo "Invalid specified SSE option : "$(SSSE3)"."
	@echo
	@echo "Possible choices for SSSE3 are 'on' or 'off'"
	@exit 1
endif
	@echo "Setting SSSE3 flag to default value 'on'... (use SSSE3=on or SSSE3=off)"
endif
endif


# pixman linking
$(CFG_VAR)/$(LIBRARY).lib: $(OBJECTS)
	@$(AR) $(PIXMAN_ARFLAGS) -OUT:$@ $^

.PHONY: all informMMX informSSE2 informSSSE3