summaryrefslogtreecommitdiff
path: root/win32/Makefile.vc
blob: 6fd5bff85b133e4e25d0b7a72a6973435f91471b (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
# NMake Makefile for building librsvg on Windows

# The items below this line should not be changed, unless one is maintaining
# the NMake Makefiles.  Customizations can be done in the following NMake Makefile
# portions (please see comments in the these files to see what can be customized):
#
# detectenv-msvc.mak
# config-msvc.mak
!include detectenv-msvc.mak

# Include the Makefile portions with the source listings
!include ..\rsvg-c-srcs.mk

# Include the Makefile portion that enables features based on user input
!include config-msvc.mak

!ifdef INTROSPECTION
!include introspection-msvc.mak
!endif

!if "$(VALID_CFGSET)" == "TRUE"

# We need Visual Studio 2013 or later
!if $(VCVERSION) < 1800
VALID_MSC = FALSE
!else
VALID_MSC = TRUE
!endif

!if "$(VALID_MSC)" == "TRUE"

# Include the Makefile portion to convert the source and header lists
# into the lists we need for compilation and introspection

all: $(RSVG_TOOLS) $(EXTRA_TARGETS) build-info-librsvg

# Include the build rules for Rust builds, sources, DLLs and executables
!include rsvg-rust.mak
!include create-lists-msvc.mak
!include build-rules-msvc.mak

tests: all $(rsvg_tests)
	@set PATH=$(BINDIR);$(PATH)
	set G_TEST_SRCDIR=$(MAKEDIR)\..\librsvg-c\tests-c
	@for %%x in ($(rsvg_tests)) do %%x

rsvg_rust_tests:
	@set PATH=$(BINDIR);%PATH%;%HOMEPATH%\.cargo\bin
	@set GTK_LIB_DIR=$(LIBDIR);$(LIB)
	@set SYSTEM_DEPS_LIBXML2_NO_PKG_CONFIG=1
	@set SYSTEM_DEPS_LIBXML2_LIB=$(LIBXML2_LIB:.lib=)
	@if not "$(PKG_CONFIG_PATH)" == "" set PKG_CONFIG_PATH=$(PKG_CONFIG_PATH)
	@if not "$(PKG_CONFIG)" == "" set PKG_CONFIG=$(PKG_CONFIG)
	$(CARGO_CMD:build=test) $(RUST_VERBOSE_FLAG)
	@set GTK_LIB_DIR=

# Include the rules for build directory creation and code generation
!include generate-msvc.mak

# Generate the introspection files

!if "$(INTROSPECTION)" == "1"
# Include the rules for building the introspection files
!include introspection-msvc.mak
!endif

!include install-msvc.mak

!else # "$(VALID_MSC)" == "TRUE"
all:
	@echo You need Visual Studio 2013 or later.

!endif # "$(VALID_MSC)" == "TRUE"

!else # "$(VALID_CFGSET)" == "TRUE"
all: help
	@echo You need to specify a valid configuration, via CFG=release or CFG=debug
!endif # "$(VALID_CFGSET)" == "TRUE"

!include info-msvc.mak