diff options
-rw-r--r-- | Jamfile | 404 | ||||
-rw-r--r-- | Jamrules | 82 | ||||
-rw-r--r-- | apps/Jamfile | 110 | ||||
-rw-r--r-- | base/Jamfile | 17 | ||||
-rw-r--r-- | fonts/Jamfile | 20 | ||||
-rw-r--r-- | mupdf/Jamfile | 53 | ||||
-rw-r--r-- | raster/Jamfile | 20 | ||||
-rw-r--r-- | samus/Jamfile | 10 | ||||
-rw-r--r-- | stream/Jamfile | 46 | ||||
-rw-r--r-- | world/Jamfile | 20 |
10 files changed, 388 insertions, 394 deletions
@@ -12,401 +12,17 @@ SubDir TOP ; -ALL_LOCATE_TARGET = [ FDirName $(TOP) build $(BUILD) ] ; - -BINDIR = [ FDirName $(TOP) dist ] ; - -LINKLIBS = $(FREETYPELD) -lexpat -ljpeg -lz -lm ; -FITZLIBS = - libsamus libmupdf libfonts - libraster - libworld - libstream - libbase -; - -if $(HAVE_JASPER) = yes -{ - DEFINES += HAVE_JASPER ; - LINKLIBS += -ljasper ; -} - -if $(HAVE_JBIG2DEC) = yes -{ - DEFINES += HAVE_JBIG2DEC ; - LINKLIBS += -ljbig2dec ; -} - -if $(NEED_GETOPT) = yes { DEFINES += NEED_GETOPT ; } -if $(NEED_STRLCAT) = yes { DEFINES += NEED_STRLCAT ; } -if $(NEED_STRLCPY) = yes { DEFINES += NEED_STRLCPY ; } -if $(NEED_STRSEP) = yes { DEFINES += NEED_STRSEP ; } - -HDRS = [ FDirName $(TOP) include ] ; - -# -------------------------------------------------------------------------- - -rule UserObject -{ - switch $(>) - { - case *.rc : - WindRes $(<) : $(>) ; - - case *.cff : - Cc $(<) : $(<:S=.c) ; - HexDump $(<:S=.c) : $(>) ; - - case * : - Echo "unknown suffix on" $(>) ; - } -} - -rule HexDump -{ - Depends $(<) : $(>) ; - MakeLocate $(<) : $(LOCATE_SOURCE) ; - Clean clean : $(<) ; -} - -rule WindRes -{ - Depends $(<) : $(>) ; - Clean clean : $(<) ; -} - -actions HexDump { xxd -i $(>) | sed -e 's/unsigned/const unsigned/' > $(<) } -actions WindRes { windres -i $(>) -o $(<) --include-dir=$(>:D) } - -rule XCopy -{ - for i in $(<) - { - local d = [ FDirName $(ALL_LOCATE_TARGET) $(i:D) ] ; - LOCATE on $(i:G=xcopy) = $(ALL_LOCATE_TARGET) ; - Depends $(i:G=xcopy) : $(d:G=dir) ; - MkDir $(d:G=dir) ; - File $(i:G=xcopy) : $(i) ; - } -} - -# -------------------------------------------------------------------------- - -SubDir TOP base ; - -Library libbase : - base_cpudep.c - base_error.c - base_hash.c - base_matrix.c - base_memory.c - base_rect.c - base_rune.c - ; - -if $(NEED_GETOPT) = yes { Library libbase : util_getopt.c ; } -if $(NEED_STRLCAT) = yes { Library libbase : util_strlcat.c ; } -if $(NEED_STRLCPY) = yes { Library libbase : util_strlcpy.c ; } -if $(NEED_STRSEP) = yes { Library libbase : util_strsep.c ; } - -# -------------------------------------------------------------------------- - -SubDir TOP stream ; - -Library libstream : - - crypt_arc4.c - crypt_md5.c - - obj_array.c - obj_dict.c - obj_parse.c - obj_print.c - obj_simple.c - - stm_buffer.c - stm_filter.c - stm_open.c - stm_read.c - stm_write.c - stm_misc.c - - filt_pipeline.c - filt_arc4.c - filt_null.c - - filt_a85d.c - filt_a85e.c - filt_ahxd.c - filt_ahxe.c - filt_dctd.c - filt_dcte.c - filt_faxd.c - filt_faxdtab.c - filt_faxe.c - filt_faxetab.c - filt_flate.c - filt_lzwd.c - filt_lzwe.c - filt_predict.c - filt_rld.c - filt_rle.c - - ; - -if $(HAVE_JASPER) = yes { Library libstream : filt_jpxd.c ; } -if $(HAVE_JBIG2DEC) = yes { Library libstream : filt_jbig2d.c ; } - -# -------------------------------------------------------------------------- - -SubDir TOP world ; - -Library libworld : - - node_toxml.c - node_misc1.c - node_misc2.c - node_optimize.c - node_path.c - node_text.c - node_tree.c - - res_cmap.c - res_colorspace.c - res_font.c - res_image.c - res_shade.c - - ; - -# -------------------------------------------------------------------------- - -SubDir TOP raster ; - -Library libraster : - glyphcache.c - pixmap.c - porterduff.c - meshdraw.c - imagedraw.c - imageunpack.c - imagescale.c - pathscan.c - pathfill.c - pathstroke.c - render.c - ; - -if $(OSPLAT) = PPC { Library libraster : archppc.c ; } -if $(OSPLAT) = SPARC { Library libraster : archsparc.c ; } -if $(OSPLAT) = X86 { Library libraster : archx86.c ; } - -# -------------------------------------------------------------------------- - -SubDir TOP fonts ; - -Library libfonts : - Dingbats.cff - StandardSymL.cff - URWChanceryL-MediItal.cff - NimbusMonL-Bold.cff - NimbusMonL-BoldObli.cff - NimbusMonL-Regu.cff - NimbusMonL-ReguObli.cff - NimbusRomNo9L-Medi.cff - NimbusRomNo9L-MediItal.cff - NimbusRomNo9L-Regu.cff - NimbusRomNo9L-ReguItal.cff - NimbusSanL-Bold.cff - NimbusSanL-BoldItal.cff - NimbusSanL-Regu.cff - NimbusSanL-ReguItal.cff - ; - -# -------------------------------------------------------------------------- - -SubDir TOP mupdf ; - -Library libmupdf : - - # syntax layer - pdf_crypt.c - pdf_debug.c - pdf_doctor.c - pdf_lex.c - pdf_nametree.c - pdf_open.c - pdf_parse.c - pdf_repair.c - pdf_save.c - pdf_stream.c - pdf_xref.c - - # metadata layer - pdf_annot.c - pdf_outline.c - - # fonts - pdf_fontagl.c - pdf_fontenc.c - pdf_cmap.c - pdf_unicode.c - pdf_font.c - pdf_type3.c - pdf_fontfile.c # use builtin fonts - # pdf_fontfilefc.c # use fontconfig - # pdf_fontfilems.c # scan $WINDIR/Fonts - - # other resources - pdf_function.c - pdf_colorspace1.c - pdf_colorspace2.c - pdf_image.c - pdf_pattern.c - pdf_shade.c - pdf_shade1.c - pdf_shade4.c - pdf_xobject.c - - # pages, resource dictionaries, ... - pdf_build.c - pdf_interpret.c - pdf_page.c - pdf_pagetree.c - pdf_resources.c - pdf_store.c - - ; - -# -------------------------------------------------------------------------- - -SubDir TOP samus ; - -Library libsamus : - sa_misc.c - sa_zip.c - sa_xml.c - sa_tiff.c - sa_pack.c - ; - -# -------------------------------------------------------------------------- -# -# Build simple portable apps -# - -SubDir TOP apps ; - -APPLIST = - pdfrip - pdfclean - pdfdebug - pdfmerge - pdfselect - samshow - ; - -for APP in $(APPLIST) -{ - Main $(APP) : $(APP).c ; - LinkLibraries $(APP) : $(FITZLIBS) ; - InstallBin $(BINDIR) : $(APP)$(SUFEXE) ; -} - -# -------------------------------------------------------------------------- -# -# Build non-portable GUI frontend apps -# - -SubDir TOP apps common ; - -Library libpdfapp : - pdfapp.c - ; - -if $(OS) = MINGW -{ - SubDir TOP apps windows ; - - Main ghostpdf : - winmain.c - winres.rc - ; - - WINLIBS = -lgdi32 -lcomdlg32 ; - if $(BUILD) = release { WINLIBS += -mwindows ; } - - LinkLibraries ghostpdf : libpdfapp $(FITZLIBS) ; - - LINKLIBS on ghostpdf$(SUFEXE) = $(LINKLIBS) $(WINLIBS) ; - - InstallBin $(BINDIR) : ghostpdf$(SUFEXE) ; -} - -if $(HAVE_X11) = yes -{ - SubDir TOP apps unix ; - Main ghostpdf : x11pdf.c ximage.c ; - LinkLibraries ghostpdf : libpdfapp $(FITZLIBS) ; - LINKLIBS on ghostpdf$(SUFEXE) = $(LINKLIBS) -lX11 -lXext ; -} - -if $(OS) = MACOSX -{ - SubDir TOP apps macosx ; - - MACBUNDLE = GhostPDF.app ; - - XCopy - $(MACBUNDLE)/Contents/Info.plist - $(MACBUNDLE)/Contents/PkgInfo - ; - XCopy - $(MACBUNDLE)/Contents/Resources/English.lproj/InfoPlist.strings - $(MACBUNDLE)/Contents/Resources/English.lproj/main.nib/classes.nib - $(MACBUNDLE)/Contents/Resources/English.lproj/main.nib/info.nib - $(MACBUNDLE)/Contents/Resources/English.lproj/main.nib/objects.xib - $(MACBUNDLE)/Contents/Resources/macpdf.icns - ; - - MACPDF = $(MACBUNDLE)/Contents/MacOS/ghostpdf ; - MkDir $(ALL_LOCATE_TARGET)/$(MACPDF:D) ; - Depends $(MACPDF) : $(ALL_LOCATE_TARGET)/$(MACPDF:D) ; - Main $(MACPDF) : macpdf.c ; - LinkLibraries $(MACPDF) : libpdfapp $(FITZLIBS) ; - LINKLIBS on $(MACPDF) = $(LINKLIBS) -framework Carbon ; -} - -# -------------------------------------------------------------------------- -# -# Mozilla plugins -# - -SubDir TOP apps mozilla ; - -if $(OS) = MINGW -{ - SUFEXE on npmupdf.dll = ; - LINKFLAGS on npmupdf.dll = -shared -Wl,--kill-at ; - LINKLIBS on npmupdf.dll = $(LINKLIBS) -lgdi32 ; - - Main npmupdf.dll : - npwin.c - moz_winres.rc - moz_main.c - ; - - LinkLibraries npmupdf.dll : $(FITZLIBS) ; - InstallBin $(BINDIR) : npmupdf.dll ; -} +InstallFile $(BINDIR) : PUBLIC ; +InstallFile $(BINDIR) : CHANGES ; -# -------------------------------------------------------------------------- -# -# Documenatation -# +SubInclude TOP base ; +SubInclude TOP stream ; +SubInclude TOP world ; +SubInclude TOP raster ; -SubDir TOP ; +SubInclude TOP fonts ; +SubInclude TOP mupdf ; +SubInclude TOP samus ; -InstallFile $(BINDIR) : PUBLIC ; -InstallFile $(BINDIR) : CHANGES ; +SubInclude TOP apps ; @@ -4,6 +4,7 @@ # This file is sourced by Jamfile when making # Put all configuration stuff here # + OPTIM = ; # disable jam's built-in optimization flags if $(OS) = MINGW { @@ -104,3 +105,84 @@ switch $(BUILD) Exit "Unknown BUILD target:" $(BUILD) ; } +# ------------------------------------------------------------------------- +# +# Fitz specific rules +# + +ALL_LOCATE_TARGET = [ FDirName $(TOP) build $(BUILD) ] ; + +HDRS = [ FDirName $(TOP) include ] ; + +BINDIR = [ FDirName $(TOP) dist ] ; + +LINKLIBS = $(FREETYPELD) -lexpat -ljpeg -lz -lm ; +FITZLIBS = + libsamus libmupdf libfonts + libraster + libworld + libstream + libbase +; + +if $(HAVE_JASPER) = yes +{ + DEFINES += HAVE_JASPER ; + LINKLIBS += -ljasper ; +} + +if $(HAVE_JBIG2DEC) = yes +{ + DEFINES += HAVE_JBIG2DEC ; + LINKLIBS += -ljbig2dec ; +} + +if $(NEED_GETOPT) = yes { DEFINES += NEED_GETOPT ; } +if $(NEED_STRLCAT) = yes { DEFINES += NEED_STRLCAT ; } +if $(NEED_STRLCPY) = yes { DEFINES += NEED_STRLCPY ; } +if $(NEED_STRSEP) = yes { DEFINES += NEED_STRSEP ; } + +rule UserObject +{ + switch $(>) + { + case *.rc : + WindRes $(<) : $(>) ; + + case *.cff : + Cc $(<) : $(<:S=.c) ; + HexDump $(<:S=.c) : $(>) ; + + case * : + Echo "unknown suffix on" $(>) ; + } +} + +rule HexDump +{ + Depends $(<) : $(>) ; + MakeLocate $(<) : $(LOCATE_SOURCE) ; + Clean clean : $(<) ; +} + +rule WindRes +{ + Depends $(<) : $(>) ; + Clean clean : $(<) ; +} + +actions HexDump { xxd -i $(>) | sed -e 's/unsigned/const unsigned/' > $(<) } +actions WindRes { windres -i $(>) -o $(<) --include-dir=$(>:D) } + +rule XCopy +{ + for i in $(<) + { + local d = [ FDirName $(ALL_LOCATE_TARGET) $(i:D) ] ; + LOCATE on $(i:G=xcopy) = $(ALL_LOCATE_TARGET) ; + Depends $(i:G=xcopy) : $(d:G=dir) ; + MkDir $(d:G=dir) ; + File $(i:G=xcopy) : $(i) ; + } +} + diff --git a/apps/Jamfile b/apps/Jamfile new file mode 100644 index 00000000..a2452a4f --- /dev/null +++ b/apps/Jamfile @@ -0,0 +1,110 @@ +# -------------------------------------------------------------------------- +# +# Build simple portable apps +# + +SubDir TOP apps ; + +APPLIST = + pdfrip + pdfclean + pdfdebug + pdfmerge + pdfselect + samshow + ; + +for APP in $(APPLIST) +{ + Main $(APP) : $(APP).c ; + LinkLibraries $(APP) : $(FITZLIBS) ; + InstallBin $(BINDIR) : $(APP)$(SUFEXE) ; +} + +# -------------------------------------------------------------------------- +# +# Build non-portable GUI frontend apps +# + +SubDir TOP apps common ; + +Library libpdfapp : + pdfapp.c + ; + +if $(OS) = MINGW +{ + SubDir TOP apps windows ; + + Main ghostpdf : + winmain.c + winres.rc + ; + + WINLIBS = -lgdi32 -lcomdlg32 ; + if $(BUILD) = release { WINLIBS += -mwindows ; } + + LinkLibraries ghostpdf : libpdfapp $(FITZLIBS) ; + + LINKLIBS on ghostpdf$(SUFEXE) = $(LINKLIBS) $(WINLIBS) ; + + InstallBin $(BINDIR) : ghostpdf$(SUFEXE) ; +} + +if $(HAVE_X11) = yes +{ + SubDir TOP apps unix ; + Main ghostpdf : x11pdf.c ximage.c ; + LinkLibraries ghostpdf : libpdfapp $(FITZLIBS) ; + LINKLIBS on ghostpdf$(SUFEXE) = $(LINKLIBS) -lX11 -lXext ; +} + +if $(OS) = MACOSX +{ + SubDir TOP apps macosx ; + + MACBUNDLE = GhostPDF.app ; + + XCopy + $(MACBUNDLE)/Contents/Info.plist + $(MACBUNDLE)/Contents/PkgInfo + ; + XCopy + $(MACBUNDLE)/Contents/Resources/English.lproj/InfoPlist.strings + $(MACBUNDLE)/Contents/Resources/English.lproj/main.nib/classes.nib + $(MACBUNDLE)/Contents/Resources/English.lproj/main.nib/info.nib + $(MACBUNDLE)/Contents/Resources/English.lproj/main.nib/objects.xib + $(MACBUNDLE)/Contents/Resources/macpdf.icns + ; + + MACPDF = $(MACBUNDLE)/Contents/MacOS/ghostpdf ; + MkDir $(ALL_LOCATE_TARGET)/$(MACPDF:D) ; + Depends $(MACPDF) : $(ALL_LOCATE_TARGET)/$(MACPDF:D) ; + Main $(MACPDF) : macpdf.c ; + LinkLibraries $(MACPDF) : libpdfapp $(FITZLIBS) ; + LINKLIBS on $(MACPDF) = $(LINKLIBS) -framework Carbon ; +} + +# -------------------------------------------------------------------------- +# +# Mozilla plugins +# + +SubDir TOP apps mozilla ; + +if $(OS) = MINGW +{ + SUFEXE on npmupdf.dll = ; + LINKFLAGS on npmupdf.dll = -shared -Wl,--kill-at ; + LINKLIBS on npmupdf.dll = $(LINKLIBS) -lgdi32 ; + + Main npmupdf.dll : + npwin.c + moz_winres.rc + moz_main.c + ; + + LinkLibraries npmupdf.dll : $(FITZLIBS) ; + InstallBin $(BINDIR) : npmupdf.dll ; +} + diff --git a/base/Jamfile b/base/Jamfile new file mode 100644 index 00000000..0436cffd --- /dev/null +++ b/base/Jamfile @@ -0,0 +1,17 @@ +SubDir TOP base ; + +Library libbase : + base_cpudep.c + base_error.c + base_hash.c + base_matrix.c + base_memory.c + base_rect.c + base_rune.c + ; + +if $(NEED_GETOPT) = yes { Library libbase : util_getopt.c ; } +if $(NEED_STRLCAT) = yes { Library libbase : util_strlcat.c ; } +if $(NEED_STRLCPY) = yes { Library libbase : util_strlcpy.c ; } +if $(NEED_STRSEP) = yes { Library libbase : util_strsep.c ; } + diff --git a/fonts/Jamfile b/fonts/Jamfile new file mode 100644 index 00000000..d443b93d --- /dev/null +++ b/fonts/Jamfile @@ -0,0 +1,20 @@ +SubDir TOP fonts ; + +Library libfonts : + Dingbats.cff + StandardSymL.cff + URWChanceryL-MediItal.cff + NimbusMonL-Bold.cff + NimbusMonL-BoldObli.cff + NimbusMonL-Regu.cff + NimbusMonL-ReguObli.cff + NimbusRomNo9L-Medi.cff + NimbusRomNo9L-MediItal.cff + NimbusRomNo9L-Regu.cff + NimbusRomNo9L-ReguItal.cff + NimbusSanL-Bold.cff + NimbusSanL-BoldItal.cff + NimbusSanL-Regu.cff + NimbusSanL-ReguItal.cff + ; + diff --git a/mupdf/Jamfile b/mupdf/Jamfile new file mode 100644 index 00000000..dba33a63 --- /dev/null +++ b/mupdf/Jamfile @@ -0,0 +1,53 @@ +SubDir TOP mupdf ; + +Library libmupdf : + + # syntax layer + pdf_crypt.c + pdf_debug.c + pdf_doctor.c + pdf_lex.c + pdf_nametree.c + pdf_open.c + pdf_parse.c + pdf_repair.c + pdf_save.c + pdf_stream.c + pdf_xref.c + + # metadata layer + pdf_annot.c + pdf_outline.c + + # fonts + pdf_fontagl.c + pdf_fontenc.c + pdf_cmap.c + pdf_unicode.c + pdf_font.c + pdf_type3.c + pdf_fontfile.c # use builtin fonts + # pdf_fontfilefc.c # use fontconfig + # pdf_fontfilems.c # scan $WINDIR/Fonts + + # other resources + pdf_function.c + pdf_colorspace1.c + pdf_colorspace2.c + pdf_image.c + pdf_pattern.c + pdf_shade.c + pdf_shade1.c + pdf_shade4.c + pdf_xobject.c + + # pages, resource dictionaries, ... + pdf_build.c + pdf_interpret.c + pdf_page.c + pdf_pagetree.c + pdf_resources.c + pdf_store.c + + ; + diff --git a/raster/Jamfile b/raster/Jamfile new file mode 100644 index 00000000..64a3c698 --- /dev/null +++ b/raster/Jamfile @@ -0,0 +1,20 @@ +SubDir TOP raster ; + +Library libraster : + glyphcache.c + pixmap.c + porterduff.c + meshdraw.c + imagedraw.c + imageunpack.c + imagescale.c + pathscan.c + pathfill.c + pathstroke.c + render.c + ; + +if $(OSPLAT) = PPC { Library libraster : archppc.c ; } +if $(OSPLAT) = SPARC { Library libraster : archsparc.c ; } +if $(OSPLAT) = X86 { Library libraster : archx86.c ; } + diff --git a/samus/Jamfile b/samus/Jamfile new file mode 100644 index 00000000..dde4a934 --- /dev/null +++ b/samus/Jamfile @@ -0,0 +1,10 @@ +SubDir TOP samus ; + +Library libsamus : + sa_misc.c + sa_zip.c + sa_xml.c + sa_tiff.c + sa_pack.c + ; + diff --git a/stream/Jamfile b/stream/Jamfile new file mode 100644 index 00000000..8689e934 --- /dev/null +++ b/stream/Jamfile @@ -0,0 +1,46 @@ +SubDir TOP stream ; + +Library libstream : + + crypt_arc4.c + crypt_md5.c + + obj_array.c + obj_dict.c + obj_parse.c + obj_print.c + obj_simple.c + + stm_buffer.c + stm_filter.c + stm_open.c + stm_read.c + stm_write.c + stm_misc.c + + filt_pipeline.c + filt_arc4.c + filt_null.c + + filt_a85d.c + filt_a85e.c + filt_ahxd.c + filt_ahxe.c + filt_dctd.c + filt_dcte.c + filt_faxd.c + filt_faxdtab.c + filt_faxe.c + filt_faxetab.c + filt_flate.c + filt_lzwd.c + filt_lzwe.c + filt_predict.c + filt_rld.c + filt_rle.c + + ; + +if $(HAVE_JASPER) = yes { Library libstream : filt_jpxd.c ; } +if $(HAVE_JBIG2DEC) = yes { Library libstream : filt_jbig2d.c ; } + diff --git a/world/Jamfile b/world/Jamfile new file mode 100644 index 00000000..b587c805 --- /dev/null +++ b/world/Jamfile @@ -0,0 +1,20 @@ +SubDir TOP world ; + +Library libworld : + + node_toxml.c + node_misc1.c + node_misc2.c + node_optimize.c + node_path.c + node_text.c + node_tree.c + + res_cmap.c + res_colorspace.c + res_font.c + res_image.c + res_shade.c + + ; + |