summaryrefslogtreecommitdiff
path: root/graphics/netpbm/files/patch-be
blob: 9aeb5862ee1c2520bb8ae0425431b6d7e8e4cbad (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
--- pgm/Makefile.orig	Sat Sep  2 13:00:08 2000
+++ pgm/Makefile	Fri Dec  8 00:00:00 2000
@@ -16,18 +16,27 @@
 NETPBMLIBS = $(LIBPGM) $(PBMDIR)/$(LIBPBM)
 LIBLIBS = $(PBMDIR)/$(LIBPBM)
 
+SOVER = 1
+
 PORTBINARIES =	asciitopgm bioradtopgm fstopgm hipstopgm \
 		lispmtopgm pbmtopgm pgmbentley pgmenhance pgmhist \
 		pgmnoise pgmnorm pgmoil pgmramp pgmslice pgmtofs pgmtolispm \
 		pgmtopbm psidtopgm spottopgm sbigtopgm
-MATHBINARIES =	pgmcrater pgmedge pgmtexture rawtopgm pgmkernel
-BINARIES =	$(PORTBINARIES) $(MATHBINARIES)
+MATHBINARIES =	pgmcrater pgmedge pgmtexture pgmkernel
+
+NOMERGEBINARIES =	rawtopgm
+
+MERGEBINARIES =	$(PORTBINARIES) $(MATHBINARIES)
+
+BINARIES = $(MERGEBINARIES) $(NOMERGEBINARIES)
 
 OBJECTS = $(patsubst %, %.o, $(BINARIES))
-MERGEBINARIES = $(BINARIES)
+
 MERGE_OBJECTS = $(patsubst %,%.o2, $(MERGEBINARIES))
 
 LIBOBJECTS = libpgm1.o libpgm2.o
+SHLIBOBJECTS = $(patsubst %.o, %.lo, $(LIBOBJECTS))
+LIBSHHOPT = $(SRCDIR)/shhopt/libshhopt.a
 
 MANUALS1 =	$(BINARIES)
 MANUALS3 =	libpgm
@@ -40,7 +49,11 @@
 .PHONY: all
 all:		$(BINARIES)
 .PHONY: merge
-merge: $(MERGENAME)
+merge:	$(MERGENAME) $(NOMERGEBINARIES)
+
+rawtopgm: %: %.o $(NETPBMLIBS) $(LIBOPT) $(LIBSHHOPT)
+	$(LD) $(LDFLAGS) -o $@ $@.o `$(LIBOPT) $(NETPBMLIBS)` \
+	  -lm $(LIBSHHOPT) $(CDEBUG)
 
 # LIBRARIES
 
@@ -60,6 +73,9 @@
 install.man: install.man.common
 
 include $(SRCDIR)/Makefile.common
+
+$(SRCDIR)/shhopt/libshhopt.a:
+	cd ../shhopt; $(MAKE) libshhopt.a
 
 .PHONY: clean
 clean: clean.common