summaryrefslogtreecommitdiff
path: root/build/Makefile.win32.common
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@behdad.org>2008-09-22 22:34:57 -0400
committerBehdad Esfahbod <behdad@behdad.org>2008-09-22 22:46:05 -0400
commit0bedbe78fe236cc9dabec87dea0f71714acfb76a (patch)
tree1dd569bc4091388b320199730b2ab4e49aae76af /build/Makefile.win32.common
parentebb5eb57b7cab7e5fc4b3215969a459f49d95fbb (diff)
[Makefile.win32] Misc cleanup
Diffstat (limited to 'build/Makefile.win32.common')
-rw-r--r--build/Makefile.win32.common29
1 files changed, 21 insertions, 8 deletions
diff --git a/build/Makefile.win32.common b/build/Makefile.win32.common
index 46effba0..711a56f5 100644
--- a/build/Makefile.win32.common
+++ b/build/Makefile.win32.common
@@ -1,5 +1,11 @@
+default: all
+
include $(top_srcdir)/build/Makefile.win32.features
+ifeq ($(top_builddir),)
+top_builddir = $(top_srcdir)
+endif
+
CC := cl
LINK := link
@@ -9,20 +15,27 @@ else
OPT := -O2
endif
-PIXMAN_DIR = $(top_srcdir)/../pixman
-PIXMAN_CFLAGS := -I$(PIXMAN_DIR)/pixman
-PIXMAN_LIBS := $(PIXMAN_DIR)/pixman/$(CFG)/pixman-1.lib
+PIXMAN_CFLAGS := -I$(top_srcdir)/../pixman/pixman
+PIXMAN_LIBS := $(top_builddir)/../pixman/pixman/$(CFG)/pixman-1.lib
-EXE_LDFLAGS = libpng.lib zlib.lib gdi32.lib msimg32.lib user32.lib
+CAIRO_LIBS = gdi32.lib msimg32.lib user32.lib
+ifeq ($(CAIRO_HAS_PNG_FUNCTIONS),1)
+CAIRO_LIBS += libpng.lib
+endif
+ifeq ($(CAIRO_HAS_PS_SURFACE)$(CAIRO_HAS_PDF_SURFACE),00)
+else
+CAIRO_LIBS += zdll.lib
+endif
DEFAULT_CFLAGS = -MD -nologo $(OPT)
DEFAULT_CFLAGS += -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE
-DEFAULT_CFLAGS += -I.
+DEFAULT_CFLAGS += -I. -I$(top_srcdir)
DEFAULT_CFLAGS += $(PIXMAN_CFLAGS)
-CFLAGS := $(DEFAULT_CFLAGS)
+CAIRO_CFLAGS = $(DEFAULT_CFLAGS) $(CFLAGS)
inform:
+ @echo
ifneq ($(CFG),release)
ifneq ($(CFG),debug)
@echo "Invalid configuration "$(CFG)" specified."
@@ -39,11 +52,11 @@ endif
$(CFG)/%.obj: %.c
@mkdir -p $(CFG)
- @$(CC) $(CFLAGS) -c -Fo"$@" $<
+ @$(CC) $(CAIRO_CFLAGS) -c -Fo"$@" $<
$(CFG)/%-static.obj: %.c
@mkdir -p $(CFG)
- @$(CC) $(CFLAGS) -c -DCAIRO_WIN32_STATIC_BUILD=1 -Fo"$@" $<
+ @$(CC) $(CAIRO_CFLAGS) -c -DCAIRO_WIN32_STATIC_BUILD=1 -Fo"$@" $<
clean:
@rm -f $(CFG)/*.obj $(CFG)/*.dll $(CFG)/*.lib $(CFG)/*.pdb $(CFG)/*.ilk || exit 0