build: Support Visual Studio builds using NMake
This adds a set of NMake Makefiles that can be used to build HarfBuzz, from
the standard basic build building the minimal HarfBuzz DLL (consisting
of OpenType, fallback and Uniscribe support only), to a full fledged build
consisting of GLib and FreeType support, as well as building the utilities,
the test programs in src/ and test/api, and HarfBuzz-ICU and
HarfBuzz-GObject, and up to building the introspection files. This means a
flexible build mechanism is supported here, so anything that is supported
for a Windows build (code-wise), should all be supported by this build
system.
As in an earlier commit, the source listings are shared with the autotools
builds with the various Makefile.sources in src/, src/hb-ucdn and util/, and
this set of NMake Makefiles will transform these lists into the form they
want.
In the current form, all the test programs in test/api pass, and this has
been checked successfully with 'make -j8 distcheck'.
9 years ago
|
|
|
# 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-gobject $(CFG)\$(PLAT)\util:
|
|
|
|
@-md $@
|
|
|
|
|
|
|
|
.SUFFIXES: .c .cc .hh .rl
|
|
|
|
|
|
|
|
# Generate headers from Ragel sources
|
|
|
|
{..\src\}.rl{..\src\}.hh:
|
|
|
|
$(RAGEL) -e -F1 -o $@ $<
|