diff options
author | Tor Andersson <tor@ghostscript.com> | 2011-03-06 17:04:14 +0000 |
---|---|---|
committer | Tor Andersson <tor@ghostscript.com> | 2011-03-06 17:04:14 +0000 |
commit | 073d9a2bf73551a3ea5e1314b283ba474eb55b1c (patch) | |
tree | 5477f4941e5a362dd5a97c4b94746f84f043e503 | |
parent | 4ba609fc289b18823a51093c8afea750c5636a5c (diff) | |
download | mupdf-073d9a2bf73551a3ea5e1314b283ba474eb55b1c.tar.xz |
Slim down freetype thirdparty library build.
-rw-r--r-- | Makethird | 73 | ||||
-rw-r--r-- | win32/libthirdparty.vcproj | 144 | ||||
-rw-r--r-- | win32/slimftmodules.h | 21 | ||||
-rw-r--r-- | win32/slimftoptions.h | 15 |
4 files changed, 44 insertions, 209 deletions
@@ -91,22 +91,7 @@ $(OBJDIR)/jconfig.h: JPEG_SRC=$(addprefix $(jpeg_dir)/, \ jaricom.c \ - jcapimin.c \ - jcapistd.c \ - jcarith.c \ - jccoefct.c \ - jccolor.c \ - jcdctmgr.c \ - jchuff.c \ - jcinit.c \ - jcmainct.c \ - jcmarker.c \ - jcmaster.c \ jcomapi.c \ - jcparam.c \ - jcprepct.c \ - jcsample.c \ - jctrans.c \ jdapimin.c \ jdapistd.c \ jdarith.c \ @@ -157,11 +142,6 @@ ZLIB_SRC=$(addprefix $(zlib_dir)/, \ compress.c \ crc32.c \ deflate.c \ - gzclose.c \ - gzlib.c \ - gzread.c \ - gzwrite.c \ - infback.c \ inffast.c \ inflate.c \ inftrees.c \ @@ -186,46 +166,29 @@ LIBS := $(filter-out -lfreetype, $(LIBS)) SYS_FREETYPE_INC := FREETYPE_OBJ=$(addprefix $(OBJDIR)/ft_, \ - autofit.o ftbase.o ftbbox.o ftbdf.o ftbitmap.o ftdebug.o ftgasp.o \ - ftglyph.o ftgxval.o ftinit.o ftlcdfil.o ftmm.o ftotval.o ftpfr.o \ - ftstroke.o ftsynth.o ftsystem.o fttype1.o ftwinfnt.o ftxf86.o \ - ftpatent.o bdf.o ftcache.o cff.o type1cid.o ftgzip.o ftlzw.o \ - pcf.o pfr.o psaux.o pshinter.o psnames.o raster.o smooth.o sfnt.o \ - truetype.o type1.o type42.o winfnt.o ) + ftbase.o ftbbox.o ftbitmap.o ftgasp.o ftglyph.o ftinit.o \ + ftstroke.o ftsynth.o ftsystem.o fttype1.o ftxf86.o \ + cff.o type1cid.o psaux.o psnames.o smooth.o sfnt.o truetype.o type1.o ) FREETYPE_LIB=$(OBJDIR)/libfreetype.a $(FREETYPE_LIB): $(FREETYPE_OBJ) $(AR_CMD) -FTCC_CMD = $(CC_CMD) -DFT2_BUILD_LIBRARY -DDARWIN_NO_CARBON +FTCC_CMD = $(CC_CMD) -DFT2_BUILD_LIBRARY -DDARWIN_NO_CARBON -Iwin32 \ + '-DFT_CONFIG_MODULES_H="slimftmodules.h"' \ + '-DFT_CONFIG_OPTIONS_H="slimftoptions.h"' -$(OBJDIR)/ft_autofit.o: $(freetype_dir)/src/autofit/autofit.c - $(FTCC_CMD) $(OBJDIR)/ft_ftbase.o: $(freetype_dir)/src/base/ftbase.c $(FTCC_CMD) $(OBJDIR)/ft_ftbbox.o: $(freetype_dir)/src/base/ftbbox.c $(FTCC_CMD) -$(OBJDIR)/ft_ftbdf.o: $(freetype_dir)/src/base/ftbdf.c - $(FTCC_CMD) $(OBJDIR)/ft_ftbitmap.o: $(freetype_dir)/src/base/ftbitmap.c $(FTCC_CMD) -$(OBJDIR)/ft_ftdebug.o: $(freetype_dir)/src/base/ftdebug.c - $(FTCC_CMD) $(OBJDIR)/ft_ftgasp.o: $(freetype_dir)/src/base/ftgasp.c $(FTCC_CMD) $(OBJDIR)/ft_ftglyph.o: $(freetype_dir)/src/base/ftglyph.c $(FTCC_CMD) -$(OBJDIR)/ft_ftgxval.o: $(freetype_dir)/src/base/ftgxval.c - $(FTCC_CMD) $(OBJDIR)/ft_ftinit.o: $(freetype_dir)/src/base/ftinit.c $(FTCC_CMD) -$(OBJDIR)/ft_ftlcdfil.o: $(freetype_dir)/src/base/ftlcdfil.c - $(FTCC_CMD) -$(OBJDIR)/ft_ftmm.o: $(freetype_dir)/src/base/ftmm.c - $(FTCC_CMD) -$(OBJDIR)/ft_ftotval.o: $(freetype_dir)/src/base/ftotval.c - $(FTCC_CMD) -$(OBJDIR)/ft_ftpfr.o: $(freetype_dir)/src/base/ftpfr.c - $(FTCC_CMD) $(OBJDIR)/ft_ftstroke.o: $(freetype_dir)/src/base/ftstroke.c $(FTCC_CMD) $(OBJDIR)/ft_ftsynth.o: $(freetype_dir)/src/base/ftsynth.c @@ -234,36 +197,16 @@ $(OBJDIR)/ft_ftsystem.o: $(freetype_dir)/src/base/ftsystem.c $(FTCC_CMD) $(OBJDIR)/ft_fttype1.o: $(freetype_dir)/src/base/fttype1.c $(FTCC_CMD) -$(OBJDIR)/ft_ftwinfnt.o: $(freetype_dir)/src/base/ftwinfnt.c - $(FTCC_CMD) $(OBJDIR)/ft_ftxf86.o: $(freetype_dir)/src/base/ftxf86.c $(FTCC_CMD) -$(OBJDIR)/ft_ftpatent.o: $(freetype_dir)/src/base/ftpatent.c - $(FTCC_CMD) -$(OBJDIR)/ft_bdf.o: $(freetype_dir)/src/bdf/bdf.c - $(FTCC_CMD) -$(OBJDIR)/ft_ftcache.o: $(freetype_dir)/src/cache/ftcache.c - $(FTCC_CMD) $(OBJDIR)/ft_cff.o: $(freetype_dir)/src/cff/cff.c $(FTCC_CMD) $(OBJDIR)/ft_type1cid.o: $(freetype_dir)/src/cid/type1cid.c $(FTCC_CMD) -$(OBJDIR)/ft_ftgzip.o: $(freetype_dir)/src/gzip/ftgzip.c - $(FTCC_CMD) -$(OBJDIR)/ft_ftlzw.o: $(freetype_dir)/src/lzw/ftlzw.c - $(FTCC_CMD) -$(OBJDIR)/ft_pcf.o: $(freetype_dir)/src/pcf/pcf.c - $(FTCC_CMD) -$(OBJDIR)/ft_pfr.o: $(freetype_dir)/src/pfr/pfr.c - $(FTCC_CMD) $(OBJDIR)/ft_psaux.o: $(freetype_dir)/src/psaux/psaux.c $(FTCC_CMD) -$(OBJDIR)/ft_pshinter.o: $(freetype_dir)/src/pshinter/pshinter.c - $(FTCC_CMD) $(OBJDIR)/ft_psnames.o: $(freetype_dir)/src/psnames/psnames.c $(FTCC_CMD) -$(OBJDIR)/ft_raster.o: $(freetype_dir)/src/raster/raster.c - $(FTCC_CMD) $(OBJDIR)/ft_smooth.o: $(freetype_dir)/src/smooth/smooth.c $(FTCC_CMD) $(OBJDIR)/ft_sfnt.o: $(freetype_dir)/src/sfnt/sfnt.c @@ -272,9 +215,5 @@ $(OBJDIR)/ft_truetype.o: $(freetype_dir)/src/truetype/truetype.c $(FTCC_CMD) $(OBJDIR)/ft_type1.o: $(freetype_dir)/src/type1/type1.c $(FTCC_CMD) -$(OBJDIR)/ft_type42.o: $(freetype_dir)/src/type42/type42.c - $(FTCC_CMD) -$(OBJDIR)/ft_winfnt.o: $(freetype_dir)/src/winfonts/winfnt.c - $(FTCC_CMD) endif diff --git a/win32/libthirdparty.vcproj b/win32/libthirdparty.vcproj index 5a09f5d5..eba52af8 100644 --- a/win32/libthirdparty.vcproj +++ b/win32/libthirdparty.vcproj @@ -41,7 +41,7 @@ Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\win32;..\thirdparty\jbig2dec;..\thirdparty\jpeg-8c;..\thirdparty\openjpeg-1.4\libopenjpeg;..\thirdparty\zlib-1.2.5;..\thirdparty\freetype-2.4.4\include"
- PreprocessorDefinitions="FT2_BUILD_LIBRARY;OPJ_STATIC"
+ PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS;FT2_BUILD_LIBRARY;OPJ_STATIC;FT_CONFIG_MODULES_H=\"slimftmodules.h\";FT_CONFIG_OPTIONS_H=\"slimftoptions.h\""
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
@@ -104,7 +104,7 @@ Optimization="2"
EnableIntrinsicFunctions="true"
AdditionalIncludeDirectories="..\win32;..\thirdparty\jbig2dec;..\thirdparty\jpeg-8c;..\thirdparty\openjpeg-1.4\libopenjpeg;..\thirdparty\zlib-1.2.5;..\thirdparty\freetype-2.4.4\include"
- PreprocessorDefinitions="FT2_BUILD_LIBRARY;OPJ_STATIC"
+ PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS;FT2_BUILD_LIBRARY;OPJ_STATIC;FT_CONFIG_MODULES_H=\"slimftmodules.h\";FT_CONFIG_OPTIONS_H=\"slimftoptions.h\""
RuntimeLibrary="0"
EnableFunctionLevelLinking="true"
WarningLevel="3"
@@ -150,70 +150,10 @@ >
</File>
<File
- RelativePath="..\thirdparty\jpeg-8c\jcapimin.c"
- >
- </File>
- <File
- RelativePath="..\thirdparty\jpeg-8c\jcapistd.c"
- >
- </File>
- <File
- RelativePath="..\thirdparty\jpeg-8c\jcarith.c"
- >
- </File>
- <File
- RelativePath="..\thirdparty\jpeg-8c\jccoefct.c"
- >
- </File>
- <File
- RelativePath="..\thirdparty\jpeg-8c\jccolor.c"
- >
- </File>
- <File
- RelativePath="..\thirdparty\jpeg-8c\jcdctmgr.c"
- >
- </File>
- <File
- RelativePath="..\thirdparty\jpeg-8c\jchuff.c"
- >
- </File>
- <File
- RelativePath="..\thirdparty\jpeg-8c\jcinit.c"
- >
- </File>
- <File
- RelativePath="..\thirdparty\jpeg-8c\jcmainct.c"
- >
- </File>
- <File
- RelativePath="..\thirdparty\jpeg-8c\jcmarker.c"
- >
- </File>
- <File
- RelativePath="..\thirdparty\jpeg-8c\jcmaster.c"
- >
- </File>
- <File
RelativePath="..\thirdparty\jpeg-8c\jcomapi.c"
>
</File>
<File
- RelativePath="..\thirdparty\jpeg-8c\jcparam.c"
- >
- </File>
- <File
- RelativePath="..\thirdparty\jpeg-8c\jcprepct.c"
- >
- </File>
- <File
- RelativePath="..\thirdparty\jpeg-8c\jcsample.c"
- >
- </File>
- <File
- RelativePath="..\thirdparty\jpeg-8c\jctrans.c"
- >
- </File>
- <File
RelativePath="..\thirdparty\jpeg-8c\jdapimin.c"
>
</File>
@@ -410,10 +350,6 @@ >
</File>
<File
- RelativePath="..\thirdparty\zlib-1.2.5\infback.c"
- >
- </File>
- <File
RelativePath="..\thirdparty\zlib-1.2.5\inffast.c"
>
</File>
@@ -518,54 +454,18 @@ Name="libfreetype"
>
<File
- RelativePath="..\thirdparty\freetype-2.4.4\src\autofit\autofit.c"
- >
- </File>
- <File
- RelativePath="..\thirdparty\freetype-2.4.4\src\bdf\bdf.c"
- >
- </File>
- <File
RelativePath="..\thirdparty\freetype-2.4.4\src\cff\cff.c"
>
</File>
<File
- RelativePath="..\thirdparty\freetype-2.4.4\src\cache\ftcache.c"
- >
- </File>
- <File
- RelativePath="..\thirdparty\freetype-2.4.4\src\gzip\ftgzip.c"
- >
- </File>
- <File
- RelativePath="..\thirdparty\freetype-2.4.4\src\lzw\ftlzw.c"
- >
- </File>
- <File
- RelativePath="..\thirdparty\freetype-2.4.4\src\pcf\pcf.c"
- >
- </File>
- <File
- RelativePath="..\thirdparty\freetype-2.4.4\src\pfr\pfr.c"
- >
- </File>
- <File
RelativePath="..\thirdparty\freetype-2.4.4\src\psaux\psaux.c"
>
</File>
<File
- RelativePath="..\thirdparty\freetype-2.4.4\src\pshinter\pshinter.c"
- >
- </File>
- <File
RelativePath="..\thirdparty\freetype-2.4.4\src\psnames\psnames.c"
>
</File>
<File
- RelativePath="..\thirdparty\freetype-2.4.4\src\raster\raster.c"
- >
- </File>
- <File
RelativePath="..\thirdparty\freetype-2.4.4\src\sfnt\sfnt.c"
>
</File>
@@ -585,14 +485,6 @@ RelativePath="..\thirdparty\freetype-2.4.4\src\cid\type1cid.c"
>
</File>
- <File
- RelativePath="..\thirdparty\freetype-2.4.4\src\type42\type42.c"
- >
- </File>
- <File
- RelativePath="..\thirdparty\freetype-2.4.4\src\winfonts\winfnt.c"
- >
- </File>
<Filter
Name="base"
>
@@ -605,18 +497,10 @@ >
</File>
<File
- RelativePath="..\thirdparty\freetype-2.4.4\src\base\ftbdf.c"
- >
- </File>
- <File
RelativePath="..\thirdparty\freetype-2.4.4\src\base\ftbitmap.c"
>
</File>
<File
- RelativePath="..\thirdparty\freetype-2.4.4\src\base\ftdebug.c"
- >
- </File>
- <File
RelativePath="..\thirdparty\freetype-2.4.4\src\base\ftgasp.c"
>
</File>
@@ -625,30 +509,10 @@ >
</File>
<File
- RelativePath="..\thirdparty\freetype-2.4.4\src\base\ftgxval.c"
- >
- </File>
- <File
RelativePath="..\thirdparty\freetype-2.4.4\src\base\ftinit.c"
>
</File>
<File
- RelativePath="..\thirdparty\freetype-2.4.4\src\base\ftlcdfil.c"
- >
- </File>
- <File
- RelativePath="..\thirdparty\freetype-2.4.4\src\base\ftmm.c"
- >
- </File>
- <File
- RelativePath="..\thirdparty\freetype-2.4.4\src\base\ftotval.c"
- >
- </File>
- <File
- RelativePath="..\thirdparty\freetype-2.4.4\src\base\ftpfr.c"
- >
- </File>
- <File
RelativePath="..\thirdparty\freetype-2.4.4\src\base\ftstroke.c"
>
</File>
@@ -665,10 +529,6 @@ >
</File>
<File
- RelativePath="..\thirdparty\freetype-2.4.4\src\base\ftwinfnt.c"
- >
- </File>
- <File
RelativePath="..\thirdparty\freetype-2.4.4\src\base\ftxf86.c"
>
</File>
diff --git a/win32/slimftmodules.h b/win32/slimftmodules.h new file mode 100644 index 00000000..5762018a --- /dev/null +++ b/win32/slimftmodules.h @@ -0,0 +1,21 @@ +/* custom ftmodule.h which selects the minimum features required by mupdf */ + +// FT_USE_MODULE( FT_Module_Class, autofit_module_class ) +FT_USE_MODULE( FT_Driver_ClassRec, tt_driver_class ) +FT_USE_MODULE( FT_Driver_ClassRec, t1_driver_class ) +FT_USE_MODULE( FT_Driver_ClassRec, cff_driver_class ) +FT_USE_MODULE( FT_Driver_ClassRec, t1cid_driver_class ) +// FT_USE_MODULE( FT_Driver_ClassRec, pfr_driver_class ) +// FT_USE_MODULE( FT_Driver_ClassRec, t42_driver_class ) +// FT_USE_MODULE( FT_Driver_ClassRec, winfnt_driver_class ) +// FT_USE_MODULE( FT_Driver_ClassRec, pcf_driver_class ) +FT_USE_MODULE( FT_Module_Class, psaux_module_class ) +FT_USE_MODULE( FT_Module_Class, psnames_module_class ) +// FT_USE_MODULE( FT_Module_Class, pshinter_module_class ) +// FT_USE_MODULE( FT_Renderer_Class, ft_raster1_renderer_class ) +FT_USE_MODULE( FT_Module_Class, sfnt_module_class ) +FT_USE_MODULE( FT_Renderer_Class, ft_smooth_renderer_class ) +// FT_USE_MODULE( FT_Renderer_Class, ft_smooth_lcd_renderer_class ) +// FT_USE_MODULE( FT_Renderer_Class, ft_smooth_lcdv_renderer_class ) +// FT_USE_MODULE( FT_Driver_ClassRec, bdf_driver_class ) + diff --git a/win32/slimftoptions.h b/win32/slimftoptions.h new file mode 100644 index 00000000..2289d7aa --- /dev/null +++ b/win32/slimftoptions.h @@ -0,0 +1,15 @@ +/* custom ftoption.h which selects the minimum features needed by mupdf */ + +#include <freetype/config/ftoption.h> +#undef FT_CONFIG_OPTION_USE_LZW +#undef FT_CONFIG_OPTION_USE_ZLIB +#undef FT_CONFIG_OPTION_MAC_FONTS +#undef FT_CONFIG_OPTION_INCREMENTAL +#undef TT_CONFIG_OPTION_EMBEDDED_BITMAPS +#undef TT_CONFIG_OPTION_GX_VAR_SUPPORT +#undef TT_CONFIG_OPTION_BDF +#undef T1_CONFIG_OPTION_NO_AFM +#undef T1_CONFIG_OPTION_NO_MM_SUPPORT + +#undef FT_CONFIG_OPTION_OLD_INTERNALS + |