about summary refs log tree commit diff
path: root/converter
diff options
context:
space:
mode:
authorgiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2014-06-22 00:39:50 +0000
committergiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2014-06-22 00:39:50 +0000
commit482bb9cede2d7b8b83c81c3bc7fbecf90cf10dba (patch)
tree4a2b01a5350440ddd076a21acb1a7f89b8967527 /converter
parent312baa3cbc54a4ff25f41bacfbb84041f1155a2b (diff)
downloadnetpbm-mirror-482bb9cede2d7b8b83c81c3bc7fbecf90cf10dba.tar.gz
netpbm-mirror-482bb9cede2d7b8b83c81c3bc7fbecf90cf10dba.tar.xz
netpbm-mirror-482bb9cede2d7b8b83c81c3bc7fbecf90cf10dba.zip
Move libjbig into its own directory
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@2205 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'converter')
-rw-r--r--converter/other/jbig/Makefile24
-rw-r--r--converter/other/jbig/README17
-rw-r--r--converter/other/jbig/README.Netpbm12
-rw-r--r--converter/other/jbig/libjbig/ANNOUNCE (renamed from converter/other/jbig/ANNOUNCE)0
-rw-r--r--converter/other/jbig/libjbig/Makefile24
-rw-r--r--converter/other/jbig/libjbig/include/jbig.h (renamed from converter/other/jbig/jbig.h)0
-rw-r--r--converter/other/jbig/libjbig/jbig.c (renamed from converter/other/jbig/jbig.c)0
-rw-r--r--converter/other/jbig/libjbig/jbig.doc (renamed from converter/other/jbig/jbig.doc)0
-rw-r--r--converter/other/jbig/libjbig/jbig_tab.c (renamed from converter/other/jbig/jbig_tab.c)0
9 files changed, 58 insertions, 19 deletions
diff --git a/converter/other/jbig/Makefile b/converter/other/jbig/Makefile
index ae16a728..d4be660e 100644
--- a/converter/other/jbig/Makefile
+++ b/converter/other/jbig/Makefile
@@ -5,9 +5,14 @@ endif
 SUBDIR = converter/other/jbig
 VPATH=.:$(SRCDIR)/$(SUBDIR)
 
+SUBDIRS = libjbig
+
 include $(BUILDDIR)/config.mk
 
-LIBJBIG_OBJECTS = jbig.o jbig_tab.o
+# INTERNAL_JBIGLIB must be relative to the current directory, because it
+# may end up in MERGE_OBJECTS, which must be relative.
+INTERNAL_JBIGLIB = libjbig/libjbig.a
+INTERNAL_JBIGHDR_DIR = $(SRCDIR)/$(SUBDIR)/libjbig/include
 
 EXTERN_INCLUDES =
 ifneq ($(JBIGHDR_DIR),NONE)
@@ -26,23 +31,28 @@ BINARIES = $(PORTBINARIES)
 
 SCRIPTS =
 
-ifeq ($(JBIGLIB),$(BUILDDIR)/$(SUBDIR)/libjbig.a)
+ifeq ($(JBIGLIB),$(INTERNAL_JBIGLIB))
   JBIGLIB_DEP = $(JBIGLIB)
 else
   # It's not our internal version; user's on his own to make sure it's built
 endif
 
-OBJECTS = $(BINARIES:%=%.o) $(LIBJBIG_OBJECTS)
-MERGE_OBJECTS = $(BINARIES:%=%.o2) $(LIBJBIG_OBJECTS)
+OBJECTS = $(BINARIES:%=%.o)
+MERGE_OBJECTS = $(BINARIES:%=%.o2)
 
 all: $(BINARIES)
 
 include $(SRCDIR)/common.mk
 
+test:
+	echo $(JBIGLIB)
+
 $(BINARIES): %: %.o $(JBIGLIB_DEP) $(LIBOPT)
 $(BINARIES): LDFLAGS_TARGET = $(shell $(LIBOPT) $(JBIGLIB))
 
-$(BUILDDIR)/$(SUBDIR)/libjbig.a: $(LIBJBIG_OBJECTS)
-	$(AR) -rc $@ $^
-	$(RANLIB) $@
+$(INTERNAL_JBIGLIB): $(BUILDDIR)/$(SUBDIR)/libjbig FORCE
+	$(MAKE) -f $(SRCDIR)/$(SUBDIR)/libjbig/Makefile \
+	  -C $(dir $@) $(notdir $@)
 
