summaryrefslogtreecommitdiff
path: root/graphics/netpbm/patches/patch-ah
blob: 7b595a5cf6d47f1565ed1824f390175da31aa45b (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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
$NetBSD: patch-ah,v 1.1 1999/01/10 23:52:16 tron Exp $

--- pgm/Makefile.orig	Fri Jan 28 11:14:02 1994
+++ pgm/Makefile	Mon Jan 11 00:18:46 1999
@@ -18,14 +18,16 @@
 #CFLAGS =	-g -O
 LDFLAGS =	-s
 #LDFLAGS =	
-INSTALLBINARIES =	/usr/new/pbm
-INSTALLMANUALS1 =	/usr/man/man1
+INSTALLBINARIES =	$(PREFIX)/bin
+INSTALLMANUALS1 =	$(PREFIX)/man/man1
 SUFFIXMANUALS1 =	1
-INSTALLMANUALS3 =	/usr/man/man3
+INSTALLMANUALS3 =	$(PREFIX)/man/man3
 SUFFIXMANUALS3 =	3
-INSTALLMANUALS5 =	/usr/man/man5
+INSTALLMANUALS5 =	$(PREFIX)/man/man5
 SUFFIXMANUALS5 =	5
-MANCP =			cp
+MANCP =			install -c -m 0644
+INSTALLLIBS =		$(PREFIX)/lib
+INSTALLDEFS =		$(PREFIX)/include
 
 PBMDIR =	../pbm
 INCLUDEPBM =	-I$(PBMDIR)
@@ -37,12 +39,13 @@
 INCLUDE =	-I.. $(INCLUDEPBM)
 ALLCFLAGS =	$(CFLAGS) $(INCLUDE)
 LIBPGM =	libpgm.a
+DEFPGM =	pgm.h
 
 PORTBINARIES =	asciitopgm bioradtopgm fstopgm hipstopgm \
-		lispmtopgm pbmtopgm pgmbentley pgmenhance pgmhist pgmkernel \
+		lispmtopgm pbmtopgm pgmbentley pgmenhance pgmhist \
 		pgmnoise pgmnorm pgmoil pgmramp pgmtofs pgmtolispm \
 		pgmtopbm psidtopgm spottopgm
-MATHBINARIES =	pgmcrater pgmedge pgmtexture rawtopgm
+MATHBINARIES =	pgmcrater pgmedge pgmtexture rawtopgm pgmkernel
 BINARIES =	$(PORTBINARIES) $(MATHBINARIES)
 
 OBJECTS =	asciitopgm.o bioradtopgm.o fstopgm.o hipstopgm.o \
@@ -56,18 +59,19 @@
 MANUALS5 =	pgm
 
 
-#all:		binaries
-all:		merge
-#install:	install.bin
-install:	install.merge
+all:		binaries
+#all:		merge
+install:	install.bin
+#install:	install.merge
 
 
 binaries:	$(BINARIES)
 
 install.bin:	binaries
 	cd $(INSTALLBINARIES) ; rm -f $(BINARIES)
-	cp $(BINARIES) $(INSTALLBINARIES)
-
+	install -c -s -m 0755 $(BINARIES) $(INSTALLBINARIES)
+	install -c -m 0644 $(LIBPGM) $(INSTALLLIBS)
+	install -c -m 0644 $(DEFPGM) $(INSTALLDEFS)
 
 merge:		pgmmerge
 pgmmerge:	pgmmerge.c $(OBJECTS) $(LIBPGM) $(LIBPBM)
@@ -97,15 +101,15 @@
 
 
 # Rule for plain programs.
-$(PORTBINARIES):	pgm.h $(DEFPBM) $(LIBPGM) $(LIBPBM)
+$(PORTBINARIES):	$(DEFPGM) $(DEFPBM) $(LIBPGM) $(LIBPBM)
 	$(CC) $(ALLCFLAGS) $(LDFLAGS) -o $@ $@.c $(LIBPGM) $(LIBPBM)
 
 # Rule for math-dependent programs.
-$(MATHBINARIES):	pgm.h $(DEFPBM) $(LIBPGM) $(LIBPBM)
+$(MATHBINARIES):	$(DEFPGM) $(DEFPBM) $(LIBPGM) $(LIBPBM)
 	$(CC) $(ALLCFLAGS) $(LDFLAGS) -o $@ $@.c -lm $(LIBPGM) $(LIBPBM)
 
 # Rule for objects.
-$(OBJECTS):	pgm.h $(DEFPBM)
+$(OBJECTS):	$(DEFPGM) $(DEFPBM)
 	$(CC) $(ALLCFLAGS) "-Dmain=$*_main" -c $*.c
 
 # And libraries.
@@ -117,9 +121,9 @@
 	ar rc $(LIBPGM) libpgm1.o libpgm2.o
 	-ranlib $(LIBPGM)
 
-libpgm1.o:	pgm.h $(DEFPBM) libpgm.h libpgm1.c
+libpgm1.o:	$(DEFPGM) $(DEFPBM) lib$(DEFPGM) libpgm1.c
 	$(CC) $(ALLCFLAGS) -c libpgm1.c
-libpgm2.o:	pgm.h $(DEFPBM) libpgm.h libpgm2.c $(DEFLIBPBM)
+libpgm2.o:	$(DEFPGM) $(DEFPBM) lib$(DEFPGM) libpgm2.c $(DEFLIBPBM)
 	$(CC) $(ALLCFLAGS) -c libpgm2.c
 
 # Other dependencies.
@@ -134,7 +138,6 @@
 pgmedge pgmedge.o:		pgmedge.c
 pgmenhance pgmenhance.o:	pgmenhance.c
 pgmhist pgmhist.o:		pgmhist.c
-pgmkernel pgmkernel.o:		pgmkernel.c
 pgmnoise pgmnoise.o:		pgmnoise.c
 pgmnorm pgmnorm.o:		pgmnorm.c
 pgmoil pgmoil.o:		pgmoil.c
@@ -148,4 +151,4 @@
 spottopgm spottopgm.o:		spottopgm.c
 
 clean:
-	-rm -f *.o *.a *.cat *~ core $(BINARIES) pgmmerge
+	-rm -f *.o *.a *.cat *~ core *.core $(BINARIES) pgmmerge