--- pnm/Makefile.orig Tue Jan 23 14:05:35 2001 +++ pnm/Makefile Sat Feb 24 00:00:00 2001 @@ -47,6 +47,8 @@ JPEGLD = -L$(JPEGLIB_DIR) -ljpeg endif +SOVER = 1 + # We tend to separate out the build targets so that we don't have # any more dependencies for a given target than it really needs. # That way, if there is a problem with a dependency, we can still @@ -54,22 +56,24 @@ # This package is so big, it's useful even when some parts won't # build. -PORTBINARIES = fitstopnm gemtopnm giftopnm pamchannel pamcut \ - pamfile pamtopnm \ - pnmalias pnmarith pnmcat pnmcomp pnmconvol pnmcrop \ - pnmcut pnmdepth pnmenlarge pnmfile pnmflip pnmhisteq \ - pnmhistmap pnminterp pnminvert pnmmontage pnmpad pnmpaste \ - pnmsmooth pnmsplit pnmtile pnmtoddif pnmtofits \ +PORTBINARIES = fitstopnm gemtopnm \ + pnmalias pnmarith pnmcat pnmcomp pnmconvol \ + pnmdepth pnmenlarge pnmflip pnmhisteq \ + pnmhistmap pnminvert pnmpad pnmpaste \ + pnmsmooth pnmtile pnmtoddif pnmtofits \ pnmtoplainpnm pnmtops pnmtorast \ - pnmtosgi pnmtosir pnmtoxwd pstopnm \ - rasttopnm sgitopnm sirtopnm xwdtopnm zeisstopnm -MATHBINARIES = pnmgamma pnmnlfilt pnmrotate pnmscale pnmscalefixed pnmshear + pnmtosgi pnmtosir pnmtoxwd \ + rasttopnm sgitopnm sirtopnm zeisstopnm +MATHBINARIES = pnmgamma pnmnlfilt pnmrotate pnmshear +SHHOPTBINARIES = giftopnm pamchannel pamcut pamfile pamtopnm pnmcrop \ + pnmcut pnmfile pnminterp pnmmontage pnmsplit pstopnm \ + xwdtopnm # We don't include programs that have special library dependencies in the # merge scheme, because we don't want those dependencies to prevent us # from building all the other programs. -NOMERGEBINARIES = +NOMERGEBINARIES = $(SHHOPTBINARIES) pnmscale pnmscalefixed ifneq ($(PNGHDR_DIR),NONE) ifneq ($(PNGLIB_DIR),NONE) NOMERGEBINARIES += pnmtopng pngtopnm @@ -106,6 +110,8 @@ MERGE_OBJECTS = $(patsubst %,%.o2, $(MERGEBINARIES)) LIBOBJECTS = libpnm1.o libpnm2.o libpnm3.o libpnm4.o libpam.o +SHLIBOBJECTS = $(patsubst %.o, %.lo, $(LIBOBJECTS)) +LIBSHHOPT = $(SRCDIR)/shhopt/libshhopt.a MANUALS1 = $(BINARIES) $(SCRIPTS) MANUALS3 = libpnm @@ -126,6 +132,14 @@ $(MAKE) -C jbig all $(MAKE) -C pnmtopalm all +$(SHHOPTBINARIES): %: %.o $(NETPBMLIBS) $(LIBOPT) $(LIBSHHOPT) + $(LD) $(LDFLAGS) -o $@ $@.o `$(LIBOPT) $(NETPBMLIBS)` \ + $(LIBSHHOPT) $(CDEBUG) + +pnmscale pnmscalefixed: %: %.o $(NETPBMLIBS) $(LIBOPT) $(LIBSHHOPT) + $(LD) $(LDFLAGS) -o $@ $@.o `$(LIBOPT) $(NETPBMLIBS)` \ + -lm $(LIBSHHOPT) $(CDEBUG) + ifeq ($(TIFFLIB_DIR),$(TIFFDIR)) # We're using the internal Tiff library, so make sure it's built TIFFLIB_DEP = $(TIFFDIR)/$(LIBTIFF) @@ -136,17 +150,18 @@ # The Tiff library references math functions. tifftopnm pnmtotiff pnmtotiffcmyk: %: %.o \ - $(NETPBMLIBS) $(TIFFLIB_DEP) $(LIBOPT) + $(NETPBMLIBS) $(TIFFLIB_DEP) $(LIBOPT) $(LIBSHHOPT) $(LD) $(LDFLAGS) -o $@ $@.o `$(LIBOPT) $(NETPBMLIBS)` \ - -L$(TIFFLIB_DIR) -ltiff $(JPEGLD) -lm $(TIFF_LDFLAGS) $(CDEBUG) + -L$(TIFFLIB_DIR) -ltiff $(JPEGLD) -lm $(TIFF_LDFLAGS) \ + $(LIBSHHOPT) $(CDEBUG) pngtopnm pnmtopng: %: %.o $(NETPBMLIBS) $(LIBOPT) $(LD) $(LDFLAGS) -o $@ $@.o `$(LIBOPT) $(NETPBMLIBS)` \ -L$(PNGLIB_DIR) -lpng -lz -lm $(CDEBUG) -jpegtopnm: %: %.o $(NETPBMLIBS) $(LIBOPT) +jpegtopnm: %: %.o $(NETPBMLIBS) $(LIBOPT) $(LIBSHHOPT) $(LD) $(LDFLAGS) -o $@ $@.o `$(LIBOPT) $(NETPBMLIBS)` $(JPEGLD) \ - $(CDEBUG) + $(LIBSHHOPT) $(CDEBUG) ifeq ($(URTLIB_DIR),$(URTDIR)) # We're using the internal URT library, so make sure it's built @@ -203,6 +218,9 @@ $(MAKE) -C fiasco install.man $(MAKE) -C jbig install.man $(MAKE) -C pnmtopalm install.man + +$(BUILDDIR)/shhopt/libshhopt.a: + cd ../shhopt; $(MAKE) libshhopt.a .PHONY: clean clean: clean.common