blob: a00ff34f9001fb303ccfcdf47755808590f9bc23 (
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
|
#
# Win32 makefile
#
CC := cl
LINK := link
ifeq ($(CFG),debug)
OPT := -Od -Zi
else
OPT := -O2
endif
PIXMAN_CFLAGS := -I../../pixman/pixman
PIXMAN_LIBS := ../../pixman/pixman/$(CFG)/pixman-1.lib
EXE_LDFLAGS = libpng.lib zlib.lib gdi32.lib msimg32.lib user32.lib
DEFAULT_CFLAGS = -MD -nologo $(OPT)
DEFAULT_CFLAGS += -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE
DEFAULT_CFLAGS += -DPACKAGE_BUGREPORT="" -DCAIRO_BUILD
DEFAULT_CFLAGS += -I.
DEFAULT_CFLAGS += $(PIXMAN_CFLAGS)
DEFAULT_CFLAGS += -DCAIRO_NO_MUTEX=1 -DLIBCAIRO_EXPORTS
CFLAGS := $(DEFAULT_CFLAGS)
# Only if this was called as the top-level makefile
ifeq ($(SUBMAKEFILE),)
SUBDIRS = src
TEST_SUBDIRS = boilerplate test
all: inform cairo
src/cairo-features.h:
@echo Warning: creating default cairo-features.h
@cp src/cairo-features-win32.h src/cairo-features.h
cairo: src/cairo-features.h
@list='$(SUBDIRS)'; for f in $$list ; do \
echo making all in $$f... ; \
($(MAKE) -C $$f -f Makefile.win32) || exit 1 ; \
done
test: cairo
@list='$(TEST_SUBDIRS)'; for f in $$list ; do \
echo making all in $$f... ; \
($(MAKE) -C $$f -f Makefile.win32) || exit 1 ; \
done
@(cd test ; make -f Makefile.win32 test)
html:
@(cd test ; make -f Makefile.win32 html)
inform:
ifneq ($(CFG),release)
ifneq ($(CFG),debug)
@echo "Invalid configuration "$(CFG)" specified."
@echo -n "You must specify a configuration when "
@echo "running make, e.g. make CFG=debug"
@echo
@echo -n "Possible choices for configuration are "
@echo "'release' and 'debug'"
@exit 1
endif
endif
endif
# Some generic rules
$(CFG)/%.obj: %.c
@mkdir -p $(CFG)
@$(CC) $(CFLAGS) -c -Fo"$@" $<
$(CFG)/%-static.obj: %.c
@mkdir -p $(CFG)
@$(CC) $(CFLAGS) -c -DCAIRO_WIN32_STATIC_BUILD=1 -Fo"$@" $<
|