-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.win32.common
61 lines (47 loc) · 1.25 KB
/
Makefile.win32.common
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
LIBRARY = pixman-1
CC = cl
LD = link
AR = lib
PERL = perl
ifneq ($(shell echo ""),)
RM = del
endif
ifeq ($(top_builddir),)
top_builddir = $(top_srcdir)
endif
CFG_VAR = $(CFG)
ifeq ($(CFG_VAR),)
CFG_VAR = release
endif
ifeq ($(CFG_VAR),debug)
CFG_CFLAGS = -MDd -Od -Zi
CFG_LDFLAGS = -DEBUG
else
CFG_CFLAGS = -MD -O2
CFG_LDFLAGS =
endif
# Package definitions, to be used instead of those provided in config.h
PKG_CFLAGS = -DPACKAGE=$(LIBRARY) -DPACKAGE_VERSION="" -DPACKAGE_BUGREPORT=""
BASE_CFLAGS = -nologo -I. -I$(top_srcdir) -I$(top_srcdir)/pixman
PIXMAN_CFLAGS = $(BASE_CFLAGS) $(PKG_CFLAGS) $(CFG_CFLAGS) $(CFLAGS)
PIXMAN_LDFLAGS = -nologo $(CFG_LDFLAGS) $(LDFLAGS)
PIXMAN_ARFLAGS = -nologo $(LDFLAGS)
inform:
ifneq ($(CFG),release)
ifneq ($(CFG),debug)
ifneq ($(CFG),)
@echo "Invalid specified configuration option: "$(CFG)"."
@echo
@echo "Possible choices for configuration are 'release' and 'debug'"
@exit 1
endif
@echo "Using default RELEASE configuration... (use CFG=release or CFG=debug)"
endif
endif
$(CFG_VAR):
@mkdir $@
$(CFG_VAR)/%.obj: %.c $(libpixman_headers) | $(CFG_VAR)
@$(CC) -c $(PIXMAN_CFLAGS) -Fo"$@" $<
clean: inform $(CFG_VAR)
@cd $(CFG_VAR) && echo > silence_error.exe && $(RM) *.exe *.ilk *.lib *.obj *.pdb
.PHONY: inform clean