Merge pull request #164 from fanc999/msvc.build
Enable Build of HarfBuzz under Visual Studio using NMake Makefilespull/231/head
commit
bdaa784bb6
23 changed files with 1541 additions and 167 deletions
@ -0,0 +1,150 @@ |
||||
NULL =
|
||||
|
||||
# Base and default-included sources and headers
|
||||
|
||||
HB_BASE_sources = \
|
||||
hb-atomic-private.hh \
|
||||
hb-blob.cc \
|
||||
hb-buffer-deserialize-json.hh \
|
||||
hb-buffer-deserialize-text.hh \
|
||||
hb-buffer-private.hh \
|
||||
hb-buffer-serialize.cc \
|
||||
hb-buffer.cc \
|
||||
hb-cache-private.hh \
|
||||
hb-common.cc \
|
||||
hb-face-private.hh \
|
||||
hb-face.cc \
|
||||
hb-font-private.hh \
|
||||
hb-font.cc \
|
||||
hb-mutex-private.hh \
|
||||
hb-object-private.hh \
|
||||
hb-open-file-private.hh \
|
||||
hb-open-type-private.hh \
|
||||
hb-ot-cmap-table.hh \
|
||||
hb-ot-glyf-table.hh \
|
||||
hb-ot-head-table.hh \
|
||||
hb-ot-hhea-table.hh \
|
||||
hb-ot-hmtx-table.hh \
|
||||
hb-ot-maxp-table.hh \
|
||||
hb-ot-name-table.hh \
|
||||
hb-ot-os2-table.hh \
|
||||
hb-ot-tag.cc \
|
||||
hb-private.hh \
|
||||
hb-set-private.hh \
|
||||
hb-set.cc \
|
||||
hb-shape.cc \
|
||||
hb-shape-plan-private.hh \
|
||||
hb-shape-plan.cc \
|
||||
hb-shaper-list.hh \
|
||||
hb-shaper-impl-private.hh \
|
||||
hb-shaper-private.hh \
|
||||
hb-shaper.cc \
|
||||
hb-unicode-private.hh \
|
||||
hb-unicode.cc \
|
||||
hb-utf-private.hh \
|
||||
hb-warning.cc \
|
||||
$(NULL)
|
||||
|
||||
HB_BASE_headers = \
|
||||
hb.h \
|
||||
hb-blob.h \
|
||||
hb-buffer.h \
|
||||
hb-common.h \
|
||||
hb-deprecated.h \
|
||||
hb-face.h \
|
||||
hb-font.h \
|
||||
hb-set.h \
|
||||
hb-shape.h \
|
||||
hb-shape-plan.h \
|
||||
hb-unicode.h \
|
||||
$(NULL)
|
||||
|
||||
HB_NODIST_headers = \
|
||||
hb-version.h \
|
||||
$(NULL)
|
||||
|
||||
HB_FALLBACK_sources = hb-fallback-shape.cc
|
||||
|
||||
HB_OT_sources = \
|
||||
hb-ot-font.cc \
|
||||
hb-ot-layout.cc \
|
||||
hb-ot-layout-common-private.hh \
|
||||
hb-ot-layout-gdef-table.hh \
|
||||
hb-ot-layout-gpos-table.hh \
|
||||
hb-ot-layout-gsubgpos-private.hh \
|
||||
hb-ot-layout-gsub-table.hh \
|
||||
hb-ot-layout-jstf-table.hh \
|
||||
hb-ot-layout-private.hh \
|
||||
hb-ot-map.cc \
|
||||
hb-ot-map-private.hh \
|
||||
hb-ot-shape.cc \
|
||||
hb-ot-shape-complex-arabic.cc \
|
||||
hb-ot-shape-complex-arabic-fallback.hh \
|
||||
hb-ot-shape-complex-arabic-private.hh \
|
||||
hb-ot-shape-complex-arabic-table.hh \
|
||||
hb-ot-shape-complex-arabic-win1256.hh \
|
||||
hb-ot-shape-complex-default.cc \
|
||||
hb-ot-shape-complex-hangul.cc \
|
||||
hb-ot-shape-complex-hebrew.cc \
|
||||
hb-ot-shape-complex-indic.cc \
|
||||
hb-ot-shape-complex-indic-machine.hh \
|
||||
hb-ot-shape-complex-indic-private.hh \
|
||||
hb-ot-shape-complex-indic-table.cc \
|
||||
hb-ot-shape-complex-myanmar.cc \
|
||||
hb-ot-shape-complex-myanmar-machine.hh \
|
||||
hb-ot-shape-complex-thai.cc \
|
||||
hb-ot-shape-complex-tibetan.cc \
|
||||
hb-ot-shape-complex-use.cc \
|
||||
hb-ot-shape-complex-use-machine.hh \
|
||||
hb-ot-shape-complex-use-private.hh \
|
||||
hb-ot-shape-complex-use-table.cc \
|
||||
hb-ot-shape-complex-private.hh \
|
||||
hb-ot-shape-normalize-private.hh \
|
||||
hb-ot-shape-normalize.cc \
|
||||
hb-ot-shape-fallback-private.hh \
|
||||
hb-ot-shape-fallback.cc \
|
||||
hb-ot-shape-private.hh \
|
||||
$(NULL)
|
||||
|
||||
HB_OT_headers = \
|
||||
hb-ot.h \
|
||||
hb-ot-font.h \
|
||||
hb-ot-layout.h \
|
||||
hb-ot-shape.h \
|
||||
hb-ot-tag.h \
|
||||
$(NULL)
|
||||
|
||||
# Optional Sources and Headers with external deps
|
||||
|
||||
HB_FT_sources = hb-ft.cc
|
||||
HB_FT_headers = hb-ft.h
|
||||
|
||||
HB_GLIB_sources = hb-glib.cc
|
||||
HB_GLIB_headers = hb-glib.h
|
||||
|
||||
HB_GRAPHITE2_sources = hb-graphite2.cc
|
||||
HB_GRAPHITE2_headers = hb-graphite2.h
|
||||
|
||||
# System-dependent sources and headers
|
||||
|
||||
HB_CORETEXT_sources = hb-coretext.cc
|
||||
HB_CORETEXT_headers = hb-coretext.h
|
||||
|
||||
HB_DIRECTWRITE_sources = hb-directwrite.cc
|
||||
HB_DIRECTWRITE_headers = hb-directwrite.h
|
||||
|
||||
HB_UNISCRIBE_sources = hb-uniscribe.cc
|
||||
HB_UNISCRIBE_headers = hb-uniscribe.h
|
||||
|
||||
# Additional supplemental sources
|
||||
HB_UCDN_sources = hb-ucdn.cc
|
||||
|
||||
# Sources for libharfbuzz-gobject and libharfbuzz-icu
|
||||
HB_ICU_sources = hb-icu.cc
|
||||
HB_ICU_headers = hb-icu.h
|
||||
|
||||
HB_GOBJECT_sources = hb-gobject-structs.cc
|
||||
HB_GOBJECT_STRUCTS_headers = hb-gobject-structs.h
|
||||
HB_GOBJECT_headers = hb-gobject.h $(HB_GOBJECT_STRUCTS_headers)
|
||||
HB_GOBJECT_ENUM_sources = hb-gobject-enums.cc
|
||||
HB_GOBJECT_ENUM_headers = hb-gobject-enums.h
|
@ -0,0 +1,4 @@ |
||||
LIBHB_UCDN_sources = \
|
||||
ucdn.h \
|
||||
ucdn.c \
|
||||
unicodedata_db.h
|
@ -0,0 +1,32 @@ |
||||
NULL =
|
||||
|
||||
HB_VIEW_sources = \
|
||||
hb-view.cc \
|
||||
options.cc \
|
||||
options.hh \
|
||||
main-font-text.hh \
|
||||
shape-consumer.hh \
|
||||
ansi-print.cc \
|
||||
ansi-print.hh \
|
||||
helper-cairo.cc \
|
||||
helper-cairo.hh \
|
||||
helper-cairo-ansi.cc \
|
||||
helper-cairo-ansi.hh \
|
||||
view-cairo.cc \
|
||||
view-cairo.hh \
|
||||
$(NULL)
|
||||
|
||||
HB_SHAPE_sources = \
|
||||
hb-shape.cc \
|
||||
options.cc \
|
||||
options.hh \
|
||||
main-font-text.hh \
|
||||
shape-consumer.hh \
|
||||
$(NULL)
|
||||
|
||||
HB_OT_SHAPE_CLOSURE_sources = \
|
||||
hb-ot-shape-closure.cc \
|
||||
options.cc \
|
||||
options.hh \
|
||||
main-font-text.hh \
|
||||
$(NULL)
|
@ -0,0 +1,14 @@ |
||||
EXTRA_DIST = \
|
||||
build-rules-msvc.mak \
|
||||
config-msvc.mak \
|
||||
config.h.win32 \
|
||||
create-lists.bat \
|
||||
create-lists-msvc.mak \
|
||||
detectenv-msvc.mak \
|
||||
generate-msvc.mak \
|
||||
hb-introspection-msvc.mak \
|
||||
info-msvc.mak \
|
||||
install.mak \
|
||||
introspection-msvc.mak \
|
||||
Makefile.vc \
|
||||
README.txt
|
@ -0,0 +1,52 @@ |
||||
# NMake Makefile for building HarfBuzz as a DLL 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 ..\src\Makefile.sources |
||||
!include ..\src\hb-ucdn\Makefile.sources |
||||
!include ..\util\Makefile.sources |
||||
|
||||
# Include the Makefile portion that enables features based on user input
|
||||
!include config-msvc.mak |
||||
|
||||
!if "$(VALID_CFGSET)" == "TRUE" |
||||
|
||||
# Include the Makefile portion to convert the source and header lists
|
||||
# into the lists we need for compilation and introspection
|
||||
!include create-lists-msvc.mak |
||||
|
||||
all: $(HB_LIBS) $(HB_UTILS) $(EXTRA_TARGETS) all-build-info |
||||
|
||||
tests: all $(HB_TESTS) |
||||
|
||||
# Include the build rules for sources, DLLs and executables
|
||||
!include build-rules-msvc.mak |
||||
|
||||
# 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 |
||||
!include hb-introspection-msvc.mak |
||||
!endif |
||||
|
||||
!include install.mak |
||||
|
||||
!else |
||||
all: help |
||||
@echo You need to specify a valid configuration, via
|
||||
@echo CFG=release or CFG=debug
|
||||
!endif |
||||
|
||||
!include info-msvc.mak |
@ -0,0 +1,79 @@ |
||||
Instructions for building HarfBuzz on Visual Studio |
||||
=================================================== |
||||
Building the HarfBuzz DLL on Windows is now also supported using Visual Studio |
||||
versions 2008 through 2015, in both 32-bit and 64-bit (x64) flavors, via NMake |
||||
Makefiles. |
||||
|
||||
The following are instructions for performing such a build, as there is a |
||||
number of build configurations supported for the build. Note that for all |
||||
build configurations, the OpenType and Simple TrueType layout (fallback) |
||||
backends are enabled, as well as the Uniscribe platform shaper, and this |
||||
is the base configuration that is built if no options (see below) are |
||||
specified. A 'clean' target is provided-it is recommended that one cleans |
||||
the build and redo the build if any configuration option changed. An |
||||
'install' target is also provided to copy the built items in their appropriate |
||||
locations under $(PREFIX), which is described below. |
||||
|
||||
Invoke the build by issuing the command: |
||||
nmake /f Makefile.vc CFG=[release|debug] [PREFIX=...] <option1=1 option2=1 ...> |
||||
where: |
||||
|
||||
CFG: Required. Choose from a release or debug build. Note that |
||||
all builds generate a .pdb file for each .dll and .exe built--this refers |
||||
to the C/C++ runtime that the build uses. |
||||
|
||||
PREFIX: Optional. Base directory of where the third-party headers, libraries |
||||
and needed tools can be found, i.e. headers in $(PREFIX)\include, |
||||
libraries in $(PREFIX)\lib and tools in $(PREFIX)\bin. If not |
||||
specified, $(PREFIX) is set as $(srcroot)\..\vs$(X)\$(platform), where |
||||
$(platform) is win32 for 32-bit builds or x64 for 64-bit builds, and |
||||
$(X) is the short version of the Visual Studio used, as follows: |
||||
2008: 9 |
||||
2010: 10 |
||||
2012: 11 |
||||
2013: 12 |
||||
2015: 14 |
||||
|
||||
Explanation of options, set by <option>=1: |
||||
------------------------------------------ |
||||
GLIB: Enable GLib support in HarfBuzz, which also uses the GLib unicode |
||||
callback instead of the bundled UCDN unicode callback. This requires the |
||||
GLib libraries, and is required for building all tool and test programs. |
||||
|
||||
GOBJECT: Enable building the HarfBuzz-GObject DLL, and thus implies GLib |
||||
support. This requires the GObject libraries and glib-mkenums script, |
||||
along with PERL to generate the enum sources and headers, which is |
||||
required for the build. |
||||
|
||||
INTROSPECTION: Enable build of introspection files, for making HarfBuzz |
||||
bindings for other programming languages available, such as |
||||
Python, available. This requires the GObject-Introspection |
||||
libraries and tools, along with the Python interpretor that was |
||||
used during the build of GObject-Introspection. Please see |
||||
$(srcroot)\README.python for more related details. This implies |
||||
the build of the HarfBuzz-GObject DLL, along with GLib support. |
||||
|
||||
FREETYPE: Enable the FreeType font callbacks. Requires the FreeType2 library. |
||||
|
||||
CAIRO: Enable Cairo support. Requires the Cairo library. |
||||
|
||||
CAIRO_FT: Enable the build of the hb-view tool, which makes use of Cairo, and |
||||
thus implies FreeType font callback support and Cairo support. |
||||
Requires Cairo libraries built with FreeType support. Note that the |
||||
hb-view tool requires GLib support as well. |
||||
|
||||
GRAPHITE2: Enable the Graphite2 shaper, requires the SIL Graphite2 library. |
||||
|
||||
ICU: Enables the build HarfBuzz-ICU, which is now the recommended layout engine |
||||
for ICU (International Components for Unicode), which deprecated ICU LE. |
||||
Requires the ICU libraries. |
||||
|
||||
DIRECTWRITE: Enable (experimental) DirectWrite platform shaper support, |
||||
requires a rather recent Windows SDK, and at least Windows Vista/ |
||||
Server 2008 with SP2 and platform update. |
||||
|
||||
PYTHON: Full path to the Python interpretor to be used, if it is not in %PATH%. |
||||
|
||||
PERL: Full path to the PERL interpretor to be used, if it is not in %PATH%. |
||||
|
||||
LIBTOOL_DLL_NAME: Enable libtool-style DLL names. |
@ -0,0 +1,140 @@ |
||||
# NMake Makefile portion for compilation rules
|
||||
# Items in here should not need to be edited unless
|
||||
# one is maintaining the NMake build files. The format
|
||||
# of NMake Makefiles here are different from the GNU
|
||||
# Makefiles. Please see the comments about these formats.
|
||||
|
||||
# Inference rules for compiling the .obj files.
|
||||
# Used for libs and programs with more than a single source file.
|
||||
# Format is as follows
|
||||
# (all dirs must have a trailing '\'):
|
||||
#
|
||||
# {$(srcdir)}.$(srcext){$(destdir)}.obj::
|
||||
# $(CC)|$(CXX) $(cflags) /Fo$(destdir) /c @<<
|
||||
# $<
|
||||
# <<
|
||||
{..\src\}.cc{$(CFG)\$(PLAT)\harfbuzz\}.obj:: |
||||
$(CXX) $(CFLAGS) $(HB_DEFINES) $(HB_LIB_CFLAGS) /Fo$(CFG)\$(PLAT)\harfbuzz\ /c @<<
|
||||
$< |
||||
<< |
||||
|
||||
{..\src\hb-ucdn\}.c{$(CFG)\$(PLAT)\harfbuzz\}.obj:: |
||||
$(CC) $(CFLAGS) /Fo$(CFG)\$(PLAT)\harfbuzz\ /c @<<
|
||||
$< |
||||
<< |
||||
|
||||
{..\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:: |
||||
$(CXX) $(CFLAGS) $(HB_DEFINES) $(HB_CFLAGS) /Fo$(CFG)\$(PLAT)\util\ /c @<<
|
||||
$< |
||||
<< |
||||
|
||||
# Inference rules for building the test programs
|
||||
# Used for programs with a single source file.
|
||||
# Format is as follows
|
||||
# (all dirs must have a trailing '\'):
|
||||
#
|
||||
# {$(srcdir)}.$(srcext){$(destdir)}.exe::
|
||||
# $(CC)|$(CXX) $(cflags) $< /Fo$*.obj /Fe$@ [/link $(linker_flags) $(dep_libs)]
|
||||
{..\src\}.cc{$(CFG)\$(PLAT)\}.exe: |
||||
$(CXX) $(CFLAGS) $(HB_DEFINES) $(HB_CFLAGS) $< /Fo$*.obj /Fe$@ /link $(LDFLAGS) $(CFG)\$(PLAT)\harfbuzz.lib $(HB_TESTS_DEP_LIBS)
|
||||
|
||||
{..\test\api\}.c{$(CFG)\$(PLAT)\}.exe: |
||||
$(CXX) $(CFLAGS) $(HB_DEFINES) $(HB_CFLAGS) /DSRCDIR="\"../../../test/api\"" $< /Fo$*.obj /Fe$@ /link $(LDFLAGS) $(CFG)\$(PLAT)\harfbuzz.lib $(HB_TESTS_DEP_LIBS)
|
||||
|
||||
# Rules for building .lib files
|
||||
$(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 |
||||
|
||||
# Rules for linking DLLs
|
||||
# Format is as follows (the mt command is needed for MSVC 2005/2008 builds):
|
||||
# $(dll_name_with_path): $(dependent_libs_files_objects_and_items)
|
||||
# link /DLL [$(linker_flags)] [$(dependent_libs)] [/def:$(def_file_if_used)] [/implib:$(lib_name_if_needed)] -out:$@ @<<
|
||||
# $(dependent_objects)
|
||||
# <<
|
||||
# @-if exist $@.manifest mt /manifest $@.manifest /outputresource:$@;2
|
||||
$(HARFBUZZ_DLL_FILENAME).dll: config.h $(harfbuzz_dll_OBJS) $(CFG)\$(PLAT)\harfbuzz |
||||
link /DLL $(LDFLAGS) $(HB_DEP_LIBS) /implib:$(CFG)\$(PLAT)\harfbuzz.lib -out:$@ @<<
|
||||
$(harfbuzz_dll_OBJS) |
||||
<< |
||||
@-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 |
||||
link /DLL $(LDFLAGS) $(CFG)\$(PLAT)\harfbuzz.lib $(HB_GOBJECT_DEP_LIBS) /implib:$(CFG)\$(PLAT)\harfbuzz-gobject.lib -out:$@ @<<
|
||||
$(harfbuzz_gobject_OBJS) |
||||
<< |
||||
@-if exist $@.manifest mt /manifest $@.manifest /outputresource:$@;2
|
||||
|
||||
# Rules for linking Executables
|
||||
# Format is as follows (the mt command is needed for MSVC 2005/2008 builds):
|
||||
# $(dll_name_with_path): $(dependent_libs_files_objects_and_items)
|
||||
# link [$(linker_flags)] [$(dependent_libs)] -out:$@ @<<
|
||||
# $(dependent_objects)
|
||||
# <<
|
||||
# @-if exist $@.manifest mt /manifest $@.manifest /outputresource:$@;1
|
||||
$(CFG)\$(PLAT)\hb-view.exe: $(CFG)\$(PLAT)\harfbuzz.lib $(CFG)\$(PLAT)\util $(hb_view_OBJS) |
||||
link $(LDFLAGS) $(CFG)\$(PLAT)\harfbuzz.lib $(HB_UTILS_DEP_LIBS) -out:$@ @<<
|
||||
$(hb_view_OBJS) |
||||
<< |
||||
@-if exist $@.manifest mt /manifest $@.manifest /outputresource:$@;1
|
||||
|
||||
$(CFG)\$(PLAT)\hb-shape.exe: $(CFG)\$(PLAT)\harfbuzz.lib $(CFG)\$(PLAT)\util $(hb_shape_OBJS) |
||||
link $(LDFLAGS) $(CFG)\$(PLAT)\harfbuzz.lib $(HB_UTILS_DEP_LIBS) -out:$@ @<<
|
||||
$(hb_shape_OBJS) |
||||
<< |
||||
@-if exist $@.manifest mt /manifest $@.manifest /outputresource:$@;1
|
||||
|
||||
$(CFG)\$(PLAT)\hb-ot-shape-closure.exe: $(CFG)\$(PLAT)\harfbuzz.lib $(CFG)\$(PLAT)\util $(hb_ot_shape_closure_OBJS) |
||||
link $(LDFLAGS) $(CFG)\$(PLAT)\harfbuzz.lib $(HB_UTILS_DEP_LIBS) -out:$@ @<<
|
||||
$(hb_ot_shape_closure_OBJS) |
||||
<< |
||||
@-if exist $@.manifest mt /manifest $@.manifest /outputresource:$@;1
|
||||
|
||||
# Other .obj files requiring individual attention, that could not be covered by the inference rules.
|
||||
# Format is as follows (all dirs must have a trailing '\'):
|
||||
#
|
||||
# $(obj_file):
|
||||
# $(CC)|$(CXX) $(cflags) /Fo$(obj_destdir) /c @<<
|
||||
# $(srcfile)
|
||||
# <<
|
||||
$(CFG)\$(PLAT)\harfbuzz-gobject\hb-gobject-structs.obj: $(CFG)\$(PLAT)\harfbuzz-gobject $(HB_GOBJECT_ENUM_GENERATED_SOURCES) |
||||
$(CXX) $(CFLAGS) $(HB_DEFINES) $(HB_LIB_CFLAGS) /I$(CFG)\$(PLAT)\harfbuzz-gobject /Fo$(CFG)\$(PLAT)\harfbuzz-gobject\ /c @<<
|
||||
..\src\hb-gobject-structs.cc |
||||
<< |
||||
|
||||
$(CFG)\$(PLAT)\harfbuzz-gobject\hb-gobject-enums.obj: $(CFG)\$(PLAT)\harfbuzz-gobject $(HB_GOBJECT_ENUM_GENERATED_SOURCES) |
||||
$(CXX) $(CFLAGS) $(HB_DEFINES) $(HB_LIB_CFLAGS) /I$(CFG)\$(PLAT)\harfbuzz-gobject /Fo$(CFG)\$(PLAT)\harfbuzz-gobject\ /c @<<
|
||||
$(CFG)\$(PLAT)\harfbuzz-gobject\hb-gobject-enums.cc |
||||
<< |
||||
|
||||
clean: |
||||
@-if exist $(CFG)\$(PLAT)\HarfBuzz-0.0.typelib del /f /q $(CFG)\$(PLAT)\HarfBuzz-0.0.typelib
|
||||
@-if exist $(CFG)\$(PLAT)\HarfBuzz-0.0.gir del /f /q $(CFG)\$(PLAT)\HarfBuzz-0.0.gir
|
||||
@-if exist $(CFG)\$(PLAT)\hb_list del /f /q $(CFG)\$(PLAT)\hb_list
|
||||
@-del /f /q $(CFG)\$(PLAT)\*.pdb
|
||||
@-if exist $(CFG)\$(PLAT)\.exe.manifest del /f /q $(CFG)\$(PLAT)\*.exe.manifest
|
||||
@-if exist $(CFG)\$(PLAT)\.exe del /f /q $(CFG)\$(PLAT)\*.exe
|
||||
@-del /f /q $(CFG)\$(PLAT)\*.dll.manifest
|
||||
@-del /f /q $(CFG)\$(PLAT)\*.dll
|
||||
@-del /f /q $(CFG)\$(PLAT)\*.ilk
|
||||
@-del /f /q $(CFG)\$(PLAT)\*.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-icu del /f /q $(CFG)\$(PLAT)\harfbuzz-icu\*.obj
|
||||
@-del /f /q $(CFG)\$(PLAT)\harfbuzz\*.obj
|
||||
@-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.cc del $(CFG)\$(PLAT)\harfbuzz-gobject\hb-gobject-enums.cc
|
||||
@-del vc$(VSVER)0.pdb
|
||||
@-del config.h
|
@ -0,0 +1,198 @@ |
||||
# NMake Makefile portion for enabling features for Windows builds
|
||||
|
||||
# You may change these lines to customize the .lib files that will be linked to
|
||||
# Additional Libraries for building HarfBuzz-ICU
|
||||
# icudt.lib may be required for static ICU builds
|
||||
HB_ICU_DEP_LIBS = icuuc.lib
|
||||
|
||||
# GLib is required for all utility programs and tests
|
||||
HB_GLIB_LIBS = glib-2.0.lib
|
||||
|
||||
# Needed for building HarfBuzz-GObject
|
||||
HB_GOBJECT_DEP_LIBS = gobject-2.0.lib $(HB_GLIB_LIBS)
|
||||
|
||||
# Freetype is needed for building FreeType support and hb-view
|
||||
FREETYPE_LIB = freetype.lib
|
||||
|
||||
# Cairo is needed for building hb-view
|
||||
CAIRO_LIB = cairo.lib
|
||||
|
||||
# Graphite2 is needed for building SIL Graphite2 support
|
||||
GRAPHITE2_LIB = graphite2.lib
|
||||
|
||||
# Directwrite is needed for DirectWrite shaping support
|
||||
DIRECTWRITE_LIB = dwrite.lib
|
||||
|
||||
# Please do not change anything beneath this line unless maintaining the NMake Makefiles
|
||||
# Bare minimum features and sources built into HarfBuzz on Windows
|
||||
HB_DEFINES =
|
||||
HB_CFLAGS = /DHAVE_CONFIG_H
|
||||
HB_UCDN_CFLAGS = /I..\src\hb-ucdn
|
||||
HB_SOURCES = \
|
||||
$(HB_BASE_sources) \
|
||||
$(HB_FALLBACK_sources) \
|
||||
$(HB_OT_sources) \
|
||||
$(HB_UNISCRIBE_sources) \
|
||||
|
||||
HB_HEADERS = \
|
||||
$(HB_BASE_headers) \
|
||||
$(HB_NODIST_headers) \
|
||||
$(HB_OT_headers) \
|
||||
$(HB_UNISCRIBE_headers)
|
||||
|
||||
# Minimal set of (system) libraries needed for the HarfBuzz DLL
|
||||
HB_DEP_LIBS = usp10.lib gdi32.lib rpcrt4.lib user32.lib
|
||||
|
||||
# We build the HarfBuzz DLL/LIB at least
|
||||
HB_LIBS = $(CFG)\$(PLAT)\harfbuzz.lib
|
||||
|
||||
# Note: All the utility and test programs require GLib support to be present!
|
||||
HB_UTILS =
|
||||
HB_UTILS_DEP_LIBS = $(HB_GLIB_LIBS)
|
||||
HB_TESTS =
|
||||
HB_TESTS_DEP_LIBS = $(HB_GLIB_LIBS)
|
||||
|
||||
# Use libtool-style DLL names, if desired
|
||||
!if "$(LIBTOOL_DLL_NAME)" == "1" |
||||
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
|
||||
!else |
||||
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)
|
||||
!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)
|
||||
!if "$(INTROSPECTION)" == "1" |
||||
GOBJECT = 1
|
||||
CHECK_PACKAGE = gobject-2.0
|
||||
EXTRA_TARGETS = $(CFG)\$(PLAT)\HarfBuzz-0.0.gir $(CFG)\$(PLAT)\HarfBuzz-0.0.typelib
|
||||
!else |
||||
EXTRA_TARGETS =
|
||||
!endif |
||||
|
||||
# Enable HarfBuzz-GObject (enables GLib support as well)
|
||||
!if "$(GOBJECT)" == "1" |
||||
GLIB = 1
|
||||
HB_LIBS = \
|
||||
$(HB_LIBS) \
|
||||
$(CFG)\$(PLAT)\harfbuzz-gobject.lib
|
||||
|
||||
HB_GOBJECT_ENUM_GENERATED_SOURCES = \
|
||||
$(CFG)\$(PLAT)\harfbuzz-gobject\hb-gobject-enums.cc \
|
||||
$(CFG)\$(PLAT)\harfbuzz-gobject\hb-gobject-enums.h
|
||||
|
||||
!endif |
||||
|
||||
# Enable cairo-ft (enables cairo and freetype as well)
|
||||
!if "$(CAIRO_FT)" == "1" |
||||
HB_DEFINES = $(HB_DEFINES) /DHAVE_CAIRO_FT=1
|
||||
CAIRO = 1
|
||||
FREETYPE = 1
|
||||
!if "$(GLIB)" == "1" |
||||
HB_UTILS = \
|
||||
$(HB_UTILS) \
|
||||
$(CFG)\$(PLAT)\hb-view.exe
|
||||
|
||||
HB_UTILS_DEP_LIBS = $(HB_UTILS_DEP_LIBS) $(CAIRO_LIB) $(FREETYPE_LIB)
|
||||
!else |
||||
!if [echo Warning: GLib support not enabled, hb-view not built] |
||||
!endif |
||||
!endif |
||||
!endif |
||||
|
||||
# Enable cairo
|
||||
!if "$(CAIRO)" == "1" |
||||
HB_DEFINES = $(HB_DEFINES) /DHAVE_CAIRO=1
|
||||
!endif |
||||
|
||||
# Enable freetype if desired
|
||||
!if "$(FREETYPE)" == "1" |
||||
HB_DEFINES = $(HB_DEFINES) /DHAVE_FREETYPE=1
|
||||
HB_SOURCES = $(HB_SOURCES) $(HB_FT_sources)
|
||||
HB_HEADERS = $(HB_HEADERS) $(HB_FT_headers)
|
||||
HB_DEP_LIBS = $(HB_DEP_LIBS) $(FREETYPE_LIB)
|
||||
!endif |
||||
|
||||
# Enable graphite2 if desired
|
||||
!if "$(GRAPHITE2)" == "1" |
||||
HB_DEFINES = $(HB_DEFINES) /DHAVE_GRAPHITE2=1
|
||||
HB_SOURCES = $(HB_SOURCES) $(HB_GRAPHITE2_sources)
|
||||
HB_HEADERS = $(HB_HEADERS) $(HB_GRAPHITE2_headers)
|
||||
HB_DEP_LIBS = $(HB_DEP_LIBS) $(GRAPHITE2_LIB)
|
||||
!endif |
||||
|
||||
# Enable GLib if desired
|
||||
!if "$(GLIB)" == "1" |
||||
HB_DEFINES = $(HB_DEFINES) /DHAVE_GLIB=1
|
||||
HB_CFLAGS = \
|
||||
$(HB_CFLAGS) \
|
||||
/FImsvc_recommended_pragmas.h \
|
||||
/I$(PREFIX)\include\glib-2.0 \
|
||||
/I$(PREFIX)\lib\glib-2.0\include
|
||||
|
||||
HB_SOURCES = $(HB_SOURCES) $(HB_GLIB_sources)
|
||||
HB_HEADERS = $(HB_HEADERS) $(HB_GLIB_headers)
|
||||
HB_DEP_LIBS = $(HB_DEP_LIBS) $(HB_GLIB_LIBS)
|
||||
|
||||
HB_UTILS = \
|
||||
$(HB_UTILS) \
|
||||
$(CFG)\$(PLAT)\hb-shape.exe \
|
||||
$(CFG)\$(PLAT)\hb-ot-shape-closure.exe
|
||||
|
||||
HB_TESTS = \
|
||||
$(HB_TESTS) \
|
||||
$(CFG)\$(PLAT)\main.exe \
|
||||
$(CFG)\$(PLAT)\test.exe \
|
||||
$(CFG)\$(PLAT)\test-buffer-serialize.exe \
|
||||
$(CFG)\$(PLAT)\test-size-params.exe \
|
||||
$(CFG)\$(PLAT)\test-would-substitute.exe \
|
||||
$(CFG)\$(PLAT)\test-blob.exe \
|
||||
$(CFG)\$(PLAT)\test-buffer.exe \
|
||||
$(CFG)\$(PLAT)\test-common.exe \
|
||||
$(CFG)\$(PLAT)\test-font.exe \
|
||||
$(CFG)\$(PLAT)\test-object.exe \
|
||||
$(CFG)\$(PLAT)\test-set.exe \
|
||||
$(CFG)\$(PLAT)\test-shape.exe \
|
||||
$(CFG)\$(PLAT)\test-unicode.exe \
|
||||
$(CFG)\$(PLAT)\test-version.exe
|
||||
|
||||
!else |
||||
# If there is no GLib support, use the built-in UCDN
|
||||
# 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_UCDN=1
|
||||
HB_CFLAGS = \
|
||||
$(HB_CFLAGS) \
|
||||
$(HB_UCDN_CFLAGS) \
|
||||
/wd4244 \
|
||||
/D_CRT_SECURE_NO_WARNINGS \
|
||||
/D_CRT_NONSTDC_NO_WARNINGS
|
||||
|
||||
HB_SOURCES = $(HB_SOURCES) $(LIBHB_UCDN_sources) $(HB_UCDN_sources)
|
||||
!endif |
||||
|
||||
!if "$(DIRECTWRITE)" == "1" |
||||
HB_CFLAGS = $(HB_CFLAGS) /DHAVE_DIRECTWRITE
|
||||
HB_SOURCES = $(HB_SOURCES) $(HB_DIRECTWRITE_sources)
|
||||
HB_HEADERS = $(HB_HEADERS) $(HB_DIRECTWRITE_headers)
|
||||
HB_DEP_LIBS = $(HB_DEP_LIBS) $(DIRECTWRITE_LIB)
|
||||
!endif |
||||
|
||||
HB_LIB_CFLAGS = $(HB_CFLAGS) /DHB_EXTERN="__declspec (dllexport) extern"
|
@ -0,0 +1,158 @@ |
||||
/* config.h.in. Generated from configure.ac by autoheader. */ |
||||
|
||||
/* The normal alignment of `struct{char;}', in bytes. */ |
||||
#define ALIGNOF_STRUCT_CHAR__ 1 |
||||
|
||||
/* Define to 1 if you have the `atexit' function. */ |
||||
#define HAVE_ATEXIT 1 |
||||
|
||||
/* Have cairo graphics library */ |
||||
/* #undef HAVE_CAIRO */ |
||||
|
||||
/* Have cairo-ft support in cairo graphics library */ |
||||
/* #undef HAVE_CAIRO_FT */ |
||||
|
||||
/* Have Core Text backend */ |
||||
/* #undef HAVE_CORETEXT */ |
||||
|
||||
/* Define to 1 if you have the <dlfcn.h> header file. */ |
||||
/* #undef HAVE_DLFCN_H */ |
||||
|
||||
/* Have DirectWrite Library */ |
||||
/* #undef HAVE_DIRECTWRITE */ |
||||
|
||||
/* Have simple TrueType Layout backend */ |
||||
#define HAVE_FALLBACK 1 |
||||
|
||||
/* Have fontconfig library */ |
||||
/* #undef HAVE_FONTCONFIG */ |
||||
|
||||
/* Have FreeType 2 library */ |
||||
/* #undef HAVE_FREETYPE */ |
||||
|
||||
/* Define to 1 if you have the `getpagesize' function. */ |
||||
/* #undef HAVE_GETPAGESIZE */ |
||||
|
||||
/* Have glib2 library */ |
||||
/* #undef HAVE_GLIB */ |
||||
|
||||
/* Have gobject2 library */ |
||||
/* #undef HAVE_GOBJECT */ |
||||
|
||||
/* Have Graphite2 library */ |
||||
/* #undef HAVE_GRAPHITE2 */ |
||||
|
||||
/* Have ICU library */ |
||||
/* #undef HAVE_ICU */ |
||||
|
||||
/* Have Intel __sync_* atomic primitives */ |
||||
/* #undef HAVE_INTEL_ATOMIC_PRIMITIVES */ |
||||
|
||||
/* Define to 1 if you have the <inttypes.h> header file. */ |
||||
#if !defined (_MSC_VER) || (_MSC_VER >= 1800) |
||||
#define HAVE_INTTYPES_H 1 |
||||
#endif |
||||
|
||||
/* Define to 1 if you have the `isatty' function. */ |
||||
#define HAVE_ISATTY 1 |
||||
|
||||
/* Define to 1 if you have the <memory.h> header file. */ |
||||
#define HAVE_MEMORY_H 1 |
||||
|
||||
/* Define to 1 if you have the `mmap' function. */ |
||||
/* #undef HAVE_MMAP */ |
||||
|
||||
/* Define to 1 if you have the `mprotect' function. */ |
||||
/* #undef HAVE_MPROTECT */ |
||||
|
||||
/* Have native OpenType Layout backend */ |
||||
#define HAVE_OT 1 |
||||
|
||||
/* Have POSIX threads */ |
||||
/* #undef HAVE_PTHREAD */ |
||||
|
||||
/* Have PTHREAD_PRIO_INHERIT. */ |
||||
/* #undef HAVE_PTHREAD_PRIO_INHERIT */ |
||||
|
||||
/* Define to 1 if you have the <sched.h> header file. */ |
||||
/* #undef HAVE_SCHED_H */ |
||||
|
||||
/* Have sched_yield */ |
||||
/* #undef HAVE_SCHED_YIELD */ |
||||
|
||||
/* Have Solaris __machine_*_barrier and atomic_* operations */ |
||||
/* #undef HAVE_SOLARIS_ATOMIC_OPS */ |
||||
|
||||
/* Define to 1 if you have the <stdint.h> header file. */ |
||||
#if !defined (_MSC_VER) || (_MSC_VER >= 1600) |
||||
#define HAVE_STDINT_H 1 |
||||
#endif |
||||
|
||||
/* Define to 1 if you have the <stdlib.h> header file. */ |
||||
#define HAVE_STDLIB_H 1 |
||||
|
||||
/* Define to 1 if you have the <strings.h> header file. */ |
||||
#ifndef _MSC_VER |
||||
#define HAVE_STRINGS_H 1 |
||||
#endif |
||||
|
||||
/* Define to 1 if you have the <string.h> header file. */ |
||||
#define HAVE_STRING_H 1 |
||||
|
||||
/* Define to 1 if you have the `sysconf' function. */ |
||||
/* #undef HAVE_SYSCONF */ |
||||
|
||||
/* Define to 1 if you have the <sys/mman.h> header file. */ |
||||
/* #undef HAVE_SYS_MMAN_H */ |
||||
|
||||
/* Define to 1 if you have the <sys/stat.h> header file. */ |
||||
#define HAVE_SYS_STAT_H 1 |
||||
|
||||
/* Define to 1 if you have the <sys/types.h> header file. */ |
||||
#define HAVE_SYS_TYPES_H 1 |
||||
|
||||
/* Have UCDN Unicode functions */ |
||||
#define HAVE_UCDN 1 |
||||
|
||||
/* Have Uniscribe library */ |
||||
#define HAVE_UNISCRIBE 1 |
||||
|
||||
/* Define to 1 if you have the <unistd.h> header file. */ |
||||
#ifndef _MSC_VER |
||||
#define HAVE_UNISTD_H 1 |
||||
#endif |
||||
|
||||
/* Define to 1 if you have the <usp10.h> header file. */ |
||||
#define HAVE_USP10_H 1 |
||||
|
||||
/* Define to 1 if you have the <windows.h> header file. */ |
||||
#define HAVE_WINDOWS_H 1 |
||||
|
||||
/* Define to the sub-directory in which libtool stores uninstalled libraries. |
||||
*/ |
||||
#define LT_OBJDIR ".libs/" |
||||
|
||||
/* Define to the address where bug reports for this package should be sent. */ |
||||
#define PACKAGE_BUGREPORT "@PACKAGE_BUGREPORT@" |
||||
|
||||
/* Define to the full name of this package. */ |
||||
#define PACKAGE_NAME "@PACKAGE_NAME@" |
||||
|
||||
/* Define to the full name and version of this package. */ |
||||
#define PACKAGE_STRING "@PACKAGE_NAME@ @PACKAGE_VERSION@" |
||||
|
||||
/* Define to the one symbol short name of this package. */ |
||||
#define PACKAGE_TARNAME "@PACKAGE_TARNAME@" |
||||
|
||||
/* Define to the home page for this package. */ |
||||
#define PACKAGE_URL "@PACKAGE_URL@" |
||||
|
||||
/* Define to the version of this package. */ |
||||
#define PACKAGE_VERSION "@PACKAGE_VERSION@" |
||||
|
||||
/* Define to necessary symbol if this constant uses a non-standard name on |
||||
your system. */ |
||||
/* #undef PTHREAD_CREATE_JOINABLE */ |
||||
|
||||
/* Define to 1 if you have the ANSI C header files. */ |
||||
#define STDC_HEADERS 1 |
@ -0,0 +1,151 @@ |
||||
# Convert the source listing to object (.obj) listing in
|
||||
# another NMake Makefile module, include it, and clean it up.
|
||||
# This is a "fact-of-life" regarding NMake Makefiles...
|
||||
# This file does not need to be changed unless one is maintaining the NMake Makefiles
|
||||
|
||||
# For those wanting to add things here:
|
||||
# To add a list, do the following:
|
||||
# # $(description_of_list)
|
||||
# if [call create-lists.bat header $(makefile_snippet_file) $(variable_name)]
|
||||
# endif
|
||||
#
|
||||
# if [call create-lists.bat file $(makefile_snippet_file) $(file_name)]
|
||||
# endif
|
||||
#
|
||||
# if [call create-lists.bat footer $(makefile_snippet_file)]
|
||||
# endif
|
||||
# ... (repeat the if [call ...] lines in the above order if needed)
|
||||
# !include $(makefile_snippet_file)
|
||||
#
|
||||
# (add the following after checking the entries in $(makefile_snippet_file) is correct)
|
||||
# (the batch script appends to $(makefile_snippet_file), you will need to clear the file unless the following line is added)
|
||||
#!if [del /f /q $(makefile_snippet_file)]
|
||||
#!endif
|
||||
|
||||
# In order to obtain the .obj filename that is needed for NMake Makefiles to build DLLs/static LIBs or EXEs, do the following
|
||||
# instead when doing 'if [call create-lists.bat file $(makefile_snippet_file) $(file_name)]'
|
||||
# (repeat if there are multiple $(srcext)'s in $(source_list), ignore any headers):
|
||||
# !if [for %c in ($(source_list)) do @if "%~xc" == ".$(srcext)" @call create-lists.bat file $(makefile_snippet_file) $(intdir)\%~nc.obj]
|
||||
#
|
||||
# $(intdir)\%~nc.obj needs to correspond to the rules added in build-rules-msvc.mak
|
||||
# %~xc gives the file extension of a given file, %c in this case, so if %c is a.cc, %~xc means .cc
|
||||
# %~nc gives the file name of a given file without extension, %c in this case, so if %c is a.cc, %~nc means a
|
||||
|
||||
NULL=
|
||||
|
||||
# For HarfBuzz
|
||||
!if [call create-lists.bat header hb_objs.mak harfbuzz_dll_OBJS] |
||||
!endif |
||||
|
||||
!if [for %c in ($(HB_SOURCES)) do @if "%~xc" == ".cc" @call create-lists.bat file hb_objs.mak ^$(CFG)\^$(PLAT)\harfbuzz\%~nc.obj] |
||||
!endif |
||||
|
||||
!if [for %c in ($(HB_SOURCES)) do @if "%~xc" == ".c" @call create-lists.bat file hb_objs.mak ^$(CFG)\^$(PLAT)\harfbuzz\%~nc.obj] |
||||
!endif |
||||
|
||||
!if [call create-lists.bat footer hb_objs.mak] |
||||
!endif |
||||
|
||||
# For HarfBuzz-GObject
|
||||
!if "$(GOBJECT)" == "1" |
||||
|
||||
!if [call create-lists.bat header hb_objs.mak harfbuzz_gobject_OBJS] |
||||
!endif |
||||
|
||||
!if [for %c in ($(HB_GOBJECT_sources) $(HB_GOBJECT_ENUM_sources)) do @if "%~xc" == ".cc" @call create-lists.bat file hb_objs.mak ^$(CFG)\^$(PLAT)\harfbuzz-gobject\%~nc.obj] |
||||
!endif |
||||
|
||||
!if [call create-lists.bat footer hb_objs.mak] |
||||
!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)
|
||||
!if "$(GLIB)" == "1" |
||||
|
||||
# For hb-view, Cairo-FT support is required
|
||||
!if "$(CAIRO_FT)" == "1" |
||||
|
||||
!if [call create-lists.bat header hb_objs.mak hb_view_OBJS] |
||||
!endif |
||||
|
||||
!if [for %c in ($(HB_VIEW_sources)) do @if "%~xc" == ".cc" @call create-lists.bat file hb_objs.mak ^$(CFG)\^$(PLAT)\util\%~nc.obj] |
||||
!endif |
||||
|
||||
!if [call create-lists.bat footer hb_objs.mak] |
||||
!endif |
||||
!endif |
||||
|
||||
# For hb-shape
|
||||
!if [call create-lists.bat header hb_objs.mak hb_shape_OBJS] |
||||
!endif |
||||
|
||||
!if [for %c in ($(HB_SHAPE_sources)) do @if "%~xc" == ".cc" @call create-lists.bat file hb_objs.mak ^$(CFG)\^$(PLAT)\util\%~nc.obj] |
||||
!endif |
||||
|
||||
!if [call create-lists.bat footer hb_objs.mak] |
||||
!endif |
||||
|
||||
# For hb-ot-shape-closure
|
||||
|
||||
!if [call create-lists.bat header hb_objs.mak hb_ot_shape_closure_OBJS] |
||||
!endif |
||||
|
||||
!if [for %c in ($(HB_OT_SHAPE_CLOSURE_sources)) do @if "%~xc" == ".cc" @call create-lists.bat file hb_objs.mak ^$(CFG)\^$(PLAT)\util\%~nc.obj] |
||||
!endif |
||||
|
||||
!if [call create-lists.bat footer hb_objs.mak] |
||||
!endif |
||||
|
||||
!endif |
||||
|
||||
!include hb_objs.mak |
||||
|
||||
!if [del /f /q hb_objs.mak] |
||||
!endif |
||||
|
||||
# Gather the list of headers and sources for introspection and glib-mkenums
|
||||
!if [call create-lists.bat header hb_srcs.mak HB_ACTUAL_HEADERS] |
||||
!endif |
||||
|
||||
!if [for %h in ($(HB_HEADERS)) do @call create-lists.bat file hb_srcs.mak ..\src\%h] |
||||
!endif |
||||
|
||||
!if [call create-lists.bat footer hb_srcs.mak] |
||||
!endif |
||||
|
||||
# Gather the lists of sources for introspection
|
||||
!if [call create-lists.bat header hb_srcs.mak HB_ACTUAL_SOURCES] |
||||
!endif |
||||
|
||||
!if [for %s in ($(HB_SOURCES)) do @call create-lists.bat file hb_srcs.mak ..\src\%s] |
||||
!endif |
||||
|
||||
!if [call create-lists.bat footer hb_srcs.mak] |
||||
!endif |
||||
|
||||
!if [call create-lists.bat header hb_srcs.mak HB_GOBJECT_ACTUAL_SOURCES] |
||||
!endif |
||||
|
||||
!if [for %s in ($(HB_GOBJECT_sources) $(HB_GOBJECT_STRUCTS_headers)) do @call create-lists.bat file hb_srcs.mak ..\src\%s] |
||||
!endif |
||||
|
||||
!if [call create-lists.bat footer hb_srcs.mak] |
||||
!endif |
||||
|
||||
!include hb_srcs.mak |
||||
|
||||
!if [del /f /q hb_srcs.mak] |
||||
!endif |
@ -0,0 +1,42 @@ |
||||
@echo off |
||||
rem Simple .bat script for creating the NMake Makefile snippets. |
||||
|
||||
if not "%1" == "header" if not "%1" == "file" if not "%1" == "footer" goto :error_cmd |
||||
if "%2" == "" goto error_no_destfile |
||||
|
||||
if "%1" == "header" goto :header |
||||
if "%1" == "file" goto :addfile |
||||
if "%1" == "footer" goto :footer |
||||
|
||||
:header |
||||
if "%3" == "" goto error_var |
||||
echo %3 = \>>%2 |
||||
goto done |
||||
|
||||
:addfile |
||||
if "%3" == "" goto error_file |
||||
echo. %3 \>>%2 |
||||
goto done |
||||
|
||||
:footer |
||||
echo. $(NULL)>>%2 |
||||
echo.>>%2 |
||||
goto done |
||||
|
||||
:error_cmd |
||||
echo Specified command '%1' was invalid. Valid commands are: header file footer. |
||||
goto done |
||||
|
||||
:error_no_destfile |
||||
echo Destination NMake snippet file must be specified |
||||
goto done |
||||
|
||||
:error_var |
||||
echo A name must be specified for using '%1'. |
||||
goto done |
||||
|
||||
:error_file |
||||
echo A file must be specified for using '%1'. |
||||
goto done |
||||
|
||||
:done |
@ -0,0 +1,136 @@ |
||||
# Change this (or specify PREFIX= when invoking this NMake Makefile) if
|
||||
# necessary, so that the libs and headers of the dependent third-party
|
||||
# libraries can be located. For instance, if building from GLib's
|
||||
# included Visual Studio projects, this should be able to locate the GLib
|
||||
# build out-of-the-box if they were not moved. GLib's headers will be
|
||||
# found in $(GLIB_PREFIX)\include\glib-2.0 and
|
||||
# $(GLIB_PREFIX)\lib\glib-2.0\include and its import library will be found
|
||||
# in $(GLIB_PREFIX)\lib.
|
||||
|
||||
!if "$(PREFIX)" == "" |
||||
PREFIX = ..\..\vs$(VSVER)\$(PLAT)
|
||||
!endif |
||||
|
||||
# Location of the PERL interpretor, for running glib-mkenums. glib-mkenums
|
||||
# needs to be found in $(PREFIX)\bin. Using either a 32-bit or x64 PERL
|
||||
# interpretor are supported for either a 32-bit or x64 build.
|
||||
|
||||
!if "$(PERL)" == "" |
||||
PERL = perl
|
||||
!endif |
||||
|
||||
# Location of the Python interpretor, for building introspection. The complete set
|
||||
# of Python Modules for introspection (the giscanner Python scripts and the _giscanner.pyd
|
||||
# compiled module) needs to be found in $(PREFIX)\lib\gobject-introspection\giscanner, and
|
||||
# the g-ir-scanner Python script and g-ir-compiler utility program needs to be found
|
||||
# in $(PREFIX)\bin, together with any DLLs they will depend on, if those DLLs are not already
|
||||
# in your PATH.
|
||||
# Note that the Python interpretor and the introspection modules and utility progam must
|
||||
# correspond to the build type (i.e. 32-bit Release for 32-bit Release builds, and so on).
|
||||
#
|
||||
# For introspection, currently only Python 2.7.x is supported. This may change when Python 3.x
|
||||
# support is added upstream in gobject-introspection--when this happens, the _giscanner.pyd must
|
||||
# be the one that is built against the release series of Python that is used here.
|
||||
|
||||
!if "$(PYTHON)" == "" |
||||
PYTHON = python
|
||||
!endif |
||||
|
||||
# Location of the pkg-config utility program, for building introspection. It needs to be able
|
||||
# to find the pkg-config (.pc) files so that the correct libraries and headers for the needed libraries
|
||||
# can be located, using PKG_CONFIG_PATH. Using either a 32-bit or x64 pkg-config are supported for
|
||||
# either a 32-bit or x64 build.
|
||||
|
||||
!if "$(PKG_CONFIG)" == "" |
||||
PKG_CONFIG = pkg-config
|
||||
!endif |
||||
|
||||
# The items below this line should not be changed, unless one is maintaining
|
||||
# the NMake Makefiles. The exception is for the CFLAGS_ADD line(s) where one
|
||||
# could use his/her desired compiler optimization flags, if he/she knows what is
|
||||
# being done.
|
||||
|
||||
# Check to see we are configured to build with MSVC (MSDEVDIR, MSVCDIR or
|
||||
# VCINSTALLDIR) or with the MS Platform SDK (MSSDK or WindowsSDKDir)
|
||||
!if !defined(VCINSTALLDIR) && !defined(WINDOWSSDKDIR) |
||||
MSG = ^
|
||||
This Makefile is only for Visual Studio 2008 and later.^ |
||||
You need to ensure that the Visual Studio Environment is properly set up^ |
||||
before running this Makefile. |
||||
!error $(MSG) |
||||
!endif |
||||
|
||||
ERRNUL = 2>NUL
|
||||
_HASH=^#
|
||||
|
||||
!if ![echo VCVERSION=_MSC_VER > vercl.x] \
|
||||
&& ![echo $(_HASH)if defined(_M_IX86) >> vercl.x] \
|
||||
&& ![echo PLAT=Win32 >> vercl.x] \
|
||||
&& ![echo $(_HASH)elif defined(_M_AMD64) >> vercl.x] \
|
||||
&& ![echo PLAT=x64 >> vercl.x] \
|
||||
&& ![echo $(_HASH)endif >> vercl.x] \
|
||||
&& ![cl -nologo -TC -P vercl.x $(ERRNUL)]
|
||||
!include vercl.i |
||||
!if ![echo VCVER= ^\> vercl.vc] \
|
||||
&& ![set /a $(VCVERSION) / 100 - 6 >> vercl.vc]
|
||||
!include vercl.vc |
||||
!endif |
||||
!endif |
||||
!if ![del $(ERRNUL) /q/f vercl.x vercl.i vercl.vc] |
||||
!endif |
||||
|
||||
!if $(VCVERSION) > 1499 && $(VCVERSION) < 1600 |
||||
VSVER = 9
|
||||
!elseif $(VCVERSION) > 1599 && $(VCVERSION) < 1700 |
||||
VSVER = 10
|
||||
!elseif $(VCVERSION) > 1699 && $(VCVERSION) < 1800 |
||||
VSVER = 11
|
||||
!elseif $(VCVERSION) > 1799 && $(VCVERSION) < 1900 |
||||
VSVER = 12
|
||||
!elseif $(VCVERSION) > 1899 && $(VCVERSION) < 2000 |
||||
VSVER = 14
|
||||
!else |
||||
VSVER = 0
|
||||
!endif |
||||
|
||||
!if "$(VSVER)" == "0" |
||||
MSG = ^
|
||||
This NMake Makefile set supports Visual Studio^ |
||||
9 (2008) through 14 (2015). Your Visual Studio^ |
||||
version is not supported. |
||||
!error $(MSG) |
||||
!endif |
||||
|
||||
VALID_CFGSET = FALSE
|
||||
!if "$(CFG)" == "release" || "$(CFG)" == "debug" |
||||
VALID_CFGSET = TRUE
|
||||
!endif |
||||
|
||||
# One may change these items, but be sure to test
|
||||
# the resulting binaries
|
||||
!if "$(CFG)" == "release" |
||||
CFLAGS_ADD = /MD /O2 /GL /MP
|
||||
!if "$(VSVER)" != "9" |
||||
CFLAGS_ADD = $(CFLAGS_ADD) /d2Zi+
|
||||
!endif |
||||
!else |
||||
CFLAGS_ADD = /MDd /Od
|
||||
!endif |
||||
|
||||
!if "$(PLAT)" == "x64" |
||||
LDFLAGS_ARCH = /machine:x64
|
||||
!else |
||||
LDFLAGS_ARCH = /machine:x86
|
||||
!endif |
||||
|
||||
!if "$(VALID_CFGSET)" == "TRUE" |
||||
CFLAGS = $(CFLAGS_ADD) /W3 /Zi /I.. /I..\src /I. /I$(PREFIX)\include
|
||||
|
||||
LDFLAGS_BASE = $(LDFLAGS_ARCH) /libpath:$(PREFIX)\lib /DEBUG
|
||||
|
||||
!if "$(CFG)" == "debug" |
||||
LDFLAGS = $(LDFLAGS_BASE)
|
||||
!else |
||||
LDFLAGS = $(LDFLAGS_BASE) /opt:ref /LTCG
|
||||
!endif |
||||
!endif |
@ -0,0 +1,26 @@ |
||||
# NMake Makefile portion for code generation and
|
||||
# intermediate build directory creation
|
||||
# Items in here should not need to be edited unless
|
||||
# one is maintaining the NMake build files.
|
||||
|
||||
# Copy the pre-defined config.h.win32
|
||||
config.h: config.h.win32 |
||||
@-copy $@.win32 $@
|
||||
|
||||
# Generate the enumeration sources and headers
|
||||
# sed is not normally available on Windows, but since
|
||||
# we are already using PERL, use PERL one-liners.
|
||||
!if "$(GOBJECT)" == "1" |
||||
$(HB_GOBJECT_ENUM_GENERATED_SOURCES): ..\src\hb-gobject-enums.h.tmpl ..\src\hb-gobject-enums.cc.tmpl $(HB_ACTUAL_HEADERS) |
||||
$(PERL) $(PREFIX)\bin\glib-mkenums \
|
||||
--identifier-prefix hb_ --symbol-prefix hb_gobject \
|
||||
--template ..\src\$(@F).tmpl $(HB_ACTUAL_HEADERS) > $@
|
||||
$(PERL) -p -i.tmp1 -e "s/_t_get_type/_get_type/g" $@
|
||||
$(PERL) -p -i.tmp2 -e "s/_T \(/ (/g" $@
|
||||
@-del $@.tmp1
|
||||
@-del $@.tmp2
|
||||
!endif |
||||
|
||||
# Create the build directories
|
||||
$(CFG)\$(PLAT)\harfbuzz $(CFG)\$(PLAT)\harfbuzz-icu $(CFG)\$(PLAT)\harfbuzz-gobject $(CFG)\$(PLAT)\util: |
||||
@-mkdir $@
|
@ -0,0 +1,42 @@ |
||||
|
||||
!if "$(BUILD_INTROSPECTION)" == "TRUE" |
||||
# Create the file list for introspection (to avoid the dreaded command-line-too-long problem on Windows)
|
||||
$(CFG)\$(PLAT)\hb_list: $(HB_ACTUAL_HEADERS) $(HB_ACTUAL_SOURCES) $(HB_GOBJECT_ENUM_GENERATED_SOURCES) $(HB_GOBJECT_ACTUAL_SOURCES) |
||||
@for %f in ($(HB_ACTUAL_HEADERS) $(HB_ACTUAL_SOURCES) $(HB_GOBJECT_ENUM_GENERATED_SOURCES) $(HB_GOBJECT_ACTUAL_SOURCES)) do @echo %f >> $@
|
||||
|
||||
$(CFG)\$(PLAT)\HarfBuzz-0.0.gir: $(CFG)\$(PLAT)\harfbuzz-gobject.lib $(CFG)\$(PLAT)\hb_list |
||||
@set LIB=$(CFG)\$(PLAT);$(PREFIX)\lib;$(LIB)
|
||||
@set PATH=$(CFG)\$(PLAT);$(PREFIX)\bin;$(PATH)
|
||||
@-echo Generating $@...
|
||||
$(PYTHON) $(G_IR_SCANNER) \
|
||||
--verbose -no-libtool \
|
||||
-I..\src -n hb --identifier-prefix=hb_ --warn-all \
|
||||
--namespace=HarfBuzz \
|
||||
--nsversion=0.0 \
|
||||
--include=GObject-2.0 \
|
||||
--library=harfbuzz-gobject \
|
||||
--library=harfbuzz \
|
||||
--add-include-path=$(G_IR_INCLUDEDIR) \
|
||||
--pkg-export=harfbuzz \
|
||||
--cflags-begin \
|
||||
$(CFLAGS) $(HB_DEFINES) $(HB_CFLAGS) \
|
||||
-DHB_H \
|
||||
-DHB_H_IN \
|
||||
-DHB_OT_H \
|
||||
-DHB_OT_H_IN \
|
||||
-DHB_GOBJECT_H \
|
||||
-DHB_GOBJECT_H_IN \
|
||||
--cflags-end \
|
||||
--filelist=$(CFG)\$(PLAT)\hb_list \
|
||||
-o $@
|
||||
|
||||
$(CFG)\$(PLAT)\HarfBuzz-0.0.typelib: $(CFG)\$(PLAT)\HarfBuzz-0.0.gir |
||||
@copy $*.gir $(@B).gir
|
||||
$(PREFIX)\bin\g-ir-compiler \
|
||||
--includedir=$(CFG)\$(PLAT) --debug --verbose \
|
||||
$(@B).gir \
|
||||
-o $@
|
||||
@del $(@B).gir
|
||||
!else |
||||
!error $(ERROR_MSG) |
||||
!endif |
@ -0,0 +1,137 @@ |
||||
# NMake Makefile portion for displaying config info
|
||||
|
||||
INC_FEATURES = Uniscribe Fallback OT
|
||||
BUILT_TOOLS =
|
||||
BUILT_LIBRARIES = HarfBuzz
|
||||
|
||||
!if "$(GLIB)" == "1" |
||||
UNICODE_IMPL = GLib
|
||||
INC_FEATURES = $(INC_FEATURES) GLib
|
||||
BUILT_TOOLS = hb-shape.exe hb-ot-shape-closure.exe
|
||||
!if "$(CAIRO_FT)" == "1" |
||||
BUILT_TOOLS = hb-view.exe $(BUILT_TOOLS)
|
||||
!endif |
||||
!else |
||||
UNICODE_IMPL = ucdn
|
||||
!endif |
||||
|
||||
!if "$(FREETYPE)" == "1" |
||||
INC_FEATURES = $(INC_FEATURES) FreeType
|
||||
!endif |
||||
|
||||
!if "$(GRAPHITE2)" == "1" |
||||
INC_FEATURES = $(INC_FEATURES) Graphite2
|
||||
!endif |
||||
|
||||
!if "$(DIRECTWRITE)" == "1" |
||||
INC_FEATURES = $(INC_FEATURES) DirectWrite
|
||||
!endif |
||||
|
||||
!if "$(ICU)" == "1" |
||||
BUILT_LIBRARIES = $(BUILT_LIBRARIES) HarfBuzz-ICU
|
||||
!endif |
||||
|
||||
!if "$(GOBJECT)" == "1" |
||||
BUILT_LIBRARIES = $(BUILT_LIBRARIES) HarfBuzz-GObject
|
||||
!endif |
||||
|
||||
!if "$(INTROSPECTION)" == "1" |
||||
BUILD_INTROSPECTION = yes
|
||||
!else |
||||
BUILD_INTROSPECTION = no
|
||||
!endif |
||||
|
||||
build-info-hb: |
||||
@echo.
|
||||
@echo ==================================
|
||||
@echo Configuration for HarfBuzz Library
|
||||
@echo ==================================
|
||||
@echo Unicode Implementation: $(UNICODE_IMPL)
|
||||
@echo Enabled Features: $(INC_FEATURES)
|
||||
|
||||
all-build-info: build-info-hb |
||||
@echo.
|
||||
@echo ----------------
|
||||
@echo Other build info
|
||||
@echo ----------------
|
||||
@echo Built Libraries: $(BUILT_LIBRARIES)
|
||||
@echo Built Tools: $(BUILT_TOOLS)
|
||||
@echo Introspection: $(BUILD_INTROSPECTION)
|
||||
|
||||
help: |
||||
@echo.
|
||||
@echo =============================
|
||||
@echo Building HarfBuzz Using NMake
|
||||
@echo =============================
|
||||
@echo nmake /f Makefile.vc CFG=[release^|debug] ^<PREFIX=PATH^> OPTION=1 ...
|
||||
@echo.
|
||||
@echo Where:
|
||||
@echo ------
|
||||
@echo CFG: Required, use CFG=release for an optimized build and CFG=debug
|
||||
@echo for a debug build. PDB files are generated for all builds.
|
||||
@echo.
|
||||
@echo PREFIX: Optional, the path where dependent libraries and tools may be
|
||||
@echo found, default is ^$(srcrootdir)\..\vs^$(short_vs_ver)\^$(platform),
|
||||
@echo where ^$(short_vs_ver) is 9 for VS 2008, 10 for VS 2010 and so on; and
|
||||
@echo ^$(platform) is Win32 for 32-bit builds and x64 for x64 builds.
|
||||
@echo.
|
||||
@echo OPTION: Optional, may be any of the following, use OPTION=1 to enable;
|
||||
@echo multiple OPTION's may be used. If no OPTION is specified, a default
|
||||
@echo HarfBuzz DLL is built with OpenType, fallback and Uniscribe support
|
||||
@echo with a bundled Unicode implementation (UCDN).
|
||||
@echo ======
|
||||
@echo DIRECTWRITE:
|
||||
@echo Enable DirectWrite support, requires a recent enough Windows SDK.
|
||||
@echo.
|
||||
@echo GRAPHITE2:
|
||||
@echo Enable graphite2 support, requires the SIL Graphite2 library
|
||||
@echo.
|
||||
@echo FREETYPE:
|
||||
@echo Enable FreeType2 support, requires the FreeType2 library
|
||||
@echo.
|
||||
@echo GLIB:
|
||||
@echo Enable GLib2 support, with GLib Unicode support, requires the GNOME GLib2
|
||||
@echo library. Enables the build of utility programs.
|
||||
@echo.
|
||||
@echo ICU:
|
||||
@echo Enable the HarfBuzz-ICU layout library, requires the International
|
||||
@echo Components for Unicode (ICU) libraries.
|
||||
@echo.
|
||||
@echo GOBJECT:
|
||||
@echo Enable the HarfBuzz-GObject library, also implies GLib2 support,
|
||||
@echo requires the GNOME GLib2 libraries and tools, notably the glib-mkenums
|
||||
@echo tool script, which will require a PERL interpretor (use
|
||||
@echo PERL=^$(PATH_TO_PERL_INTERPRETOR)) if it is not already in your PATH).
|
||||
@echo.
|
||||
@echo INTROSPECTION:
|
||||
@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 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 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 in your PATH.
|
||||
@echo.
|
||||
@echo CAIRO_FT:
|
||||
@echo Enables Cairo-Freetype support, needed for the build of the hb-view utility.
|
||||
@echo Implies FreeType2 support and also requires Cairo built with FreeType2
|
||||
@echo support; GLib2 support must also be enabled.
|
||||
@echo.
|
||||
@echo LIBTOOL_DLL_NAME:
|
||||
@echo Use a libtool-style DLL name to mimic the DLL file naming generated by
|
||||
@echo MinGW builds.
|
||||
@echo.
|
||||
@echo Note that GLib2 support is required for all utility and test programs.
|
||||
@echo ======
|
||||
@echo A 'clean' target is supported to remove all generated files, intermediate
|
||||
@echo object files and binaries for the specified configuration.
|
||||
@echo.
|
||||
@echo A 'tests' target is supported to build the test programs, if GLib2 support
|
||||
@echo is enabled. Use after building the libraries and utilities.
|
||||
@echo.
|
||||
@echo An 'install' target is supported to copy the build (DLLs, utility programs,
|
||||
@echo LIBs, along with the introspection files if applicable) to appropriate
|
||||
@echo locations under ^$(PREFIX).
|
||||
@echo ======
|
||||
@echo.
|
||||
|
@ -0,0 +1,29 @@ |
||||
# NMake Makefile snippet for copying the built libraries, utilities and headers to
|
||||
# a path under $(PREFIX).
|
||||
|
||||
install: all |
||||
@if not exist $(PREFIX)\bin\ mkdir $(PREFIX)\bin
|
||||
@if not exist $(PREFIX)\lib\ mkdir $(PREFIX)\lib
|
||||
@if not exist $(PREFIX)\include\harfbuzz\ mkdir $(PREFIX)\include\harfbuzz
|
||||
@copy /b $(HARFBUZZ_DLL_FILENAME).dll $(PREFIX)\bin
|
||||
@copy /b $(HARFBUZZ_DLL_FILENAME).pdb $(PREFIX)\bin
|
||||
@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).pdb $(PREFIX)\bin
|
||||
@if exist $(HARFBUZZ_GOBJECT_DLL_FILENAME).dll copy /b $(CFG)\$(PLAT)\harfbuzz-gobject.lib $(PREFIX)\lib
|
||||
@if exist $(CFG)\$(PLAT)\hb-view.exe copy /b $(CFG)\$(PLAT)\hb-view.exe $(PREFIX)\bin
|
||||
@if exist $(CFG)\$(PLAT)\hb-view.exe copy /b $(CFG)\$(PLAT)\hb-view.pdb $(PREFIX)\bin
|
||||
@if exist $(CFG)\$(PLAT)\hb-ot-shape-closure.exe copy /b $(CFG)\$(PLAT)\hb-ot-shape-closure.exe $(PREFIX)\bin
|
||||
@if exist $(CFG)\$(PLAT)\hb-ot-shape-closure.exe copy /b $(CFG)\$(PLAT)\hb-ot-shape-closure.pdb $(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
|
||||
@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 copy $(CFG)\$(PLAT)\harfbuzz-gobject\hb-gobject-enums.h $(PREFIX)\include\harfbuzz
|
||||
@rem Copy the generated introspection files
|
||||
@if exist $(CFG)\$(PLAT)\HarfBuzz-0.0.gir copy $(CFG)\$(PLAT)\HarfBuzz-0.0.gir $(PREFIX)\share\gir-1.0
|
||||
@if exist $(CFG)\$(PLAT)\HarfBuzz-0.0.typelib copy /b $(CFG)\$(PLAT)\HarfBuzz-0.0.typelib $(PREFIX)\lib\girepository-1.0
|
@ -0,0 +1,73 @@ |
||||
# Common NMake Makefile module for checking the build environment is sane
|
||||
# for building introspection files under MSVC/NMake.
|
||||
# This can be copied from $(gi_srcroot)\build\win32 for GNOME items
|
||||
# that support MSVC builds and introspection under MSVC.
|
||||
|
||||
# Can override with env vars as needed
|
||||
# You will need to have built gobject-introspection for this to work.
|
||||
# Change or pass in or set the following to suit your environment
|
||||
|
||||
!if "$(PREFIX)" == "" |
||||
PREFIX = ..\..\..\vs$(VSVER)\$(PLAT)
|
||||
!endif |
||||
|
||||
# Note: The PYTHON must be the Python release series that was used to build
|
||||
# the GObject-introspection scanner Python module!
|
||||
# Either having python.exe your PATH will work or passing in
|
||||
# PYTHON=<full path to your Python interpretor> will do
|
||||
|
||||
# This is required, and gobject-introspection needs to be built
|
||||
# before this can be successfully run.
|
||||
!if "$(PYTHON)" == "" |
||||
PYTHON=python
|
||||
!endif |
||||
|
||||
# Don't change anything following this line!
|
||||
|
||||
GIR_SUBDIR = share\gir-1.0
|
||||
GIR_TYPELIBDIR = lib\girepository-1.0
|
||||
G_IR_SCANNER = $(PREFIX)\bin\g-ir-scanner
|
||||
G_IR_COMPILER = $(PREFIX)\bin\g-ir-compiler.exe
|
||||
G_IR_INCLUDEDIR = $(PREFIX)\$(GIR_SUBDIR)
|
||||
G_IR_TYPELIBDIR = $(PREFIX)\$(GIR_TYPELIBDIR)
|
||||
|
||||
VALID_PKG_CONFIG_PATH = FALSE
|
||||
|
||||
MSG_INVALID_PKGCONFIG = You must set or specifiy a valid PKG_CONFIG_PATH
|
||||
MSG_INVALID_CFG = You need to specify or set CFG to be release or debug to use this Makefile to build the Introspection Files
|
||||
|
||||
ERROR_MSG =
|
||||
|
||||
BUILD_INTROSPECTION = TRUE
|
||||
|
||||
!if ![pkg-config --print-errors --errors-to-stdout $(CHECK_PACKAGE) > pkgconfig.x] \ |
||||
&& ![setlocal] \
|
||||
&& ![set file="pkgconfig.x"] \
|
||||
&& ![FOR %A IN (%file%) DO @echo PKG_CHECK_SIZE=%~zA > pkgconfig.chksize] \
|
||||
&& ![del $(ERRNUL) /q/f pkgconfig.x]
|
||||
!endif |
||||
|
||||
!include pkgconfig.chksize |
||||
!if "$(PKG_CHECK_SIZE)" == "0" |
||||
VALID_PKG_CONFIG_PATH = TRUE
|
||||
!else |
||||
VALID_PKG_CONFIG_PATH = FALSE
|
||||
!endif |
||||
|
||||
!if ![del $(ERRNUL) /q/f pkgconfig.chksize] |
||||
!endif |
||||
|
||||
VALID_CFGSET = FALSE
|
||||
!if "$(CFG)" == "release" || "$(CFG)" == "debug" |
||||
VALID_CFGSET = TRUE
|
||||
!endif |
||||
|
||||
!if "$(VALID_PKG_CONFIG_PATH)" != "TRUE" |
||||
BUILD_INTROSPECTION = FALSE
|
||||
ERROR_MSG = $(MSG_INVALID_PKGCONFIG)
|
||||
!endif |
||||
|
||||
!if "$(VALID_CFGSET)" != "TRUE" |
||||
BUILD_INTROSPECTION = FALSE
|
||||
ERROR_MSG = $(MSG_INVALID_CFG)
|
||||
!endif |
Loading…
Reference in new issue