summaryrefslogtreecommitdiffstats
path: root/graphics/netpbm/files/patch-bg
blob: 1dedc4260059f9d1c4d7b1ca5651d2b165e63156 (plain)
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
--- ppm/Makefile.orig	Sun Dec  3 07:41:51 2000
+++ ppm/Makefile	Fri Dec  8 00:00:00 2000
@@ -22,26 +22,31 @@
 NETPBMLIBS = $(LIBPPM) $(PBMDIR)/$(LIBPBM) $(PGMDIR)/$(LIBPGM)
 LIBLIBS = $(PBMDIR)/$(LIBPBM) $(PGMDIR)/$(LIBPGM)
 
+SOVER = 1
+
 PORTBINARIES =	bmptoppm eyuvtoppm gouldtoppm ilbmtoppm imgtoppm \
 		leaftoppm mtvtoppm pcxtoppm pgmtoppm pi1toppm picttoppm \
 		pjtoppm \
-		ppm3d ppmbrighten ppmchange ppmcolormask \
+		ppm3d ppmbrighten \
 		ppmdim ppmdist ppmdither \
-		ppmflash ppmhist ppmmake ppmmix ppmnorm \
+		ppmflash ppmmake ppmmix ppmnorm \
 		ppmquant ppmrelief ppmshift ppmspread ppmtoacad \
-		ppmtobmp ppmtoeyuv ppmtogif ppmtoleaf \
+		ppmtoeyuv ppmtogif ppmtoleaf \
 		ppmtoicr ppmtoilbm ppmtolj ppmtomitsu \
 		ppmtopcx ppmtopgm ppmtopi1 ppmtopict ppmtopj \
 		ppmtopjxl ppmtopuzz ppmtorgb3 ppmtosixel \
 		ppmtotga ppmtouil ppmtowinicon ppmtoxpm ppmtoyuv \
 		ppmtoyuvsplit ppmtv \
 		qrttoppm rawtoppm rgb3toppm sldtoppm spctoppm \
-		sputoppm tgatoppm winicontoppm ximtoppm xpmtoppm xvminitoppm \
+		sputoppm winicontoppm xpmtoppm xvminitoppm \
 		yuvtoppm yuvsplittoppm
+SHHOPTBINARIES =	ppmchange ppmcolormask ppmhist ppmtobmp tgatoppm \
+			ximtoppm 
 
 # We don't build vidtoppm by default, because it requires special libraries
 # and there is no known requirement for vidtoppm.
 
+NOMERGEBINARIES = $(SHHOPTBINARIES) ppmntsc
 ifneq ($(JPEGLIB_DIR), NONE)
   ifneq ($(JPEGHDR_DIR), NONE)
       NOMERGEBINARIES += ppmtojpeg
@@ -50,7 +55,7 @@
 
 MERGEBINARIES = $(PORTBINARIES) $(MATHBINARIES)
 
-MATHBINARIES = ppmcie ppmforge ppmlabel ppmntsc ppmpat ppmqvga ppmtomap
+MATHBINARIES = ppmcie ppmforge ppmlabel ppmpat ppmqvga ppmtomap
 BINARIES = $(MERGEBINARIES) $(NOMERGEBINARIES) 
 SCRIPTS = ppmquantall ppmshadow ppmfade
 
@@ -59,6 +64,8 @@
 MERGE_OBJECTS = $(patsubst %,%.o2, $(MERGEBINARIES))
 
 LIBOBJECTS = libppm1.o libppm2.o libppm3.o libppm4.o libppm5.o bitio.o
+SHLIBOBJECTS = $(patsubst %.o, %.lo, $(LIBOBJECTS))
+LIBSHHOPT = $(SRCDIR)/shhopt/libshhopt.a
 
 MANUALS1 = $(BINARIES) $(SCRIPTS)
 MANUALS3 = libppm
@@ -66,7 +73,7 @@
 
 MERGENAME= ppmmerge
 
-INTERFACE_HEADERS = ppm.h ppmcmap.h
+INTERFACE_HEADERS = ppm.h ppmcmap.h ppmdraw.h
 
 .PHONY: all
 all:        $(BINARIES)
@@ -77,9 +84,17 @@
 	$(MAKE) -C ppmtompeg all
 	$(MAKE) -C hpcdtoppm all
 
-ppmtojpeg: %: %.o $(NETPBMLIBS) $(LIBOPT)
+$(SHHOPTBINARIES): %: %.o $(NETPBMLIBS) $(LIBOPT) $(LIBSHHOPT)
+	$(LD) $(LDFLAGS) -o $@ $@.o `$(LIBOPT) $(NETPBMLIBS)` \
+	  $(LIBSHHOPT) $(CDEBUG)
+
+ppmntsc: %: %.o $(NETPBMLIBS) $(LIBOPT) $(LIBSHHOPT)
 	$(LD) $(LDFLAGS) -o $@ $@.o `$(LIBOPT) $(NETPBMLIBS)` \
-	  -L$(JPEGLIB_DIR) -ljpeg $(CDEBUG)
+	  -lm $(LIBSHHOPT) $(CDEBUG)
+
+ppmtojpeg: %: %.o $(NETPBMLIBS) $(LIBOPT) $(LIBSHHOPT)
+	$(LD) $(LDFLAGS) -o $@ $@.o `$(LIBOPT) $(NETPBMLIBS)` \
+	  -L$(JPEGLIB_DIR) -ljpeg $(LIBSHHOPT) $(CDEBUG)
 
 # And libraries.
 $(PBMDIR)/$(LIBPBM): FORCE
@@ -106,6 +121,9 @@
 	$(MAKE) -C hpcdtoppm install.man
 
 include $(SRCDIR)/Makefile.common
+
+$(SRCDIR)/shhopt/libshhopt.a:
+	cd ../shhopt; $(MAKE) libshhopt.a
 
 .PHONY: clean
 clean: clean.common
OpenPOWER on IntegriCloud