diff options
-rw-r--r-- | build/Makefile.win32.common | 29 | ||||
-rw-r--r-- | src/Makefile.win32 | 8 |
2 files changed, 25 insertions, 12 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 diff --git a/src/Makefile.win32 b/src/Makefile.win32 index 6f4e89d8..26988869 100644 --- a/src/Makefile.win32 +++ b/src/Makefile.win32 @@ -7,14 +7,14 @@ SOURCES = $(enabled_cairo_sources) STATIC_SOURCES = cairo-system.c OBJECTS = $(patsubst %.c, $(CFG)/%.obj, $(SOURCES)) -STATIC_OBJECTS = $(patsubst %.c, $(CFG)/%-static.obj, $(STATIC_SOURCES)) +OBJECTS_STATIC = $(patsubst %cairo-system.obj, %cairo-system-static.obj, $(OBJECTS)) all: inform $(CFG)/cairo.dll $(CFG)/cairo-static.lib static: inform $(CFG)/cairo-static.lib dynamic: inform $(CFG)/cairo.dll $(CFG)/cairo.dll: $(OBJECTS) - $(CC) -MD -LD -Fe$@ $(PIXMAN_LIBS) $(OBJECTS) -link user32.lib gdi32.lib libpng.lib zdll.lib msimg32.lib + $(CC) -MD -LD -Fe$@ $(PIXMAN_LIBS) $(OBJECTS) -link $(CAIRO_LIBS) -$(CFG)/cairo-static.lib: $(OBJECTS) $(STATIC_OBJECTS) - lib -NOLOGO -OUT:$@ $(PIXMAN_LIBS) $(OBJECTS) $(STATIC_OBJECTS) +$(CFG)/cairo-static.lib: $(OBJECTS_STATIC) + lib -NOLOGO -OUT:$@ $(PIXMAN_LIBS) $(OBJECTS_STATIC) |