summaryrefslogtreecommitdiff
path: root/app-text/mpage/files/mpage-2.5.6-fix-buildsystem.patch
blob: 790d4988064988d305a8d67324f81415dc90c402 (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
--- a/Makefile
+++ b/Makefile
@@ -24,7 +24,6 @@
 # Set this to an ANSI compatible C compiler (preferably gcc)
 # See also system specific settings below
 #CC=cc
-CC=gcc
 
 ############################################################################
 #
@@ -107,7 +106,7 @@
 # If you are using gcc, you probably don't need to change anything here.
 
 # Linux:
-CFLAGS = -O2 -s $(DEFS) -Wall
+CPPFLAGS += $(DEFS)
 
 # AIX (xlC on aix 4):
 #CFLAGS = -O2 -s $(DEFS)
@@ -134,10 +133,6 @@
 # END OF CONFIGURATION OPTIONS
 #
 
-# pattern rules. Should we define these?
-%$(O): %.c
-	$(CC) $(CFLAGS) -c -o $@ $<
-
 
 HEAD =  mpage.h
 DENC =  encoding.h
@@ -150,10 +145,10 @@
 	@echo Done!
 
 mpage$(E):	$(MOBJ)
-	$(CC) $(CFLAGS) -o mpage$(E) $(MOBJ) $(LIBS)
+	$(CC) $(LDFLAGS) $(CFLAGS) -o mpage$(E) $(MOBJ) $(LIBS)
 
 msample$(E):	$(SOBJ)
-	$(CC) $(CFLAGS) -o msample$(E) $(SOBJ) $(LIBS)
+	$(CC) $(LDFLAGS) $(CFLAGS) -o msample$(E) $(SOBJ) $(LIBS)
 
 mpage.1: mpage.1.in
 	sed 's:PREFIX:${PREFIX}:' < mpage.1.in > mpage.1