summaryrefslogtreecommitdiff
path: root/net/pmf/files/patch-ab
blob: 0a15da43731f3175d17a9108ac92fa793d5b75f9 (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
--- Makefile.orig	Sun May 23 13:54:05 1993
+++ Makefile	Mon Nov 18 18:08:10 2002
@@ -29,12 +29,13 @@
 # pmf without GNU readline or without sound.
 # Remove one (or both) of "-DGNU_READLINE" and "-DSOUND".
 #
-OPTIONS = -DGNU_READLINE -DSOUND
+#OPTIONS = -DGNU_READLINE -DSOUND
+OPTIONS = -DGNU_READLINE
 
 # This variable, SOUND_OBJECT, should be changed if you want to
 # compile pmf without sound: remove this definition of SOUND_OBJECT.
 #
-SOUND_OBJECT = sound.o
+#SOUND_OBJECT = sound.o
 
 # This variable, HISTORY_OBJECT, should be changed if you want to
 # compile pmf without GNU readline: define HISTORY_OBJECT as
@@ -56,7 +57,7 @@
 # If you want to use the GNU C compiler,
 # change the variable CC to "gcc -traditional" instead:
 #
-CC = cc
+CC ?= cc
 # CC = gcc -traditional
 
 ######################################################################
@@ -65,7 +66,7 @@
 #	-- the Makefiles in the subdirs have to be changed separately.
 # Distribution: CFLAGS = -O
 # Maximum debug: CFLAGS = -g -pg -DDEBUG -pipe
-CFLAGS = -O
+CFLAGS += -DSYSTEM_DIR=\"${PREFIX}/share/pmf\"
 
 ######################################################################
 
@@ -104,7 +105,8 @@
 READLINE_LIB = $(READLINE_DIR)/libreadline.a
 C_PACKAGES_LIB = $(C_PACKAGES_DIR)/libc_packs.a
 
-LIBS = $(READLINE_LIB) $(C_PACKAGES_LIB)
+#LIBS = $(READLINE_LIB) $(C_PACKAGES_LIB)
+LIBS = $(C_PACKAGES_LIB) -lreadline -lcompat
 
 INCLUDEDIRS = -I$(C_PACKAGES_DIR)/safe_malloc \
 	-I$(C_PACKAGES_DIR)/generic_list \
@@ -123,7 +125,7 @@
 
 pmf: $(OBJECTS) $(LIBS)
 	rm -f compile_time.c
-	$(CC) -o pmf $(CFLAGS) $(OBJECTS) $(LIBS) -ltermcap -lresolv
+	$(CC) -o pmf $(CFLAGS) $(OBJECTS) $(LIBS) -ltermcap
 	strip pmf
 	rm -f compile_time.o
 
@@ -133,10 +135,10 @@
 ######################################################################
 
 $(READLINE_LIB):
-	( cd $(READLINE_DIR); make )
+	( cd $(READLINE_DIR); $(MAKE) )
 
 $(C_PACKAGES_LIB):
-	( cd $(C_PACKAGES_DIR); make )
+	( cd $(C_PACKAGES_DIR); $(MAKE) 'CFLAGS=$(CFLAGS)')
 
 READLINE_FILES = \
 	$(READLINE_DIR)/*