diff --git a/BUILD.md b/BUILD.md index e9d7d4d5d..86285c648 100644 --- a/BUILD.md +++ b/BUILD.md @@ -15,7 +15,9 @@ or using Homebrew: If you are using a tarball, you can now proceed to running configure and make as with any other standard package. That should leave you with a shared library in src/, and a few utility programs including hb-view and hb-shape -under util/. +under util/. From the tarball, NMake Makefiles are also provided in win32/, +which supports building HarfBuzz using Visual Studio, with a README.txt that +gives instructions on building using NMake. If you are bootstraping from git, you need a few more tools before you can run autogen.sh for the first time. Namely, pkg-config and ragel. Again, on Ubuntu / Debian: diff --git a/Makefile.am b/Makefile.am index 3c1e7a27c..8987d5749 100644 --- a/Makefile.am +++ b/Makefile.am @@ -4,7 +4,7 @@ NULL = ACLOCAL_AMFLAGS = -I m4 -SUBDIRS = src util test docs +SUBDIRS = src util test docs win32 EXTRA_DIST = \ autogen.sh \ diff --git a/configure.ac b/configure.ac index 764211553..f76b4fc52 100644 --- a/configure.ac +++ b/configure.ac @@ -356,6 +356,30 @@ AM_CONDITIONAL(HAVE_UNISCRIBE, $have_uniscribe) dnl =========================================================================== +AC_ARG_WITH(directwrite, + [AS_HELP_STRING([--with-directwrite=@<:@yes/no/auto@:>@], + [Use the DirectWrite library (experimental) @<:@default=no@:>@])],, + [with_directwrite=no]) +have_directwrite=false +AC_LANG_PUSH([C++]) +if test "x$with_directwrite" = "xyes" -o "x$with_directwrite" = "xauto"; then + AC_CHECK_HEADERS(dwrite.h, have_directwrite=true) +fi +AC_LANG_POP([C++]) +if test "x$with_directwrite" = "xyes" -a "x$have_directwrite" != "xtrue"; then + AC_MSG_ERROR([directwrite support requested but not found]) +fi +if $have_directwrite; then + DIRECTWRITE_CXXFLAGS= + DIRECTWRITE_LIBS="-ldwrite" + AC_SUBST(DIRECTWRITE_CXXFLAGS) + AC_SUBST(DIRECTWRITE_LIBS) + AC_DEFINE(HAVE_DIRECTWRITE, 1, [Have DirectWrite library]) +fi +AM_CONDITIONAL(HAVE_DIRECTWRITE, $have_directwrite) + +dnl =========================================================================== + AC_ARG_WITH(coretext, [AS_HELP_STRING([--with-coretext=@<:@yes/no/auto@:>@], [Use CoreText @<:@default=no@:>@])],, @@ -444,6 +468,8 @@ test/fuzzing/Makefile test/shaping/Makefile docs/Makefile docs/version.xml +win32/Makefile +win32/config.h.win32 ]) AC_OUTPUT @@ -470,6 +496,7 @@ Additional shapers (the more the better): Platform shapers (not normally needed): CoreText: ${have_coretext} Uniscribe: ${have_uniscribe} + DirectWrite: ${have_directwrite} Other features: Documentation: ${have_gtk_doc} diff --git a/src/Makefile.am b/src/Makefile.am index 3d013ebaa..bb085ad00 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,6 +1,5 @@ # Process this file with automake to produce Makefile.in -NULL = SUBDIRS = DIST_SUBDIRS = BUILT_SOURCES = @@ -19,121 +18,23 @@ fuzzing: $(BUILT_SOURCES) libharfbuzz-fuzzing.la lib_LTLIBRARIES = libharfbuzz.la +include Makefile.sources + HBCFLAGS = HBLIBS = HBNONPCLIBS = HBDEPS = -HBSOURCES = \ - 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) -HBHEADERS = \ - 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) -HBNODISTHEADERS = \ - hb-version.h \ - $(NULL) +HBSOURCES = $(HB_BASE_sources) +HBHEADERS = $(HB_BASE_headers) +HBNODISTHEADERS = $(HB_NODIST_headers) if HAVE_OT -HBSOURCES += \ - 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) -HBHEADERS += \ - hb-ot.h \ - hb-ot-font.h \ - hb-ot-layout.h \ - hb-ot-shape.h \ - hb-ot-tag.h \ - $(NULL) +HBSOURCES += $(HB_OT_sources) +HBHEADERS += $(HB_OT_headers) endif if HAVE_FALLBACK -HBSOURCES += hb-fallback-shape.cc +HBSOURCES += $(HB_FALLBACK_sources) endif if HAVE_PTHREAD @@ -145,8 +46,8 @@ if HAVE_GLIB HBCFLAGS += $(GLIB_CFLAGS) HBLIBS += $(GLIB_LIBS) HBDEPS += $(GLIB_DEPS) -HBSOURCES += hb-glib.cc -HBHEADERS += hb-glib.h +HBSOURCES += $(HB_GLIB_sources) +HBHEADERS += $(HB_GLIB_headers) endif if HAVE_FREETYPE @@ -158,37 +59,44 @@ HBLIBS += $(FREETYPE_LIBS) # fine but pkg-config 0.26 as shipped in Ubuntu 14.04 crashes. Remove # in a year or two, or otherwise work around it... #HBDEPS += $(FREETYPE_DEPS) -HBSOURCES += hb-ft.cc -HBHEADERS += hb-ft.h +HBSOURCES += $(HB_FT_sources) +HBHEADERS += $(HB_FT_headers) endif if HAVE_GRAPHITE2 HBCFLAGS += $(GRAPHITE2_CFLAGS) HBLIBS += $(GRAPHITE2_LIBS) HBDEPS += $(GRAPHITE2_DEPS) -HBSOURCES += hb-graphite2.cc -HBHEADERS += hb-graphite2.h +HBSOURCES += $(HB_GRAPHITE2_sources) +HBHEADERS += $(HB_GRAPHITE2_headers) endif if HAVE_UNISCRIBE HBCFLAGS += $(UNISCRIBE_CFLAGS) HBNONPCLIBS += $(UNISCRIBE_LIBS) -HBSOURCES += hb-uniscribe.cc -HBHEADERS += hb-uniscribe.h +HBSOURCES += $(HB_UNISCRIBE_sources) +HBHEADERS += $(HB_UNISCRIBE_headers) +endif + +if HAVE_DIRECTWRITE +HBCFLAGS += $(DIRECTWRITE_CXXFLAGS) +HBNONPCLIBS += $(DIRECTWRITE_LIBS) +HBSOURCES += $(HB_DIRECTWRITE_sources) +HBHEADERS += $(HB_DIRECTWRITE_headers) endif if HAVE_CORETEXT HBCFLAGS += $(CORETEXT_CFLAGS) HBNONPCLIBS += $(CORETEXT_LIBS) -HBSOURCES += hb-coretext.cc -HBHEADERS += hb-coretext.h +HBSOURCES += $(HB_CORETEXT_sources) +HBHEADERS += $(HB_CORETEXT_headers) endif if HAVE_UCDN SUBDIRS += hb-ucdn HBCFLAGS += -I$(srcdir)/hb-ucdn HBLIBS += hb-ucdn/libhb-ucdn.la -HBSOURCES += hb-ucdn.cc +HBSOURCES += $(HB_UCDN_sources) endif DIST_SUBDIRS += hb-ucdn @@ -239,33 +147,33 @@ CLEANFILES += libharfbuzz-fuzzing.la if HAVE_ICU lib_LTLIBRARIES += libharfbuzz-icu.la -libharfbuzz_icu_la_SOURCES = hb-icu.cc +libharfbuzz_icu_la_SOURCES = $(HB_ICU_sources) libharfbuzz_icu_la_CPPFLAGS = $(ICU_CFLAGS) libharfbuzz_icu_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(HB_LIBTOOL_VERSION_INFO) -no-undefined libharfbuzz_icu_la_LIBADD = $(ICU_LIBS) libharfbuzz.la -pkginclude_HEADERS += hb-icu.h +pkginclude_HEADERS += $(HB_ICU_headers) pkgconfig_DATA += harfbuzz-icu.pc endif EXTRA_DIST += harfbuzz-icu.pc.in if HAVE_GOBJECT lib_LTLIBRARIES += libharfbuzz-gobject.la -libharfbuzz_gobject_la_SOURCES = hb-gobject-structs.cc -nodist_libharfbuzz_gobject_la_SOURCES = hb-gobject-enums.cc +libharfbuzz_gobject_la_SOURCES = $(HB_GOBJECT_sources) +nodist_libharfbuzz_gobject_la_SOURCES = $(HB_GOBJECT_ENUM_sources) libharfbuzz_gobject_la_CPPFLAGS = $(GOBJECT_CFLAGS) libharfbuzz_gobject_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(HB_LIBTOOL_VERSION_INFO) -no-undefined libharfbuzz_gobject_la_LIBADD = $(GOBJECT_LIBS) libharfbuzz.la -pkginclude_HEADERS += hb-gobject.h hb-gobject-structs.h -nodist_pkginclude_HEADERS += hb-gobject-enums.h +pkginclude_HEADERS += $(HB_GOBJECT_headers) +nodist_pkginclude_HEADERS += $(HB_GOBJECT_ENUM_headers) pkgconfig_DATA += harfbuzz-gobject.pc BUILT_SOURCES += \ - hb-gobject-enums.cc \ - hb-gobject-enums.h \ + $(HB_GOBJECT_ENUM_sources) \ + $(HB_GOBJECT_ENUM_headers) \ $(NULL) DISTCLEANFILES += \ - hb-gobject-enums.cc \ - hb-gobject-enums.h \ + $(HB_GOBJECT_ENUM_sources) \ + $(HB_GOBJECT_ENUM_headers) \ $(NULL) hb-gobject-enums.%: hb-gobject-enums.%.tmpl $(HBHEADERS) $(AM_V_GEN) $(GLIB_MKENUMS) \ @@ -437,10 +345,10 @@ HarfBuzz_0_0_gir_FILES = \ $(HBHEADERS) \ $(HBNODISTHEADERS) \ $(HBSOURCES) \ - hb-gobject-enums.cc \ - hb-gobject-enums.h \ - hb-gobject-structs.cc \ - hb-gobject-structs.h \ + $(HB_GOBJECT_ENUM_sources) \ + $(HB_GOBJECT_ENUM_headers) \ + $(HB_GOBJECT_sources) \ + $(HB_GOBJECT_STRUCTS_headers) \ $(NULL) girdir = $(datadir)/gir-1.0 diff --git a/src/Makefile.sources b/src/Makefile.sources new file mode 100644 index 000000000..171c51358 --- /dev/null +++ b/src/Makefile.sources @@ -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 diff --git a/src/hb-ucdn/Makefile.am b/src/hb-ucdn/Makefile.am index 0670b5c33..73b550254 100644 --- a/src/hb-ucdn/Makefile.am +++ b/src/hb-ucdn/Makefile.am @@ -2,11 +2,9 @@ noinst_LTLIBRARIES = libhb-ucdn.la +include Makefile.sources -libhb_ucdn_la_SOURCES = \ - ucdn.h \ - ucdn.c \ - unicodedata_db.h +libhb_ucdn_la_SOURCES = $(LIBHB_UCDN_sources) libhb_ucdn_la_CPPFLAGS = \ -I$(top_srcdir) \ -I$(top_srcdir)/src \ diff --git a/src/hb-ucdn/Makefile.sources b/src/hb-ucdn/Makefile.sources new file mode 100644 index 000000000..d5f87b282 --- /dev/null +++ b/src/hb-ucdn/Makefile.sources @@ -0,0 +1,4 @@ +LIBHB_UCDN_sources = \ + ucdn.h \ + ucdn.c \ + unicodedata_db.h diff --git a/util/Makefile.am b/util/Makefile.am index a676e0456..2543a6091 100644 --- a/util/Makefile.am +++ b/util/Makefile.am @@ -1,11 +1,12 @@ # Process this file with automake to produce Makefile.in -NULL = EXTRA_DIST = CLEANFILES = DISTCLEANFILES = MAINTAINERCLEANFILES = +include Makefile.sources + # Convenience targets: lib: @$(MAKE) $(AM_MAKEFLAGS) -C $(top_builddir)/src lib @@ -31,21 +32,7 @@ if HAVE_GLIB if HAVE_FREETYPE if HAVE_CAIRO_FT -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_view_SOURCES = $(HB_VIEW_sources) hb_view_LDADD = \ $(LDADD) \ $(CAIRO_LIBS) \ @@ -55,22 +42,11 @@ bin_PROGRAMS += hb-view endif # HAVE_CAIRO_FT endif # HAVE_FREETYPE -hb_shape_SOURCES = \ - hb-shape.cc \ - options.cc \ - options.hh \ - main-font-text.hh \ - shape-consumer.hh \ - $(NULL) +hb_shape_SOURCES = $(HB_SHAPE_sources) bin_PROGRAMS += hb-shape if HAVE_OT -hb_ot_shape_closure_SOURCES = \ - hb-ot-shape-closure.cc \ - options.cc \ - options.hh \ - main-font-text.hh \ - $(NULL) +hb_ot_shape_closure_SOURCES = $(HB_OT_SHAPE_CLOSURE_sources) bin_PROGRAMS += hb-ot-shape-closure endif # HAVE_OT diff --git a/util/Makefile.sources b/util/Makefile.sources new file mode 100644 index 000000000..368fdb049 --- /dev/null +++ b/util/Makefile.sources @@ -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) diff --git a/win32/Makefile.am b/win32/Makefile.am new file mode 100644 index 000000000..be7a477af --- /dev/null +++ b/win32/Makefile.am @@ -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 diff --git a/win32/Makefile.vc b/win32/Makefile.vc new file mode 100644 index 000000000..fdde7a7d4 --- /dev/null +++ b/win32/Makefile.vc @@ -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 diff --git a/win32/README.txt b/win32/README.txt new file mode 100644 index 000000000..e2ead01d0 --- /dev/null +++ b/win32/README.txt @@ -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=...] +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