mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-01-08 08:20:36 +01:00
[build] Add Makefile.win32.common
This commit is contained in:
parent
984320dff1
commit
0ac7a242f8
7 changed files with 60 additions and 142 deletions
|
|
@ -1,34 +1,7 @@
|
|||
#
|
||||
# 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 += -I.
|
||||
DEFAULT_CFLAGS += $(PIXMAN_CFLAGS)
|
||||
|
||||
CFLAGS := $(DEFAULT_CFLAGS)
|
||||
|
||||
|
||||
# Only if this was called as the top-level makefile
|
||||
ifeq ($(SUBMAKEFILE),)
|
||||
top_srcdir = .
|
||||
include $(top_srcdir)/build/Makefile.win32.common
|
||||
|
||||
SUBDIRS = src
|
||||
|
||||
TEST_SUBDIRS = boilerplate test
|
||||
|
||||
all: inform cairo
|
||||
|
|
@ -52,29 +25,3 @@ test: cairo
|
|||
|
||||
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"$@" $<
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
SUBMAKEFILE = 1
|
||||
|
||||
include ../Makefile.win32
|
||||
top_srcdir = ..
|
||||
include $(top_srcdir)/build/Makefile.win32.common
|
||||
include Makefile.win32.config
|
||||
|
||||
CFLAGS += -I../src
|
||||
|
|
@ -18,19 +17,3 @@ all: $(CFG)/boiler.lib
|
|||
|
||||
$(CFG)/boiler.lib: $(OBJECTS)
|
||||
lib -NOLOGO -OUT:$@ $(OBJECTS) $(WIN_LIBS)
|
||||
|
||||
clean:
|
||||
@rm -f $(CFG)/*.obj $(CFG)/*.dll $(CFG)/*.lib $(CFG)/*.pdb $(CFG)/*.ilk || exit 0
|
||||
|
||||
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
|
||||
|
|
|
|||
47
build/Makefile.win32.common
Normal file
47
build/Makefile.win32.common
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
|
||||
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 += -I.
|
||||
DEFAULT_CFLAGS += $(PIXMAN_CFLAGS)
|
||||
|
||||
CFLAGS := $(DEFAULT_CFLAGS)
|
||||
|
||||
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
|
||||
|
||||
# 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"$@" $<
|
||||
|
||||
clean:
|
||||
@rm -f $(CFG)/*.obj $(CFG)/*.dll $(CFG)/*.lib $(CFG)/*.pdb $(CFG)/*.ilk || exit 0
|
||||
|
|
@ -1,11 +1,5 @@
|
|||
#
|
||||
# Win32 makefile
|
||||
#
|
||||
|
||||
|
||||
SUBMAKEFILE = 1
|
||||
|
||||
include ../Makefile.win32
|
||||
top_srcdir = ..
|
||||
include $(top_srcdir)/build/Makefile.win32.common
|
||||
|
||||
LDFLAGS += ../src/$(CFG)/cairo-static.lib $(PIXMAN_LIBS) ../boilerplate/$(CFG)/boiler.lib $(EXE_LDFLAGS)
|
||||
|
||||
|
|
@ -44,19 +38,3 @@ $(CFG)/cairo-perf.exe: $(OBJECTS)
|
|||
cairo-perf-diff-files:
|
||||
@mkdir -p $(CFG)
|
||||
@$(CC) $(CFLAGS) -Fe"$@" cairo-perf-diff-files.c cairo-stats.c -link $(LDFLAGS)
|
||||
|
||||
clean:
|
||||
@rm -f $(CFG)/*.obj $(CFG)/*.exe $(CFG)/*.dll $(CFG)/*.lib $(CFG)/*.pdb $(CFG)/*.ilk || exit 0
|
||||
|
||||
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
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
SUBMAKEFILE = 1
|
||||
|
||||
include ../Makefile.win32
|
||||
include Makefile.win32.config
|
||||
top_srcdir = ..
|
||||
include $(top_srcdir)/build/Makefile.win32.common
|
||||
include Makefile.win32.features
|
||||
|
||||
SOURCES = $(enabled_cairo_sources)
|
||||
|
||||
|
|
@ -19,19 +18,3 @@ $(CFG)/cairo.dll: $(OBJECTS)
|
|||
|
||||
$(CFG)/cairo-static.lib: $(OBJECTS) $(STATIC_OBJECTS)
|
||||
lib -NOLOGO -OUT:$@ $(PIXMAN_LIBS) $(OBJECTS) $(STATIC_OBJECTS)
|
||||
|
||||
clean:
|
||||
@rm -f $(CFG)/*.obj $(CFG)/*.dll $(CFG)/*.lib $(CFG)/*.pdb $(CFG)/*.ilk || exit 0
|
||||
|
||||
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
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
|
||||
SUBMAKEFILE = 1
|
||||
|
||||
include ../Makefile.win32
|
||||
top_srcdir = ..
|
||||
include $(top_srcdir)/build/Makefile.win32.common
|
||||
|
||||
CFLAGS += -I../src -I../boilerplate -I./pdiff
|
||||
|
||||
|
|
@ -121,19 +119,3 @@ test: $(TEST_EXE)
|
|||
html:
|
||||
@echo Creating index.html...
|
||||
@perl make-html.pl > index.html
|
||||
|
||||
clean:
|
||||
@rm -f $(CFG)/*.obj $(CFG)/*.dll $(CFG)/*.lib $(CFG)/*.pdb $(CFG)/*.ilk $(CFG)/*.exe || exit 0
|
||||
|
||||
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
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
|
||||
SUBMAKEFILE = 1
|
||||
|
||||
include ../../Makefile.win32
|
||||
top_srcdir = ../..
|
||||
include $(top_srcdir)/build/Makefile.win32.common
|
||||
|
||||
CFLAGS += -I../../src
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue