NMake ICU option builds with builtin ICU (#375)
This commit is contained in:
parent
75fa884f92
commit
4cd0cd6791
|
@ -23,11 +23,6 @@ $<
|
||||||
$<
|
$<
|
||||||
<<
|
<<
|
||||||
|
|
||||||
{..\src\}.cc{$(CFG)\$(PLAT)\harfbuzz-icu\}.obj::
|
|
||||||
$(CXX) $(CFLAGS) $(HB_LIB_CFLAGS) $(HB_ICU_CFLAGS) /Fo$(CFG)\$(PLAT)\harfbuzz-icu\ /c @<<
|
|
||||||
$<
|
|
||||||
<<
|
|
||||||
|
|
||||||
{..\util\}.cc{$(CFG)\$(PLAT)\util\}.obj::
|
{..\util\}.cc{$(CFG)\$(PLAT)\util\}.obj::
|
||||||
$(CXX) $(CFLAGS) $(HB_DEFINES) $(HB_CFLAGS) /Fo$(CFG)\$(PLAT)\util\ /c @<<
|
$(CXX) $(CFLAGS) $(HB_DEFINES) $(HB_CFLAGS) /Fo$(CFG)\$(PLAT)\util\ /c @<<
|
||||||
$<
|
$<
|
||||||
|
@ -48,7 +43,6 @@ $<
|
||||||
|
|
||||||
# Rules for building .lib files
|
# Rules for building .lib files
|
||||||
$(CFG)\$(PLAT)\harfbuzz.lib: $(HARFBUZZ_DLL_FILENAME).dll
|
$(CFG)\$(PLAT)\harfbuzz.lib: $(HARFBUZZ_DLL_FILENAME).dll
|
||||||
$(CFG)\$(PLAT)\harfbuzz-icu.lib: $(HARFBUZZ_ICU_DLL_FILENAME).dll
|
|
||||||
$(CFG)\$(PLAT)\harfbuzz-gobject.lib: $(HARFBUZZ_GOBJECT_DLL_FILENAME).dll
|
$(CFG)\$(PLAT)\harfbuzz-gobject.lib: $(HARFBUZZ_GOBJECT_DLL_FILENAME).dll
|
||||||
|
|
||||||
# Rules for linking DLLs
|
# Rules for linking DLLs
|
||||||
|
@ -64,12 +58,6 @@ $(harfbuzz_dll_OBJS)
|
||||||
<<
|
<<
|
||||||
@-if exist $@.manifest mt /manifest $@.manifest /outputresource:$@;2
|
@-if exist $@.manifest mt /manifest $@.manifest /outputresource:$@;2
|
||||||
|
|
||||||
$(HARFBUZZ_ICU_DLL_FILENAME).dll: $(CFG)\$(PLAT)\harfbuzz.lib $(harfbuzz_icu_OBJS) $(CFG)\$(PLAT)\harfbuzz-icu
|
|
||||||
link /DLL $(LDFLAGS) $(CFG)\$(PLAT)\harfbuzz.lib $(HB_ICU_DEP_LIBS) /implib:$(CFG)\$(PLAT)\harfbuzz-icu.lib -out:$@ @<<
|
|
||||||
$(harfbuzz_icu_OBJS)
|
|
||||||
<<
|
|
||||||
@-if exist $@.manifest mt /manifest $@.manifest /outputresource:$@;2
|
|
||||||
|
|
||||||
$(HARFBUZZ_GOBJECT_DLL_FILENAME).dll: $(CFG)\$(PLAT)\harfbuzz.lib $(harfbuzz_gobject_OBJS) $(CFG)\$(PLAT)\harfbuzz-gobject
|
$(HARFBUZZ_GOBJECT_DLL_FILENAME).dll: $(CFG)\$(PLAT)\harfbuzz.lib $(harfbuzz_gobject_OBJS) $(CFG)\$(PLAT)\harfbuzz-gobject
|
||||||
link /DLL $(LDFLAGS) $(CFG)\$(PLAT)\harfbuzz.lib $(HB_GOBJECT_DEP_LIBS) /implib:$(CFG)\$(PLAT)\harfbuzz-gobject.lib -out:$@ @<<
|
link /DLL $(LDFLAGS) $(CFG)\$(PLAT)\harfbuzz.lib $(HB_GOBJECT_DEP_LIBS) /implib:$(CFG)\$(PLAT)\harfbuzz-gobject.lib -out:$@ @<<
|
||||||
$(harfbuzz_gobject_OBJS)
|
$(harfbuzz_gobject_OBJS)
|
||||||
|
@ -131,7 +119,6 @@ clean:
|
||||||
@-del /f /q $(CFG)\$(PLAT)\*.obj
|
@-del /f /q $(CFG)\$(PLAT)\*.obj
|
||||||
@-if exist $(CFG)\$(PLAT)\util del /f /q $(CFG)\$(PLAT)\util\*.obj
|
@-if exist $(CFG)\$(PLAT)\util del /f /q $(CFG)\$(PLAT)\util\*.obj
|
||||||
@-if exist $(CFG)\$(PLAT)\harfbuzz-gobject del /f /q $(CFG)\$(PLAT)\harfbuzz-gobject\*.obj
|
@-if exist $(CFG)\$(PLAT)\harfbuzz-gobject del /f /q $(CFG)\$(PLAT)\harfbuzz-gobject\*.obj
|
||||||
@-if exist $(CFG)\$(PLAT)\harfbuzz-icu del /f /q $(CFG)\$(PLAT)\harfbuzz-icu\*.obj
|
|
||||||
@-del /f /q $(CFG)\$(PLAT)\harfbuzz\*.obj
|
@-del /f /q $(CFG)\$(PLAT)\harfbuzz\*.obj
|
||||||
@-rmdir /s /q $(CFG)\$(PLAT)
|
@-rmdir /s /q $(CFG)\$(PLAT)
|
||||||
@-if exist $(CFG)\$(PLAT)\harfbuzz-gobject\hb-gobject-enums.h del $(CFG)\$(PLAT)\harfbuzz-gobject\hb-gobject-enums.h
|
@-if exist $(CFG)\$(PLAT)\harfbuzz-gobject\hb-gobject-enums.h del $(CFG)\$(PLAT)\harfbuzz-gobject\hb-gobject-enums.h
|
||||||
|
|
|
@ -60,29 +60,12 @@ HB_TESTS_DEP_LIBS = $(HB_GLIB_LIBS)
|
||||||
# Use libtool-style DLL names, if desired
|
# Use libtool-style DLL names, if desired
|
||||||
!if "$(LIBTOOL_DLL_NAME)" == "1"
|
!if "$(LIBTOOL_DLL_NAME)" == "1"
|
||||||
HARFBUZZ_DLL_FILENAME = $(CFG)\$(PLAT)\libharfbuzz-0
|
HARFBUZZ_DLL_FILENAME = $(CFG)\$(PLAT)\libharfbuzz-0
|
||||||
HARFBUZZ_ICU_DLL_FILENAME = $(CFG)\$(PLAT)\libharfbuzz-icu-0
|
|
||||||
HARFBUZZ_GOBJECT_DLL_FILENAME = $(CFG)\$(PLAT)\libharfbuzz-gobject-0
|
HARFBUZZ_GOBJECT_DLL_FILENAME = $(CFG)\$(PLAT)\libharfbuzz-gobject-0
|
||||||
!else
|
!else
|
||||||
HARFBUZZ_DLL_FILENAME = $(CFG)\$(PLAT)\harfbuzz-vs$(VSVER)
|
HARFBUZZ_DLL_FILENAME = $(CFG)\$(PLAT)\harfbuzz-vs$(VSVER)
|
||||||
HARFBUZZ_ICU_DLL_FILENAME = $(CFG)\$(PLAT)\harfbuzz-icu-vs$(VSVER)
|
|
||||||
HARFBUZZ_GOBJECT_DLL_FILENAME = $(CFG)\$(PLAT)\harfbuzz-gobject-vs$(VSVER)
|
HARFBUZZ_GOBJECT_DLL_FILENAME = $(CFG)\$(PLAT)\harfbuzz-gobject-vs$(VSVER)
|
||||||
!endif
|
!endif
|
||||||
|
|
||||||
# Enable HarfBuzz-ICU, if desired
|
|
||||||
!if "$(ICU)" == "1"
|
|
||||||
HB_ICU_CFLAGS =
|
|
||||||
HB_LIBS = \
|
|
||||||
$(HB_LIBS) \
|
|
||||||
$(CFG)\$(PLAT)\harfbuzz-icu.lib
|
|
||||||
|
|
||||||
# We don't want to re-define int8_t Visual Studio 2008, will cause build breakage
|
|
||||||
# as we define it in hb-common.h, and we ought to use the definitions there.
|
|
||||||
!if "$(VSVER)" == "9"
|
|
||||||
HB_ICU_CFLAGS = /DU_HAVE_INT8_T
|
|
||||||
!endif
|
|
||||||
|
|
||||||
!endif
|
|
||||||
|
|
||||||
# Enable Introspection (enables HarfBuzz-Gobject as well)
|
# Enable Introspection (enables HarfBuzz-Gobject as well)
|
||||||
!if "$(INTROSPECTION)" == "1"
|
!if "$(INTROSPECTION)" == "1"
|
||||||
GOBJECT = 1
|
GOBJECT = 1
|
||||||
|
@ -181,6 +164,26 @@ HB_TESTS = \
|
||||||
$(CFG)\$(PLAT)\test-unicode.exe \
|
$(CFG)\$(PLAT)\test-unicode.exe \
|
||||||
$(CFG)\$(PLAT)\test-version.exe
|
$(CFG)\$(PLAT)\test-version.exe
|
||||||
|
|
||||||
|
!elseif "$(ICU)" == "1"
|
||||||
|
# use ICU for Unicode functions
|
||||||
|
# and define some of the macros in GLib's msvc_recommended_pragmas.h
|
||||||
|
# to reduce some unneeded build-time warnings
|
||||||
|
HB_DEFINES = $(HB_DEFINES) /DHAVE_ICU=1 /DHAVE_ICU_BUILTIN=1
|
||||||
|
HB_CFLAGS = \
|
||||||
|
$(HB_CFLAGS) \
|
||||||
|
/wd4244 \
|
||||||
|
/D_CRT_SECURE_NO_WARNINGS \
|
||||||
|
/D_CRT_NONSTDC_NO_WARNINGS
|
||||||
|
|
||||||
|
# We don't want ICU to re-define int8_t in VS 2008, will cause build breakage
|
||||||
|
# as we define it in hb-common.h, and we ought to use the definitions there.
|
||||||
|
!if "$(VSVER)" == "9"
|
||||||
|
HB_CFLAGS = $(HB_CFLAGS) /DU_HAVE_INT8_T
|
||||||
|
!endif
|
||||||
|
|
||||||
|
HB_SOURCES = $(HB_SOURCES) $(HB_ICU_sources)
|
||||||
|
HB_HEADERS = $(HB_HEADERS) $(HB_ICU_headers)
|
||||||
|
HB_DEP_LIBS = $(HB_DEP_LIBS) $(HB_ICU_DEP_LIBS)
|
||||||
!else
|
!else
|
||||||
# If there is no GLib support, use the built-in UCDN
|
# If there is no GLib support, use the built-in UCDN
|
||||||
# and define some of the macros in GLib's msvc_recommended_pragmas.h
|
# and define some of the macros in GLib's msvc_recommended_pragmas.h
|
||||||
|
|
|
@ -59,19 +59,6 @@ NULL=
|
||||||
!endif
|
!endif
|
||||||
!endif
|
!endif
|
||||||
|
|
||||||
# For HarfBuzz-ICU
|
|
||||||
!if "$(ICU)" == "1"
|
|
||||||
|
|
||||||
!if [call create-lists.bat header hb_objs.mak harfbuzz_icu_OBJS]
|
|
||||||
!endif
|
|
||||||
|
|
||||||
!if [for %c in ($(HB_ICU_sources)) do @if "%~xc" == ".cc" @call create-lists.bat file hb_objs.mak ^$(CFG)\^$(PLAT)\harfbuzz-icu\%~nc.obj]
|
|
||||||
!endif
|
|
||||||
|
|
||||||
!if [call create-lists.bat footer hb_objs.mak]
|
|
||||||
!endif
|
|
||||||
!endif
|
|
||||||
|
|
||||||
# For the utility programs (GLib support is required)
|
# For the utility programs (GLib support is required)
|
||||||
!if "$(GLIB)" == "1"
|
!if "$(GLIB)" == "1"
|
||||||
|
|
||||||
|
|
|
@ -110,7 +110,9 @@ VALID_CFGSET = TRUE
|
||||||
# the resulting binaries
|
# the resulting binaries
|
||||||
!if "$(CFG)" == "release"
|
!if "$(CFG)" == "release"
|
||||||
CFLAGS_ADD = /MD /O2 /GL /MP
|
CFLAGS_ADD = /MD /O2 /GL /MP
|
||||||
!if "$(VSVER)" != "9"
|
!if $(VSVER) > 9 && $(VSVER) < 14
|
||||||
|
# Undocumented "enhance optimized debugging" switch. Became documented
|
||||||
|
# as "/Zo" in VS 2013 Update 3, and is turned on by default in VS 2015.
|
||||||
CFLAGS_ADD = $(CFLAGS_ADD) /d2Zi+
|
CFLAGS_ADD = $(CFLAGS_ADD) /d2Zi+
|
||||||
!endif
|
!endif
|
||||||
!else
|
!else
|
||||||
|
|
|
@ -22,5 +22,5 @@ $(HB_GOBJECT_ENUM_GENERATED_SOURCES): ..\src\hb-gobject-enums.h.tmpl ..\src\hb-g
|
||||||
!endif
|
!endif
|
||||||
|
|
||||||
# Create the build directories
|
# Create the build directories
|
||||||
$(CFG)\$(PLAT)\harfbuzz $(CFG)\$(PLAT)\harfbuzz-icu $(CFG)\$(PLAT)\harfbuzz-gobject $(CFG)\$(PLAT)\util:
|
$(CFG)\$(PLAT)\harfbuzz $(CFG)\$(PLAT)\harfbuzz-gobject $(CFG)\$(PLAT)\util:
|
||||||
@-md $@
|
@-md $@
|
||||||
|
|
|
@ -11,6 +11,8 @@ BUILT_TOOLS = hb-shape.exe hb-ot-shape-closure.exe
|
||||||
!if "$(CAIRO_FT)" == "1"
|
!if "$(CAIRO_FT)" == "1"
|
||||||
BUILT_TOOLS = hb-view.exe $(BUILT_TOOLS)
|
BUILT_TOOLS = hb-view.exe $(BUILT_TOOLS)
|
||||||
!endif
|
!endif
|
||||||
|
!elseif "$(ICU)" == "1"
|
||||||
|
UNICODE_IMPL = ICU
|
||||||
!else
|
!else
|
||||||
UNICODE_IMPL = ucdn
|
UNICODE_IMPL = ucdn
|
||||||
!endif
|
!endif
|
||||||
|
@ -31,10 +33,6 @@ INC_FEATURES = $(INC_FEATURES) Uniscribe
|
||||||
INC_FEATURES = $(INC_FEATURES) DirectWrite
|
INC_FEATURES = $(INC_FEATURES) DirectWrite
|
||||||
!endif
|
!endif
|
||||||
|
|
||||||
!if "$(ICU)" == "1"
|
|
||||||
BUILT_LIBRARIES = $(BUILT_LIBRARIES) HarfBuzz-ICU
|
|
||||||
!endif
|
|
||||||
|
|
||||||
!if "$(GOBJECT)" == "1"
|
!if "$(GOBJECT)" == "1"
|
||||||
BUILT_LIBRARIES = $(BUILT_LIBRARIES) HarfBuzz-GObject
|
BUILT_LIBRARIES = $(BUILT_LIBRARIES) HarfBuzz-GObject
|
||||||
!endif
|
!endif
|
||||||
|
@ -101,20 +99,20 @@ help:
|
||||||
@echo library. Enables the build of utility programs.
|
@echo library. Enables the build of utility programs.
|
||||||
@echo.
|
@echo.
|
||||||
@echo ICU:
|
@echo ICU:
|
||||||
@echo Enable the HarfBuzz-ICU layout library, requires the International
|
@echo Enable build with ICU Unicode functions, requires the International
|
||||||
@echo Components for Unicode (ICU) libraries.
|
@echo Components for Unicode (ICU) libraries.
|
||||||
@echo.
|
@echo.
|
||||||
@echo GOBJECT:
|
@echo GOBJECT:
|
||||||
@echo Enable the HarfBuzz-GObject library, also implies GLib2 support,
|
@echo Enable the HarfBuzz-GObject library, also implies GLib2 support,
|
||||||
@echo requires the GNOME GLib2 libraries and tools, notably the glib-mkenums
|
@echo requires the GNOME GLib2 libraries and tools, notably the glib-mkenums
|
||||||
@echo tool script, which will require a PERL interpretor (use
|
@echo tool script, which will require a PERL interpreter (use
|
||||||
@echo PERL=^$(PATH_TO_PERL_INTERPRETOR)) if it is not already in your PATH).
|
@echo PERL=^$(PATH_TO_PERL_INTERPRETOR)) if it is not already in your PATH).
|
||||||
@echo.
|
@echo.
|
||||||
@echo INTROSPECTION:
|
@echo INTROSPECTION:
|
||||||
@echo Enable the build of introspection files, also implies GObject/GLib2 support,
|
@echo Enable the build of introspection files, also implies GObject/GLib2 support,
|
||||||
@echo requires the GNOME gobject-introspection libraries and tools. You will need
|
@echo requires the GNOME gobject-introspection libraries and tools. You will need
|
||||||
@echo to ensure the pkg-config (.pc) files can be found for GObject-2.0 and the
|
@echo to ensure the pkg-config (.pc) files can be found for GObject-2.0 and the
|
||||||
@echo Python interpretor (that was used to build the gobject-introsoection tools)
|
@echo Python interpreter (that was used to build the gobject-introspection tools)
|
||||||
@echo can be found by setting PKG_CONFIG_PATH beforehand, and passing in PYTHON=
|
@echo can be found by setting PKG_CONFIG_PATH beforehand, and passing in PYTHON=
|
||||||
@echo ^$(PATH_TO_PYTHON_INTERPRETOR) respectively, if python.exe is not already
|
@echo ^$(PATH_TO_PYTHON_INTERPRETOR) respectively, if python.exe is not already
|
||||||
@echo in your PATH.
|
@echo in your PATH.
|
||||||
|
|
|
@ -8,9 +8,6 @@ install: all
|
||||||
@copy /b $(HARFBUZZ_DLL_FILENAME).dll $(PREFIX)\bin
|
@copy /b $(HARFBUZZ_DLL_FILENAME).dll $(PREFIX)\bin
|
||||||
@copy /b $(HARFBUZZ_DLL_FILENAME).pdb $(PREFIX)\bin
|
@copy /b $(HARFBUZZ_DLL_FILENAME).pdb $(PREFIX)\bin
|
||||||
@copy /b $(CFG)\$(PLAT)\harfbuzz.lib $(PREFIX)\lib
|
@copy /b $(CFG)\$(PLAT)\harfbuzz.lib $(PREFIX)\lib
|
||||||
@if exist $(HARFBUZZ_ICU_DLL_FILENAME).dll copy /b $(HARFBUZZ_ICU_DLL_FILENAME).dll $(PREFIX)\bin
|
|
||||||
@if exist $(HARFBUZZ_ICU_DLL_FILENAME).dll copy /b $(HARFBUZZ_ICU_DLL_FILENAME).pdb $(PREFIX)\bin
|
|
||||||
@if exist $(HARFBUZZ_ICU_DLL_FILENAME).dll copy /b $(CFG)\$(PLAT)\harfbuzz-icu.lib $(PREFIX)\lib
|
|
||||||
@if exist $(HARFBUZZ_GOBJECT_DLL_FILENAME).dll copy /b $(HARFBUZZ_GOBJECT_DLL_FILENAME).dll $(PREFIX)\bin
|
@if exist $(HARFBUZZ_GOBJECT_DLL_FILENAME).dll copy /b $(HARFBUZZ_GOBJECT_DLL_FILENAME).dll $(PREFIX)\bin
|
||||||
@if exist $(HARFBUZZ_GOBJECT_DLL_FILENAME).dll copy /b $(HARFBUZZ_GOBJECT_DLL_FILENAME).pdb $(PREFIX)\bin
|
@if exist $(HARFBUZZ_GOBJECT_DLL_FILENAME).dll copy /b $(HARFBUZZ_GOBJECT_DLL_FILENAME).pdb $(PREFIX)\bin
|
||||||
@if exist $(HARFBUZZ_GOBJECT_DLL_FILENAME).dll copy /b $(CFG)\$(PLAT)\harfbuzz-gobject.lib $(PREFIX)\lib
|
@if exist $(HARFBUZZ_GOBJECT_DLL_FILENAME).dll copy /b $(CFG)\$(PLAT)\harfbuzz-gobject.lib $(PREFIX)\lib
|
||||||
|
@ -21,7 +18,6 @@ install: all
|
||||||
@if exist $(CFG)\$(PLAT)\hb-shape.exe copy /b $(CFG)\$(PLAT)\hb-shape.exe $(PREFIX)\bin
|
@if exist $(CFG)\$(PLAT)\hb-shape.exe copy /b $(CFG)\$(PLAT)\hb-shape.exe $(PREFIX)\bin
|
||||||
@if exist $(CFG)\$(PLAT)\hb-shape.exe copy /b $(CFG)\$(PLAT)\hb-shape.pdb $(PREFIX)\bin
|
@if exist $(CFG)\$(PLAT)\hb-shape.exe copy /b $(CFG)\$(PLAT)\hb-shape.pdb $(PREFIX)\bin
|
||||||
@for %h in ($(HB_ACTUAL_HEADERS)) do @copy %h $(PREFIX)\include\harfbuzz
|
@for %h in ($(HB_ACTUAL_HEADERS)) do @copy %h $(PREFIX)\include\harfbuzz
|
||||||
@if exist $(HARFBUZZ_ICU_DLL_FILENAME).dll for %h in ($(HB_ICU_headers)) do @copy ..\src\%h $(PREFIX)\include\harfbuzz
|
|
||||||
@if exist $(HARFBUZZ_GOBJECT_DLL_FILENAME).dll for %h in ($(HB_GOBJECT_headers)) do @copy ..\src\%h $(PREFIX)\include\harfbuzz
|
@if exist $(HARFBUZZ_GOBJECT_DLL_FILENAME).dll for %h in ($(HB_GOBJECT_headers)) do @copy ..\src\%h $(PREFIX)\include\harfbuzz
|
||||||
@if exist $(HARFBUZZ_GOBJECT_DLL_FILENAME).dll copy $(CFG)\$(PLAT)\harfbuzz-gobject\hb-gobject-enums.h $(PREFIX)\include\harfbuzz
|
@if exist $(HARFBUZZ_GOBJECT_DLL_FILENAME).dll copy $(CFG)\$(PLAT)\harfbuzz-gobject\hb-gobject-enums.h $(PREFIX)\include\harfbuzz
|
||||||
@rem Copy the generated introspection files
|
@rem Copy the generated introspection files
|
||||||
|
|
Loading…
Reference in New Issue