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
|
Subject: Give a proper Makefile for the upstream package
Author: Michael van der Kolff <mvanderkolff@gmail.com>
Forwarded: no
Upstream Makefile is barebones, and doesn't make any shared libraries.
With some extra effort, this does.
Refreshed for 2.1
--- a/Makefile
+++ b/Makefile
@@ -4,12 +4,13 @@
CC = gcc
# Options for the compiler: A high optimization level is suggested
-CFLAGS = -O2 -W -Wno-unused-result
+CFLAGS += -O2 -Wall
# 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
@echo "Enter 'make test' in order to start some automatic tests."
@@ -42,3 +43,16 @@ distribution:
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/.libs/*.so.*.*.* libjbig/.libs/*.a $(DESTDIR)/usr/lib/$(DEB_HOST_MULTIARCH)
+ install -m 644 libjbig/.libs/*.la $(DESTDIR)/usr/lib/$(DEB_HOST_MULTIARCH)
+ /sbin/ldconfig -n $(DESTDIR)/usr/lib/$(DEB_HOST_MULTIARCH)
+ ln -s libjbig.so.0.0.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
|