2015-05-11 04:09:14 +02:00
|
|
|
VPATH = src:ppd:bin
|
|
|
|
|
|
|
|
ppds = EpsonTMT20Simple.ppd.gz
|
|
|
|
|
|
|
|
DEFS=
|
|
|
|
LIBS=-lcupsimage -lcups
|
|
|
|
|
|
|
|
ifdef RPMBUILD
|
|
|
|
DEFS=-DRPMBUILD
|
|
|
|
LIBS=-ldl
|
|
|
|
endif
|
|
|
|
|
2024-09-17 15:56:49 +02:00
|
|
|
all: rastertoepsonsimple $(ppds)
|
|
|
|
.PHONY: all
|
2015-05-11 04:09:14 +02:00
|
|
|
|
2024-09-17 15:56:49 +02:00
|
|
|
bin:
|
|
|
|
mkdir -p bin
|
2015-05-11 04:09:14 +02:00
|
|
|
|
|
|
|
install/setup: rastertoepsonsimple $(ppds) setup
|
|
|
|
# packaging
|
|
|
|
@if [ -e install ]; then rm -f install/*; rmdir install; fi
|
|
|
|
mkdir install
|
|
|
|
cp bin/rastertoepsonsimple install
|
|
|
|
cp bin/*.ppd.gz install
|
|
|
|
cp bin/setup install
|
|
|
|
|
|
|
|
.PHONY: install
|
|
|
|
install:
|
|
|
|
@if [ ! -e install ]; then echo "Please run make package first."; exit 1; fi
|
|
|
|
# installing
|
|
|
|
cd install; exec ./setup
|
|
|
|
|
|
|
|
.PHONY: remove
|
|
|
|
remove:
|
|
|
|
#removing from default location (other locations require manual removal)
|
2024-09-17 15:56:49 +02:00
|
|
|
rm -f /usr/lib/cups/filter/rastertoepsonsimple
|
|
|
|
rm -rf /usr/share/cups/model/star
|
2015-05-11 04:09:14 +02:00
|
|
|
|
|
|
|
.PHONY: rpmbuild
|
|
|
|
rpmbuild:
|
|
|
|
@if [ ! -e install ]; then echo "Please run make package first."; exit 1; fi
|
|
|
|
# installing
|
|
|
|
RPMBUILD="true"; export RPMBUILD; cd install; exec ./setup
|
|
|
|
|
|
|
|
.PHONY: help
|
|
|
|
help:
|
|
|
|
# Help for starcupsdrv make file usage
|
|
|
|
#
|
|
|
|
# command purpose
|
|
|
|
# ------------------------------------
|
|
|
|
# make compile all sources and create the install directory
|
|
|
|
# make install execute the setup shell script from the install directory [require root user permissions]
|
|
|
|
# make remove removes installed files from your system (assumes default install lication) [requires root user permissions]
|
|
|
|
# make clean deletes all compiles files and their folders
|
|
|
|
|
2024-09-17 15:56:49 +02:00
|
|
|
%.o: %.c
|
|
|
|
gcc -Wall -fPIC -O2 $(DEFS) -c -o $@ $^
|
2015-05-11 04:09:14 +02:00
|
|
|
|
2024-09-17 15:56:49 +02:00
|
|
|
rastertoepsonsimple: rastertoepsonsimple.o bufferedscanlines.o
|
|
|
|
# compiling rastertoepsonsimple filter
|
|
|
|
ld $(NIX_LDFLAGS) $(DEFS) -o $@ $^ -lc $(LIBS)
|
|
|
|
#gcc $(DEFS) -o $@ $< $(LIBS)
|
2015-05-11 04:09:14 +02:00
|
|
|
|
|
|
|
$(ppds): %.ppd.gz: %.ppd
|
|
|
|
# gzip ppd file
|
|
|
|
gzip -c $< >> bin/$@
|
|
|
|
|
|
|
|
setup: setup.sh
|
|
|
|
$(dependencies)
|
|
|
|
$(init)
|
|
|
|
# create setup shell script
|
|
|
|
cp src/setup.sh bin/setup
|
|
|
|
chmod +x bin/setup
|
|
|
|
|
|
|
|
.PHONY: clean
|
|
|
|
clean:
|
2024-09-17 15:56:49 +02:00
|
|
|
rm -f *.o bin/* install/* rastertoepsonsimple
|