Skip to content

Commit 99e6ed1

Browse files
committed
NMake Makefiles: Make things more configurable
Add the INCLUDEDIR and LIBDIR options, so that we can set where we find dependent headers and libraries, if they are not in %INCLUDE% and/or %LIB% and are not in $(PREFIX)\include and $(PREFIX)\lib. Also mention about the PREFIX and PERL options, so that one can use them when necessary.
1 parent a5f95c4 commit 99e6ed1

File tree

3 files changed

+24
-4
lines changed

3 files changed

+24
-4
lines changed

MSVC_NMake/config-msvc.mak

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
11
# NMake Makefile portion for enabling features for Windows builds
22

33
# These are the base minimum libraries required for building glibmm.
4-
BASE_INCLUDES = /I$(PREFIX)\include
4+
!ifndef INCLUDEDIR
5+
INCLUDEDIR = $(PREFIX)\include
6+
!endif
7+
!ifndef LIBDIR
8+
LIBDIR = $(PREFIX)\lib
9+
!endif
10+
11+
BASE_INCLUDES = /I$(INCLUDEDIR)
512

613
# Please do not change anything beneath this line unless maintaining the NMake Makefiles
714
LIBXMLXX_MAJOR_VERSION = 5
@@ -19,8 +26,8 @@ LIBXMLXX_BASE_CFLAGS = \
1926
/std:c++17
2027

2128
LIBXMLXX_EXTRA_INCLUDES = \
22-
/I$(PREFIX)\include\libxml2 \
23-
/I$(PREFIX)\include
29+
/I$(INCLUDEDIR)\libxml2 \
30+
/I$(INCLUDEDIR)
2431

2532
LIBXMLXX_CFLAGS = /DLIBXMLPP_BUILD $(LIBXMLXX_BASE_CFLAGS) $(LIBXMLXX_EXTRA_INCLUDES)
2633
LIBXMLXX_EX_CFLAGS = $(LIBXMLXX_BASE_CFLAGS) $(LIBXMLXX_EXTRA_INCLUDES)

MSVC_NMake/detectenv-msvc.mak

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ LDFLAGS_ARCH = /machine:x86
160160
CFLAGS_NOGL = $(CFLAGS_ADD_NO_GL) /W3 /Zi
161161
CFLAGS = $(CFLAGS_ADD) /W3 /Zi
162162

163-
LDFLAGS_BASE = $(LDFLAGS_ARCH) /libpath:$(PREFIX)\lib /DEBUG
163+
LDFLAGS_BASE = $(LDFLAGS_ARCH) /libpath:$(LIBDIR) /DEBUG
164164

165165
!if "$(CFG)" == "debug" || "$(CFG)" == "Debug"
166166
ARFLAGS_NOLTCG = $(LDFLAGS_ARCH)

MSVC_NMake/info-msvc.mak

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,19 @@ help:
3232
@echo.
3333
@echo USE_MESON_LIBS: Use DLLs and LIBs of C++ dependencies that are built with Meson,
3434
@echo as applicable.
35+
@echo.
36+
@echo PERL: Full path to PERL interpreter, if not already in PATH, needed to generate
37+
@echo libxml++config.h and libxml++.rc if not already present in .\libxml++.
38+
@echo.
39+
@echo PREFIX: Base directory to look for dependencies and location for where the
40+
@echo build results are copied, default is in ..\..\^$(short_vs_ver)\^$(platform)
41+
@echo.
42+
@echo INCLUDEDIR: Base include directory to look for dependenct headers,
43+
@echo such as libxml2, default is in ^$(PREFIX)\include.
44+
@echo.
45+
@echo LIBDIR: Base directory to look for dependent libraries, such as libxml2,
46+
@echo default is in ^$(PREFIX)\lib.
47+
@echo.
3548
@echo ======
3649
@echo A 'clean' target is supported to remove all generated files, intermediate
3750
@echo object files and binaries for the specified configuration.

0 commit comments

Comments
 (0)