+.PHONY: FORCE
+FORCE:
diff --git a/converter/other/jbig/README b/converter/other/jbig/README
new file mode 100644
index 00000000..c1764286
--- /dev/null
+++ b/converter/other/jbig/README
@@ -0,0 +1,17 @@
+The jbig tools are derived from the JBIG-KIT package by Marcus Kuhn,
+by Bryan Henderson on 2000.05.11.
+
+The file ANNOUNCE in the 'libjbig' subdirectory is from that package and gives
+details.
+
+The Netpbm tools jbigtopbm and pbmtojbig were adapted from JBIG-KIT's
+jbgtopbm and pbmtojbg.  The main difference is that the Netpbm
+versions use the Netpbm libraries.
+
+The code in subdirectory 'libjbig' is straight from the JBIG_KIT package and
+generates essentially the same libjbig.a that one gets from that package.
+
+The reason Netpbm contains a copy of the library is convenience of users.  For
+many people, the only reason to have a jbig library is to be able to convert
+images to and from the format, which they do with Netpbm.  Requiring a Netpbm
+user to find and install this esoteric library is impractical.
\ No newline at end of file
diff --git a/converter/other/jbig/README.Netpbm b/converter/other/jbig/README.Netpbm
deleted file mode 100644
index 3d593b92..00000000
--- a/converter/other/jbig/README.Netpbm
+++ /dev/null
@@ -1,12 +0,0 @@
-The jbig tools are derived from the JBIG-KIT package by Marcus Kuhn,
-by Bryan Henderson on 2000.05.11.
-
-The file ANNOUNCE in this directory is from that package and gives
-details.
-
-The Netpbm tools jbigtopbm and pbmtojbig were adapted from JBIG-KIT's
-jbgtopbm and pbmtojbg.  The main difference is that the Netpbm
-versions use the Netpbm libraries.
-
-The jbig.c and jbig_table.c modules are straight from the JBIG_KIT 
-package.  They are what normally are packaged as libjbig.a.
diff --git a/converter/other/jbig/ANNOUNCE b/converter/other/jbig/libjbig/ANNOUNCE
index edbcc3f8..edbcc3f8 100644
--- a/converter/other/jbig/ANNOUNCE
+++ b/converter/other/jbig/libjbig/ANNOUNCE
diff --git a/converter/other/jbig/libjbig/Makefile b/converter/other/jbig/libjbig/Makefile
new file mode 100644
index 00000000..0e0a04fe
--- /dev/null
+++ b/converter/other/jbig/libjbig/Makefile
@@ -0,0 +1,24 @@
+ifeq ($(SRCDIR)x,x)
+  SRCDIR = $(CURDIR)/../../../..
+  BUILDDIR = $(SRCDIR)
+endif
+SUBDIR = converter/other/jbig/libjbig
+VPATH=.:$(SRCDIR)/$(SUBDIR)
+
+include $(BUILDDIR)/config.mk
+
+LIBJBIG_OBJECTS = jbig.o jbig_tab.o
+
+OBJECTS = $(LIBJBIG_OBJECTS)
+MERGE_OBJECTS = $(LIBJBIG_OBJECTS)
+
+COMP_INCLUDES = -I$(SRCDIR)/$(SUBDIR)/include
+
+all: libjbig.a
+
+include $(SRCDIR)/common.mk
+
+libjbig.a: $(LIBJBIG_OBJECTS)
+	$(AR) -rc $@ $^
+	$(RANLIB) $@
+
diff --git a/converter/other/jbig/jbig.h b/converter/other/jbig/libjbig/include/jbig.h
index dd9a76f3..dd9a76f3 100644
--- a/converter/other/jbig/jbig.h
+++ b/converter/other/jbig/libjbig/include/jbig.h
diff --git a/converter/other/jbig/jbig.c b/converter/other/jbig/libjbig/jbig.c
index 90295d8b..90295d8b 100644
--- a/converter/other/jbig/jbig.c
+++ b/converter/other/jbig/libjbig/jbig.c
diff --git a/converter/other/jbig/jbig.doc b/converter/other/jbig/libjbig/jbig.doc
index 10eeda80..10eeda80 100644
--- a/converter/other/jbig/jbig.doc
+++ b/converter/other/jbig/libjbig/jbig.doc
diff --git a/converter/other/jbig/jbig_tab.c b/converter/other/jbig/libjbig/jbig_tab.c
index 55183503..55183503 100644
--- a/converter/other/jbig/jbig_tab.c
+++ b/converter/other/jbig/libjbig/jbig_tab.c