diff options
author | Tor Andersson <tor@ghostscript.com> | 2005-06-04 18:25:49 +0200 |
---|---|---|
committer | Tor Andersson <tor@ghostscript.com> | 2005-06-04 18:25:49 +0200 |
commit | 7c7a2ed5417f36780da11299ed463d8861cad762 (patch) | |
tree | bcc1c3eddbacb573c7bf791589cba8d6bec68958 /Jamrules | |
parent | 705e66e0957e570cf8bfefd63eec2ac7e268e651 (diff) | |
download | mupdf-7c7a2ed5417f36780da11299ed463d8861cad762.tar.xz |
new world order iii -- jamming
Diffstat (limited to 'Jamrules')
-rw-r--r-- | Jamrules | 82 |
1 files changed, 82 insertions, 0 deletions
@@ -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) ; + } +} + |