Return to Snippet

Revision: 25151
at March 25, 2010 05:25 by mitry


Updated Code
.PHONY: djvu
.SUFFIXES: .djvu .ppm .pbm .jpg .tiff .tif

DJVU_TARGET:=$(notdir $(CURDIR)).djvu
DJVU_CHUNKS:=$(sort $(patsubst %.jpg,%.djvu,$(wildcard *.jpg)) $(patsubst %.pbm,%.djvu,$(wildcard *.pbm)) $(patsubst %.ppm,%.djvu,$(wildcard *.ppm)))

DJVUFLAGS?=-dpi 300 -colors 4 -bgwhite
PBM2DJVU:=cjb2 -dpi 300 -clean -loose
#PBM2DJVU:=minidjvu -l -d 300

djvu: $(DJVU_TARGET)

$(DJVU_TARGET): $(DJVU_CHUNKS)
	djvm -c $@ $^

%.djvu: %.jpg
	c44 -dpi 96 $^ $@

%.djvu: %.pbm
	$(PBM2DJVU) $^ $@

%.djvu: %.ppm
	cpaldjvu $(DJVUFLAGS) $^ $@
	
%.djvu: %.tiff
	cpaldjvu $(DJVUFLAGS) $^ $@

%.djvu: %.tif
	cpaldjvu $(DJVUFLAGS) $^ $@

Revision: 25150
at March 21, 2010 17:11 by mitry


Initial Code
.PHONY: all clean
.SUFFIXES: .djvu .ppm .pbm .jpg .tiff .tif

CHUNKS:=$(sort $(patsubst %.jpg,%.djvu,$(wildcard *.jpg)) $(patsubst %.pbm,%.djvu,$(wildcard *.pbm)) $(patsubst %.ppm,%.djvu,$(wildcard *.ppm)))
TARGET:=$(notdir $(CURDIR)).djvu

PBM2DJVU:=cjb2 -dpi 300 -clean -loose
#PBM2DJVU:=minidjvu -l -d 300

all: $(TARGET)
	@echo Creating $^ ...

$(TARGET): $(CHUNKS)
	djvm -c $@ $^

%.djvu: %.jpg
	c44 -dpi 96 $^ $@

%.djvu: %.pbm
	$(PBM2DJVU) $^ $@

%.djvu: %.ppm
	cpaldjvu $(DJVUFLAGS) $^ $@
	
%.djvu: %.tiff
	cpaldjvu $(DJVUFLAGS) $^ $@

%.djvu: %.tif
	cpaldjvu $(DJVUFLAGS) $^ $@

Initial URL

                                

Initial Description

                                

Initial Title
Makefile for DjVu

Initial Tags

                                

Initial Language
Makefile