aboutsummaryrefslogtreecommitdiffstats
path: root/graphics/netpbm/files/patch-bf
blob: b4c15738fcf2c44a5a924e995c21b9d64b534bac (plain) (blame)
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
--- pnm/Makefile.orig   Thu Mar 15 12:11:59 2001
+++ pnm/Makefile    Tue Mar 27 00:00:00 2001
@@ -48,6 +48,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
@@ -55,23 +57,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 pnmpsnr pnmrotate \
-   pnmscale pnmscalefixed pnmshear
+       pnmtosgi pnmtosir pnmtoxwd \
+       rasttopnm sgitopnm sirtopnm zeisstopnm
+MATHBINARIES = pnmgamma pnmnlfilt pnmpsnr 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
@@ -108,6 +111,8 @@
 MERGE_OBJECTS = $(patsubst %,%.o2, $(MERGEBINARIES))
 
 LIBOBJECTS = libpnm1.o libpnm2.o libpnm3.o libpnm4.o libpam.o
+SHLIBOBJECTS = $(patsubst %.o, %.lo, $(LIBOBJECTS))
+LIBSHHOPT = $(BUILDDIR)/shhopt/libshhopt.a
 
 MANUALS1 = $(BINARIES) $(SCRIPTS)
 MANUALS3 = libpnm
@@ -128,6 +133,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)
@@ -138,17 +151,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$(ZLIB_DIR), -lz -L$(PNGLIB_DIR) -lpng -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
@@ -205,6 +219,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