📄 makefile
字号:
$(CC) $(CFLAGS) -g opldecode.o $(LIBJBG) -o $@oakdecode: oakdecode.o $(LIBJBG) $(CC) $(CFLAGS) -g oakdecode.o $(LIBJBG) -o $@## Installation rules#install: all install-test install-prog install-icc2ps install-extra \ install-crd install-foo install-ppd install-man install-doc # # If you use CUPS, then restart the spooler: # make cups # # Now use your printer configuration GUI to create a new printer. # # On Redhat 7.2/7.3/8.0/9.0 and Fedora Core 1-5, run "printconf-gui". # On Fedora Core 6 and Fedora 7/8, run "system-config-printer". # On Mandrake, run "printerdrake" # On Suse 9.x/10.x, run "yast" # On Ubuntu 5.10/6.06/6.10/7.04, run "gnome-cups-manager" # On Ubuntu 7.10, run "system-config-printer".install-test: # # Installation Dependencies... # @if [ -f /usr/local/libexec/cups/filter/foomatic-rip ]; then \ : ; \ elif ! type foomatic-rip >/dev/null 2>&1; then \ echo " ***"; \ echo " *** Error: foomatic-rip is not installed!"; \ echo " ***"; \ echo " *** Install foomatic package(s) for your OS"; \ echo " ***"; \ exit 1; \ fi # ... OK! # install-prog: # # Install driver, wrapper, and development tools # install -c $(PROGS) $(SHELLS) $(BIN)/ if [ "$(BINPROGS)" != "" ]; then \ install -c $(BINPROGS) /bin/; \ fi # # Install gamma correction files. These are just templates, # and don't actually do anything right now. If anybody wants # to tune them or point me at a process for doing that, please... # install -d $(SHAREZJS)/ install -c -m 644 gamma.ps $(SHAREZJS)/ install -c -m 644 gamma-lookup.ps $(SHAREZJS)/ install -d $(SHAREOAK)/ install -d $(SHAREHP)/ install -d $(SHAREXQX)/ install -d $(SHARELAVA)/install-foo: # # Remove obsolete foomatic database files from previous versions # rm -f $(FOODB)/opt/foo2zjs-Media.xml rm -f $(FOODB)/opt/foo2zjs-PaperSize.xml rm -f $(FOODB)/opt/foo2zjs-Source.xml rm -f $(FOODB)/opt/foo2zjs-DitherPPI.xml # # Install current database files # @if [ -d $(FOODB) ]; then \ for dir in driver printer opt; do \ echo install -m 644 foomatic-db/$$dir/*.xml $(FOODB)/$$dir/; \ install -c -m 644 foomatic-db/$$dir/*.xml $(FOODB)/$$dir/; \ done \ else \ echo "***"; \ echo "*** WARNING! You don't have directory $(FOODB)/"; \ echo "*** If you want support for foomatic printer configuration,";\ echo "*** then you will have to manually install these files..."; \ echo "***"; \ ls foomatic-db/*/*.xml | sed 's/^/ /'; \ echo "***"; \ echo "*** ... wherever foomatic is stashed on your machine."; \ echo "***"; \ fi # # Clear foomatic cache and rebuild database if needed # rm -rf /var/cache/foomatic/*/* rm -f /var/cache/foomatic/printconf.pickle if [ -d /var/cache/foomatic/compiled ]; then \ cd /var/cache/foomatic/compiled; \ foomatic-combo-xml -O >overview.xml; \ fiinstall-icc2ps: # # Install ICM to Postscript file conversion utility # cd icc2ps; $(MAKE) PREFIX=$(PREFIX) installinstall-crd: # # Install prebuilt CRD files (from m2300w project) # install -d $(SHAREZJS)/ install $(LPuid) $(LPgid) -m 775 -d $(SHAREZJS)/crd/ for i in crd/zjs/*.*; do \ install -c -m 644 $$i $(SHAREZJS)/crd/; \ done # # Install prebuilt CRD files for CLP-300/CLP-600 # install -d $(SHAREQPDL)/ install $(LPuid) $(LPgid) -m 775 -d $(SHAREQPDL)/crd/ for i in crd/qpdl/*cms* crd/qpdl/*.ps; do \ install -c -m 644 $$i $(SHAREQPDL)/crd/; \ doneinstall-psfiles: # # Install prebuilt psfiles files (from m2300w project) # install -d $(SHAREHP)/ install $(LPuid) $(LPgid) -m 775 -d $(SHAREHP)/psfiles/ for i in psfiles/*.*; do \ install -c -m 644 $$i $(SHAREHP)/psfiles/; \ doneinstall-extra: # # Install extra files (ICM and firmware), if any exist here. # # Get files from the printer manufacturer, i.e. www.minolta-qms.com, # or use the "./getweb" convenience script. # install -d $(SHAREZJS)/ # foo2zjs ICM files (if any) install $(LPuid) $(LPgid) -m 775 -d $(SHAREZJS)/icm/ for i in DL*.icm CP*.icm km2430*.icm; do \ if [ -f $$i ]; then \ install -c -m 644 $$i $(SHAREZJS)/icm/; \ fi; \ done # foo2zjs Firmware files (if any) install $(LPuid) $(LPgid) -m 775 -d $(SHAREZJS)/firmware/ for i in sihp*.img; do \ if [ -f $$i ]; then \ base=`basename $$i .img`; \ ./arm2hpdl $$i >$$base.dl; \ install -c -m 644 $$base.dl $(SHAREZJS)/firmware/; \ fi; \ done # foo2oak ICM files (if any) install $(LPuid) $(LPgid) -m 775 -d $(SHAREOAK)/icm/ for i in hpclj26*.icm; do \ if [ -f $$i ]; then \ install -c -m 644 $$i $(SHAREOAK)/icm/; \ fi; \ done # foo2hp ICM files (if any) install $(LPuid) $(LPgid) -m 775 -d $(SHAREHP)/icm/ for i in hpclj26*.icm km2430*.icm; do \ if [ -f $$i ]; then \ install -c -m 644 $$i $(SHAREHP)/icm/; \ fi; \ done # foo2lava ICM files (if any) install $(LPuid) $(LPgid) -m 775 -d $(SHARELAVA)/icm/ for i in km2530*.icm; do \ if [ -f $$i ]; then \ install -c -m 644 $$i $(SHARELAVA)/icm/; \ fi; \ done # foo2qpdl ICM files (if any) install $(LPuid) $(LPgid) -m 775 -d $(SHAREQPDL)/icm/ for i in samclp300*.icm; do \ if [ -f $$i ]; then \ install -c -m 644 $$i $(SHAREQPDL)/icm/; \ fi; \ doneMODEL=/usr/share/cups/modelLOCALMODEL=/usr/local/share/cups/modelPPD=/usr/share/ppdinstall-ppd: # # Install PPD files for CUPS # if [ -d $(PPD) ]; then \ find $(PPD) -name '*foo2zjs*' | xargs rm -f; \ find $(PPD) -name '*foo2hp*' | xargs rm -f; \ find $(PPD) -name '*foo2xqx*' | xargs rm -f; \ find $(PPD) -name '*foo2lava*' | xargs rm -f; \ find $(PPD) -name '*foo2qpdl*' | xargs rm -f; \ [ -d $(PPD)/foo2zjs ] || mkdir $(PPD)/foo2zjs; \ cd PPD; \ for ppd in *.ppd; do \ gzip < $$ppd > $(PPD)/foo2zjs/$$ppd.gz; \ done; \ fi if [ -d $(MODEL) ]; then \ cd PPD; \ for ppd in *.ppd; do \ gzip < $$ppd > $(MODEL)/$$ppd.gz; \ done; \ elif [ -d $(LOCALMODEL) ]; then \ cd PPD; \ for ppd in *.ppd; do \ gzip < $$ppd > $(LOCALMODEL)/$$ppd.gz; \ done; \ fiUSBDIR=/etc/hotplug/usbUDEVDIR=/etc/udev/rules.dRULES=hplj10xx.rulesinstall-hotplug: install-hotplug-test install-hotplug-proginstall-hotplug-test: # # Hotplug Installation Dependencies... # @if ! type ex >/dev/null 2>&1; then \ echo " ***"; \ echo " *** Error: "ex" is not installed!"; \ echo " ***"; \ echo " *** Install "vim" package(s) for your OS"; \ echo " ***"; \ exit 1; \ fi # ... OK! #install-hotplug-prog: if [ -d $(UDEVDIR) ]; then \ install -c -m 644 $(RULES) $(UDEVDIR)/11-$(RULES); \ fi [ -d $(USBDIR) ] || install -d -m 755 $(USBDIR)/ install -c -m 755 hplj1000 $(USBDIR)/ ln -sf $(USBDIR)/hplj1000 $(USBDIR)/hplj1005 ln -sf $(USBDIR)/hplj1000 $(USBDIR)/hplj1018 ln -sf $(USBDIR)/hplj1000 $(USBDIR)/hplj1020 $(USBDIR)/hplj1000 install-usermap $(USBDIR)/hplj1005 install-usermap $(USBDIR)/hplj1018 install-usermap $(USBDIR)/hplj1020 install-usermapcups: FRC if [ -x /etc/init.d/cups ]; then \ /etc/init.d/cups restart; \ elif [ -x /etc/rc.d/rc.cups ]; then \ /etc/rc.d/rc.cups restart; \ elif [ -x /etc/init.d/cupsys ]; then \ /etc/init.d/cupsys restart; \ elif [ -x /etc/init.d/cupsd ]; then \ /etc/init.d/cupsd restart; \ elif [ -x /usr/local/etc/rc.d/cups.sh ]; then \ /usr/local/etc/rc.d/cups.sh restart; \ elif [ -x /usr/local/etc/rc.d/cups.sh.sample ]; then \ cp /usr/local/etc/rc.d/cups.sh.sample /usr/local/etc/rc.d/cups.sh; \ /usr/local/etc/rc.d/cups.sh restart; \ fi## Uninstall#uninstall: -rm -f /etc/hotplug/usb/hplj1000 -rm -f /etc/hotplug/usb/hplj1005 -rm -f /etc/hotplug/usb/hplj1018 -rm -f /etc/hotplug/usb/hplj1020 -rm -f /etc/hotplug/usb/foo2zjs.usermap -(echo "g/^hplj10[02][05]/d"; echo "w") | ex /etc/hotplug/usb.usermap -rm -f /etc/udev/rules.d/11-hplj10xx.rules -rm -f /usr/bin/usb_printerid /bin/usb_printerid /sbin/usb_printerid -rm -f /etc/hotplug/usb/hplj.usermap # -rm -f /etc/udev/rules.d/58-foo2zjs.rules # -rm -f /sbin/foo2zjs-loadfw # -rm -rf /usr/share/doc/foo2zjs/ -rm -rf /usr/share/foo2zjs/ -rm -rf /usr/share/foo2hp/ -rm -rf /usr/share/foo2oak/ -rm -rf /usr/share/foo2xqx/ -rm -rf /usr/share/foo2lava/ -rm -rf /usr/share/foo2qpdl/ -rm -f /usr/bin/arm2hpdl -rm -f /usr/bin/foo2zjs-wrapper /usr/bin/foo2zjs /usr/bin/zjsdecode -rm -f /usr/bin/foo2oak-wrapper /usr/bin/foo2oak /usr/bin/oakdecode -rm -f /usr/bin/foo2hp2600-wrapper /usr/bin/foo2hp -rm -f /usr/bin/foo2xqx-wrapper /usr/bin/foo2xqx /usr/bin/xqxdecode -rm -f /usr/bin/foo2lava-wrapper /usr/bin/foo2lava /usr/bin/lavadecode -rm -f /usr/bin/foo2qpdl-wrapper /usr/bin/foo2qpdl /usr/bin/qpdldecode -rm -f /usr/bin/opldecode -rm -f /usr/bin/foo2zjs-icc2ps -cd foomatic-db; for i in `find driver opt printer -name "*.xml"`; do \ rm -f $(FOODB)/$$i; \ done cd PPD; for ppd in *.ppd; do \ rm -f $(MODEL)/$$ppd.gz; \ done; -rm -f /var/cache/foomatic/printconf.pickle## Clean#clean: -rm -f $(PROGS) $(BINPROGS) $(SHELLS) -rm -f *.zc *.zm -rm -f xxx.* xxxomatic -rm -f foo2zjs.o jbig.o jbig_tab.o zjsdecode.o foo2hp.o -rm -f foo2xqx.o xqxdecode.o -rm -f foo2lava.o lavadecode.o -rm -f foo2qpdl.o qpdldecode.o -rm -f opldecode.o -rm -f foo2oak.html foo2zjs.html foo2hp.html foo2xqx.html foo2lava.html -rm -f foo2qpdl.html -rm -f index.html -rm -f arch*.gif -rm -f sihp*.dl -rm -f *.tar.gz -rm -f getweb -rm -f patch.db -rm -f $(MANPAGES) manual.pdf -rm -f *.zjs *.zm *.zc *.zc? *.zc?? *.oak *.pbm *.pksm *.cmyk -rm -f pksm2bitcmyk -rm -f *.icm.*.ps -rm -f okidecode.o cd icc2ps; $(MAKE) $@## Header dependencies#zjsdecode.o: zjs.h jbig.hfoo2zjs.o: zjs.h jbig.hjbig.o: jbig.hfoo2hp.o: zjs.h jbig.h cups.hxqxdecode.o: xqx.h jbig.hfoo2xqx.o: xqx.h jbig.hlavadecode.o: jbig.hfoo2lava.o: jbig.hqpdldecode.o: jbig.hfoo2qpdl.o: jbig.h qpdl.hopldecode.o: jbig.h## foo2* Regression tests#test: testzjs testhp # # All regression tests passed. # # Send the appropriate test page .zm/.zc ZjStream file(s) to # your printer using a *RAW* printer queue.## foo2zjs Regression tests#testzjs: testpage.zm \ testpage.zc10 testpage.zc1 testpage.zc2 testpage.zc3 \ lj1000.zm lj1020.zmtestpage.zm: testpage.ps foo2zjs-wrapper foo2zjs Makefile FRC # # Tests will pass only if you are using ghostscript-7.05-24.7 # or ghostscript-8.57 (gs.foo) # # Monochrome test page for Minolta 2200/2300 DL PATH=.:$$PATH time -p foo2zjs-wrapper -b gs testpage.ps > $@ @want1="c4cf1940d6fb854cc3efdd6283388ea4 $@"; \ want2="0900df1fe16dd6bb96958bcb5e8e2550 $@"; \ got=`md5sum $@`; [ "$$want1" = "$$got" -o "$$want2" = "$$got" ] || \ { echo "*** Test failure, got $$got"; exit 1; }testpage.zc10: testpage.ps foo2zjs-wrapper foo2zjs Makefile FRC # # Color test page for Minolta 2200/2300 DL PATH=.:$$PATH time -p foo2zjs-wrapper -b gs -c -C10 testpage.ps > $@ @want1="3d3b6fc08d9a1c9f80a99fec867596df $@"; \ want2="12991b79ed11b18a639d6fd72e92477b $@"; \ got=`md5sum $@`; [ "$$want1" = "$$got" -o "$$want2" = "$$got" ] || \ { echo "*** Test failure, got $$got"; exit 1; }testpage.zc1: testpage.ps foo2zjs-wrapper foo2zjs Makefile FRC PATH=.:$$PATH time -p foo2zjs-wrapper -c -C1 testpage.ps > $@ @want="3d3b6fc08d9a1c9f80a99fec867596df $@"; got=`md5sum $@`; \ #[ "$$want" = "$$got" ] || \ # { echo "*** Test failure, got $$got"; exit 1; }testpage.zc2: testpage.ps foo2zjs-wrapper foo2zjs Makefile FRC
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -