diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2011-04-05 12:04:13 +0200 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2011-04-05 12:04:13 +0200 |
commit | c61a13b445c2d4d7b6468a0f2fe7ab998e210e90 (patch) | |
tree | 358cc5fc883fdf34f8fecad0965d5fc5426e75c3 /Makethird | |
parent | 68f9077504d387a396efd0af6b8ee4147c3451f3 (diff) | |
download | mupdf-c61a13b445c2d4d7b6468a0f2fe7ab998e210e90.tar.xz |
Makefile tweaks.
Diffstat (limited to 'Makethird')
-rw-r--r-- | Makethird | 204 |
1 files changed, 102 insertions, 102 deletions
@@ -4,12 +4,73 @@ # static libraries. Download and unzip the the mupdf-thirdparty.zip archive # in the source directory. -jbig2dec_dir := $(wildcard thirdparty/jbig2dec*) -openjpeg_dir := $(wildcard thirdparty/openjpeg*/libopenjpeg) freetype_dir := $(wildcard thirdparty/freetype*) +jbig2dec_dir := $(wildcard thirdparty/jbig2dec*) jpeg_dir := $(wildcard thirdparty/jpeg*) +openjpeg_dir := $(wildcard thirdparty/openjpeg*/libopenjpeg) zlib_dir := $(wildcard thirdparty/zlib*) +ifneq "$(freetype_dir)" "" + +THIRD_LIBS += $(FREETYPE_LIB) +THIRD_INCS += -I$(freetype_dir)/include +LIBS := $(filter-out -lfreetype, $(LIBS)) + +SYS_FREETYPE_INC := + +FREETYPE_OBJ=$(addprefix $(OBJDIR)/ft_, \ + 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 -Iwin32 \ + '-DFT_CONFIG_MODULES_H="slimftmodules.h"' \ + '-DFT_CONFIG_OPTIONS_H="slimftoptions.h"' + +$(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_ftbitmap.o: $(freetype_dir)/src/base/ftbitmap.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_ftinit.o: $(freetype_dir)/src/base/ftinit.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 + $(FTCC_CMD) +$(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_ftxf86.o: $(freetype_dir)/src/base/ftxf86.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_psaux.o: $(freetype_dir)/src/psaux/psaux.c + $(FTCC_CMD) +$(OBJDIR)/ft_psnames.o: $(freetype_dir)/src/psnames/psnames.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 + $(FTCC_CMD) +$(OBJDIR)/ft_truetype.o: $(freetype_dir)/src/truetype/truetype.c + $(FTCC_CMD) +$(OBJDIR)/ft_type1.o: $(freetype_dir)/src/type1/type1.c + $(FTCC_CMD) + +endif + ifneq "$(jbig2dec_dir)" "" THIRD_LIBS += $(JBIG2DEC_LIB) @@ -40,45 +101,6 @@ $(OBJDIR)/%.o: $(jbig2dec_dir)/%.c endif -ifneq "$(openjpeg_dir)" "" - -THIRD_LIBS += $(OPENJPEG_LIB) -THIRD_INCS += -I$(openjpeg_dir) -LIBS := $(filter-out -lopenjpeg, $(LIBS)) - -# opj_config.h does not exist in the pristine source -$(OBJDIR)/opj_config.h: - cp $(openjpeg_dir)/../opj_config.h.in.user $@ - -OPENJPEG_SRC=$(addprefix $(openjpeg_dir)/, \ - bio.c \ - cio.c \ - dwt.c \ - event.c \ - image.c \ - j2k.c \ - j2k_lib.c \ - jp2.c \ - jpt.c \ - mct.c \ - mqc.c \ - openjpeg.c \ - pi.c \ - raw.c \ - t1.c \ - t2.c \ - tcd.c \ - tgt.c ) -OPENJPEG_OBJ=$(OPENJPEG_SRC:$(openjpeg_dir)/%.c=$(OBJDIR)/opj_%.o) -OPENJPEG_LIB=$(OBJDIR)/libopenjpeg.a -$(OPENJPEG_OBJ): $(OBJDIR)/opj_config.h -$(OPENJPEG_LIB): $(OPENJPEG_OBJ) - $(AR_CMD) -$(OBJDIR)/opj_%.o: $(openjpeg_dir)/%.c - $(CC_CMD) -I$(OBJDIR) -DOPJ_STATIC - -endif - ifneq "$(jpeg_dir)" "" THIRD_LIBS += $(JPEG_LIB) @@ -131,6 +153,45 @@ $(OBJDIR)/jpeg_%.o: $(jpeg_dir)/%.c endif +ifneq "$(openjpeg_dir)" "" + +THIRD_LIBS += $(OPENJPEG_LIB) +THIRD_INCS += -I$(openjpeg_dir) +LIBS := $(filter-out -lopenjpeg, $(LIBS)) + +# opj_config.h does not exist in the pristine source +$(OBJDIR)/opj_config.h: + cp $(openjpeg_dir)/../opj_config.h.in.user $@ + +OPENJPEG_SRC=$(addprefix $(openjpeg_dir)/, \ + bio.c \ + cio.c \ + dwt.c \ + event.c \ + image.c \ + j2k.c \ + j2k_lib.c \ + jp2.c \ + jpt.c \ + mct.c \ + mqc.c \ + openjpeg.c \ + pi.c \ + raw.c \ + t1.c \ + t2.c \ + tcd.c \ + tgt.c ) +OPENJPEG_OBJ=$(OPENJPEG_SRC:$(openjpeg_dir)/%.c=$(OBJDIR)/opj_%.o) +OPENJPEG_LIB=$(OBJDIR)/libopenjpeg.a +$(OPENJPEG_OBJ): $(OBJDIR)/opj_config.h +$(OPENJPEG_LIB): $(OPENJPEG_OBJ) + $(AR_CMD) +$(OBJDIR)/opj_%.o: $(openjpeg_dir)/%.c + $(CC_CMD) -I$(OBJDIR) -DOPJ_STATIC + +endif + ifneq "$(zlib_dir)" "" THIRD_LIBS += $(ZLIB_LIB) @@ -156,64 +217,3 @@ $(OBJDIR)/zlib_%.o: $(zlib_dir)/%.c $(CC_CMD) endif - -ifneq "$(freetype_dir)" "" - -THIRD_LIBS += $(FREETYPE_LIB) -THIRD_INCS += -I$(freetype_dir)/include -LIBS := $(filter-out -lfreetype, $(LIBS)) - -SYS_FREETYPE_INC := - -FREETYPE_OBJ=$(addprefix $(OBJDIR)/ft_, \ - 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 -Iwin32 \ - '-DFT_CONFIG_MODULES_H="slimftmodules.h"' \ - '-DFT_CONFIG_OPTIONS_H="slimftoptions.h"' - -$(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_ftbitmap.o: $(freetype_dir)/src/base/ftbitmap.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_ftinit.o: $(freetype_dir)/src/base/ftinit.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 - $(FTCC_CMD) -$(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_ftxf86.o: $(freetype_dir)/src/base/ftxf86.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_psaux.o: $(freetype_dir)/src/psaux/psaux.c - $(FTCC_CMD) -$(OBJDIR)/ft_psnames.o: $(freetype_dir)/src/psnames/psnames.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 - $(FTCC_CMD) -$(OBJDIR)/ft_truetype.o: $(freetype_dir)/src/truetype/truetype.c - $(FTCC_CMD) -$(OBJDIR)/ft_type1.o: $(freetype_dir)/src/type1/type1.c - $(FTCC_CMD) - -endif |