mirror of
https://github.com/reactos/reactos.git
synced 2025-01-01 03:54:02 +00:00
435a566751
* sumatrapdf - vendor import * everything compiles (libjpeg, poppler, fitz, sumatrapdf) * does NOT link (remove the comment tags in the parent directory.rbuild file (rosapps dir) to build it) svn path=/trunk/; revision=29295
257 lines
6.7 KiB
Text
257 lines
6.7 KiB
Text
NULL=
|
|
BASEDIR=.
|
|
BINDIR=bin
|
|
|
|
!if "$(DEBUG)"=="1"
|
|
OBJDIR=obj-dbg
|
|
!else
|
|
OBJDIR=obj-rel
|
|
!endif
|
|
|
|
MUPDF=mupdf
|
|
FREETYPE_INC=$(BASEDIR)\windev\freetype_2_1_10\include
|
|
FREETYPE_LIB=$(BASEDIR)\windev\freetype_2_1_10
|
|
ZLIB_INC=$(BASEDIR)\windev\zlib
|
|
ZLIB_LIB=$(BASEDIR)\windev\zlib
|
|
JPEG_INC=$(BASEDIR)\windev\jpeg
|
|
JPEG_LIB=$(BASEDIR)\windev\jpeg
|
|
|
|
#DEBUG = 1
|
|
|
|
#
|
|
# Define compiler flags
|
|
#
|
|
CC = cl.exe
|
|
CFLAGS = $(CFLAGS) /nologo
|
|
CFLAGS = $(CFLAGS) /wd4996
|
|
CFLAGS = $(CFLAGS) /D "WIN32" /D "_WINDOWS" /D "_WIN32"
|
|
CFLAGS = $(CFLAGS) /D "_WIN32_WINNT=0x4000"
|
|
CFLAGS = $(CFLAGS) /D "NEED_MATH"
|
|
CFLAGS = $(CFLAGS) /D "_MBCS" /D "_REENTRANT" /W1 /GR-
|
|
CFLAGS = $(CFLAGS) /I$(BASEDIR)\include
|
|
CFLAGS = $(CFLAGS) /I$(BASEDIR)\include\fitz
|
|
CFLAGS = $(CFLAGS) /I$(BASEDIR)\include\mupdf
|
|
CFLAGS = $(CFLAGS) /I$(BASEDIR)\include\samus
|
|
CFLAGS = $(CFLAGS) /I$(FREETYPE_INC)
|
|
CFLAGS = $(CFLAGS) /I$(ZLIB_INC)
|
|
CFLAGS = $(CFLAGS) /I$(JPEG_INC)
|
|
|
|
# CFLAGS = /Ios-win32 /Fo$(OBJDIR)
|
|
|
|
!if "$(DEBUG)"=="1"
|
|
CFLAGS = $(CFLAGS) /D "_DEBUG" /MTd /Od /Zi
|
|
!else
|
|
CFLAGS = $(CFLAGS) /D "NDEBUG" /MT /Zi /O2 /GL /Oi /Ot /Oy /GF
|
|
!endif
|
|
|
|
#
|
|
# Define linker flags
|
|
#
|
|
LD = link.exe
|
|
LDFLAGS = $(LDFLAGS) /nologo
|
|
LDFLAGS = $(LDFLAGS) /LIBPATH:$(BINDIR)
|
|
LDFLAGS = $(LDFLAGS) /LIBPATH:$(FREETYPE_LIB)
|
|
LDFLAGS = $(LDFLAGS) /LIBPATH:$(ZLIB_LIB)
|
|
LDFLAGS = $(LDFLAGS) /LIBPATH:$(JPEG_LIB)
|
|
LDFLAGS = $(LDFLAGS) /SUBSYSTEM:WINDOWS
|
|
|
|
LIBS = $(LIBS) gdi32.lib comdlg32.lib advapi32.lib user32.lib shell32.lib kernel32.lib
|
|
|
|
!if "$(DEBUG)"=="1"
|
|
LIBS = $(LIBS) zlib_ds.lib freetype2110MT_D.lib jpeg_ds.lib
|
|
LDFLAGS = $(LDFLAGS) /DEBUG
|
|
!else
|
|
LDFLAGS = $(LDFLAGS) /OPT:NOWIN98 /LTCG /DEBUG
|
|
LIBS = $(LIBS) zlib_s.lib freetype2110MT.lib jpeg_s.lib
|
|
!endif
|
|
|
|
#
|
|
# Archiver flags
|
|
#
|
|
AR = lib.exe
|
|
ARFLAGS = $(ARFLAGS) /nologo
|
|
|
|
#
|
|
# mupdf.dll
|
|
#
|
|
MUPDF_DLL_OBJS= \
|
|
# this is stream
|
|
$(OBJDIR)\crypt_arc4.obj \
|
|
$(OBJDIR)\crypt_md5.obj \
|
|
$(OBJDIR)\filt_a85d.obj \
|
|
$(OBJDIR)\filt_ahxd.obj \
|
|
$(OBJDIR)\filt_arc4.obj \
|
|
$(OBJDIR)\filt_dctd.obj \
|
|
$(OBJDIR)\filt_faxd.obj \
|
|
$(OBJDIR)\filt_faxdtab.obj \
|
|
$(OBJDIR)\filt_faxe.obj \
|
|
$(OBJDIR)\filt_faxetab.obj \
|
|
$(OBJDIR)\filt_flate.obj \
|
|
$(OBJDIR)\filt_lzwd.obj \
|
|
$(OBJDIR)\filt_null.obj \
|
|
$(OBJDIR)\filt_pipeline.obj \
|
|
$(OBJDIR)\filt_predict.obj \
|
|
$(OBJDIR)\filt_rld.obj \
|
|
$(OBJDIR)\obj_array.obj \
|
|
$(OBJDIR)\obj_dict.obj \
|
|
$(OBJDIR)\obj_parse.obj \
|
|
$(OBJDIR)\obj_print.obj \
|
|
$(OBJDIR)\obj_simple.obj \
|
|
$(OBJDIR)\stm_filter.obj \
|
|
$(OBJDIR)\stm_buffer.obj \
|
|
$(OBJDIR)\stm_open.obj \
|
|
$(OBJDIR)\stm_misc.obj \
|
|
$(OBJDIR)\stm_read.obj \
|
|
$(OBJDIR)\stm_write.obj \
|
|
# this is for base
|
|
$(OBJDIR)\base_cpudep.obj \
|
|
$(OBJDIR)\base_error.obj \
|
|
$(OBJDIR)\base_hash.obj \
|
|
$(OBJDIR)\base_matrix.obj \
|
|
$(OBJDIR)\base_memory.obj \
|
|
$(OBJDIR)\base_rect.obj \
|
|
$(OBJDIR)\base_rune.obj \
|
|
$(OBJDIR)\util_getopt.obj \
|
|
$(OBJDIR)\util_strlcat.obj \
|
|
$(OBJDIR)\util_strlcpy.obj \
|
|
$(OBJDIR)\util_strsep.obj \
|
|
# this is for world
|
|
$(OBJDIR)\node_misc1.obj \
|
|
$(OBJDIR)\node_misc2.obj \
|
|
$(OBJDIR)\node_optimize.obj \
|
|
$(OBJDIR)\node_path.obj \
|
|
$(OBJDIR)\node_text.obj \
|
|
$(OBJDIR)\node_tree.obj \
|
|
$(OBJDIR)\res_colorspace.obj \
|
|
$(OBJDIR)\res_font.obj \
|
|
$(OBJDIR)\res_image.obj \
|
|
$(OBJDIR)\res_shade.obj \
|
|
# this is for raster
|
|
$(OBJDIR)\glyphcache.obj \
|
|
$(OBJDIR)\imagedraw.obj \
|
|
$(OBJDIR)\imagescale.obj \
|
|
$(OBJDIR)\imageunpack.obj \
|
|
$(OBJDIR)\meshdraw.obj \
|
|
$(OBJDIR)\pathfill.obj \
|
|
$(OBJDIR)\pathscan.obj \
|
|
$(OBJDIR)\pathstroke.obj \
|
|
$(OBJDIR)\pixmap.obj \
|
|
$(OBJDIR)\porterduff.obj \
|
|
$(OBJDIR)\render.obj \
|
|
# this is for draw
|
|
# $(OBJDIR)\draw_misc.obj \
|
|
# this mupdf
|
|
$(OBJDIR)\pdf_annot.obj \
|
|
$(OBJDIR)\pdf_build.obj \
|
|
$(OBJDIR)\pdf_cmap.obj \
|
|
$(OBJDIR)\pdf_colorspace1.obj \
|
|
$(OBJDIR)\pdf_colorspace2.obj \
|
|
$(OBJDIR)\pdf_crypt.obj \
|
|
$(OBJDIR)\pdf_debug.obj \
|
|
$(OBJDIR)\pdf_doctor.obj \
|
|
$(OBJDIR)\pdf_font.obj \
|
|
$(OBJDIR)\pdf_fontagl.obj \
|
|
$(OBJDIR)\pdf_fontenc.obj \
|
|
# $(OBJDIR)\pdf_fontfile.obj \
|
|
# $(OBJDIR)\pdf_fontfilefc.obj \
|
|
$(OBJDIR)\pdf_fontfilems.obj \
|
|
$(OBJDIR)\pdf_function.obj \
|
|
$(OBJDIR)\pdf_image.obj \
|
|
$(OBJDIR)\pdf_interpret.obj \
|
|
$(OBJDIR)\pdf_lex.obj \
|
|
$(OBJDIR)\pdf_nametree.obj \
|
|
$(OBJDIR)\pdf_open.obj \
|
|
$(OBJDIR)\pdf_outline.obj \
|
|
$(OBJDIR)\pdf_page.obj \
|
|
$(OBJDIR)\pdf_pagetree.obj \
|
|
$(OBJDIR)\pdf_parse.obj \
|
|
$(OBJDIR)\pdf_pattern.obj \
|
|
$(OBJDIR)\pdf_repair.obj \
|
|
$(OBJDIR)\pdf_resources.obj \
|
|
$(OBJDIR)\pdf_save.obj \
|
|
$(OBJDIR)\pdf_shade.obj \
|
|
$(OBJDIR)\pdf_shade1.obj \
|
|
$(OBJDIR)\pdf_shade4.obj \
|
|
$(OBJDIR)\pdf_store.obj \
|
|
$(OBJDIR)\pdf_stream.obj \
|
|
$(OBJDIR)\pdf_type3.obj \
|
|
$(OBJDIR)\pdf_unicode.obj \
|
|
$(OBJDIR)\pdf_xobject.obj \
|
|
$(OBJDIR)\pdf_xref.obj \
|
|
$(NULL)
|
|
|
|
MUPDF_EXE_OBJS= \
|
|
$(MUPDF_DLL_OBJS) \
|
|
$(OBJDIR)\pdfapp.obj \
|
|
$(OBJDIR)\winmain.obj \
|
|
$(NULL)
|
|
|
|
MUPDF_DLL_NAME=mupdf.dll
|
|
MUPDF_DLL_LIB_NAME=mupdf.lib
|
|
|
|
!if "$(DEBUG)"=="1"
|
|
MUPDF_EXE_NAME=mupdf-dbg.exe
|
|
MUPDF_PDB_NAME=mupdf-dbg.pdb
|
|
!else
|
|
MUPDF_EXE_NAME=mupdf.exe
|
|
MUPDF_PDB_NAME=mupdf.pdb
|
|
!endif
|
|
|
|
all: $(BINDIR)\$(MUPDF_EXE_NAME)
|
|
|
|
clean:
|
|
if exist $(BINDIR) rmdir /S /Q $(BINDIR)
|
|
if exist $(OBJDIR) rmdir /S /Q $(OBJDIR)
|
|
|
|
$(OBJDIR):
|
|
if not exist $(OBJDIR) mkdir $(OBJDIR)
|
|
|
|
$(BINDIR):
|
|
if not exist $(BINDIR) mkdir $(BINDIR)
|
|
|
|
#
|
|
# mupdf.dll
|
|
#
|
|
$(BINDIR)\$(MUPDF_DLL_NAME) : $(BINDIR) $(MUPDF_DLL_OBJS)
|
|
$(LD) $(LDFLAGS) /DLL \
|
|
/IMPLIB:$(BINDIR)\$(MUPDF_DLL_LIB_NAME) \
|
|
/OUT:$(BINDIR)\$(MUPDF_DLL_NAME) \
|
|
$(MUPDF_DLL_OBJS) $(LIBS)
|
|
|
|
$(OBJDIR)\winres.RES:
|
|
rc.exe /n /fo$(OBJDIR)\winres.RES apps\windows\winres.rc
|
|
|
|
$(BINDIR)\$(MUPDF_EXE_NAME) : $(BINDIR) $(MUPDF_EXE_OBJS) $(OBJDIR)\winres.RES
|
|
$(LD) $(LDFLAGS) \
|
|
/OUT:$(BINDIR)\$(MUPDF_EXE_NAME) \
|
|
/PDB:$(BINDIR)\$(MUPDF_PDB_NAME) \
|
|
$(MUPDF_EXE_OBJS) $(OBJDIR)\winres.RES $(LIBS)
|
|
|
|
$(MUPDF_DLL_OBJS) : $(OBJDIR)
|
|
|
|
#{$(BASEDIR)\mupdf}.cpp{$(OBJDIR)}.obj::
|
|
# $(CC) $(CFLAGS) /Fo$(OBJDIR)\ /c $<
|
|
|
|
{$(BASEDIR)\draw}.c{$(OBJDIR)}.obj::
|
|
$(CC) $(CFLAGS) /Fo$(OBJDIR)\ /c $<
|
|
|
|
{$(BASEDIR)\mupdf}.c{$(OBJDIR)}.obj::
|
|
$(CC) $(CFLAGS) /Fo$(OBJDIR)\ /c $<
|
|
|
|
{$(BASEDIR)\stream}.c{$(OBJDIR)}.obj::
|
|
$(CC) $(CFLAGS) /Fo$(OBJDIR)\ /c $<
|
|
|
|
{$(BASEDIR)\base}.c{$(OBJDIR)}.obj::
|
|
$(CC) $(CFLAGS) /Fo$(OBJDIR)\ /c $<
|
|
|
|
{$(BASEDIR)\world}.c{$(OBJDIR)}.obj::
|
|
$(CC) $(CFLAGS) /Fo$(OBJDIR)\ /c $<
|
|
|
|
{$(BASEDIR)\raster}.c{$(OBJDIR)}.obj::
|
|
$(CC) $(CFLAGS) /Fo$(OBJDIR)\ /c $<
|
|
|
|
{$(BASEDIR)\apps\common}.c{$(OBJDIR)}.obj::
|
|
$(CC) $(CFLAGS) /Fo$(OBJDIR)\ /c $<
|
|
|
|
{$(BASEDIR)\apps\windows}.c{$(OBJDIR)}.obj::
|
|
$(CC) $(CFLAGS) /Fo$(OBJDIR)\ /c $<
|