File: Makefile

package info (click to toggle)
jbigkit 2.1-6.1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 1,204 kB
  • sloc: ansic: 5,662; makefile: 340; perl: 82; sh: 3
file content (62 lines) | stat: -rw-r--r-- 1,897 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# Unix makefile for JBIG-KIT

# Select an ANSI/ISO C compiler here, GNU gcc is recommended
CC ?= gcc

# Options for the compiler: A high optimization level is suggested
CFLAGS ?= -O2 -W -Wno-unused-result
# CFLAGS = -O -g -W -Wall -Wno-unused-result -ansi -pedantic # -DDEBUG

export CC CFLAGS

VERSION=2.1
.PHONY: all lib pbm test clean install

all: lib pbm testdata
	@echo "Enter 'make test' in order to start some automatic tests."

lib:
	cd libjbig && $(MAKE) -e

pbm: lib
	cd pbmtools && $(MAKE) -e

test: lib pbm
	cd libjbig  && $(MAKE) test
	cd pbmtools && $(MAKE) test

testdata:
	cd pbmtools && $(MAKE) test-t82.pbm

analyze:
	cd libjbig  && $(MAKE) analyze
	cd pbmtools && $(MAKE) analyze

clean:
	rm -f *~ core
	cd libjbig  && $(MAKE) clean
	cd pbmtools && $(MAKE) clean

distribution:
	rm -rf jbigkit-$(VERSION)
	git archive v$(VERSION) --prefix jbigkit-$(VERSION)/ | tar xvf -
	make -C jbigkit-$(VERSION)/pbmtools txt
	tar cvaf jbigkit-$(VERSION).tar.gz jbigkit-$(VERSION)

release:
	rsync -t jbigkit-$(VERSION).tar.gz $(HOME)/public_html/download/
	rsync -t jbigkit-$(VERSION)/CHANGES $(HOME)/public_html/jbigkit/

install: all
	install -d $(DESTDIR)/usr/lib/$(DEB_HOST_MULTIARCH)
	install -m 644 libjbig/*.so.* libjbig/*.a $(DESTDIR)/usr/lib/$(DEB_HOST_MULTIARCH)
	/sbin/ldconfig -n $(DESTDIR)/usr/lib/$(DEB_HOST_MULTIARCH)
	ln -s libjbig.so.0 $(DESTDIR)/usr/lib/$(DEB_HOST_MULTIARCH)/libjbig.so
	install -d $(DESTDIR)/usr/include
	install -m 644 libjbig/*.h $(DESTDIR)/usr/include
	install -d $(DESTDIR)/usr/bin
	install -m 755 pbmtools/jbgtopbm pbmtools/jbgtopbm85 pbmtools/pbmtojbg pbmtools/pbmtojbg85 $(DESTDIR)/usr/bin
	install -d $(DESTDIR)/usr/share/man/man1
	install -m 644 pbmtools/*.1 $(DESTDIR)/usr/share/man/man1
	install -d $(DESTDIR)/usr/share/jbigkit-testdata
	install -m 644 examples/*.pgm examples/*.jbg pbmtools/test-t82.pbm $(DESTDIR)/usr/share/jbigkit-testdata