summaryrefslogtreecommitdiff
path: root/net-analyzer/cnet/files/cnet-3.3.4-gentoo.patch
blob: b68b6d1bc51d72da6d7199c2755ce9dc8dab3199 (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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
--- a/Makefile
+++ b/Makefile
@@ -6,7 +6,7 @@
 # Comment/uncomment the following 4 constants to suit your system:
 #
 # PREFIX defines the directory below which cnet will be installed.
-PREFIX		= /usr/local
+PREFIX		= /usr
 #PREFIX		= $(HOME)
 #
 # BINDIR defines the directory where the cnet binary will be installed.
@@ -16,26 +16,24 @@
 LIBDIR		= $(PREFIX)/lib64/cnet
 #
 # WWWDIR defines the directory to hold cnet's web-based documentation
-WWWDIR		= /home/httpd/html/cnet
+#WWWDIR		= /home/httpd/html/cnet
 #WWWDIR		= $(HOME)/WWW/cnet
 #
 # ---------------------------------------------------------------------
 #
 it:
-	make -C src
-	make -C support
+	$(MAKE) -C src
+	$(MAKE) -C support
 	@ls -l bin/$(NAME) lib/*.a
 
 install:
-	make
-	@mkdir -p  $(BINDIR) $(LIBDIR)
-	@chmod 755 $(BINDIR) $(LIBDIR)
-	@cp bin/$(NAME) $(BINDIR)/$(NAME)
-	@chmod 755 $(BINDIR)/$(NAME)
-	@rm -rf $(LIBDIR)/*
-	@cp lib/* $(LIBDIR)
-	@chmod 644 $(LIBDIR)/*
-	@ls -l $(BINDIR)/$(NAME) $(LIBDIR)/*.a
+	@mkdir -p  $(DESTDIR)$(BINDIR) $(DESTDIR)$(LIBDIR)
+	@chmod 755 $(DESTDIR)$(BINDIR) $(DESTDIR)$(LIBDIR)
+	@cp bin/$(NAME) $(DESTDIR)$(BINDIR)/$(NAME)
+	@chmod 755 $(DESTDIR)$(BINDIR)/$(NAME)
+	@rm -rf $(DESTDIR)$(LIBDIR)/*
+	@cp lib/* $(DESTDIR)$(LIBDIR)
+	@chmod 644 $(DESTDIR)$(LIBDIR)/*
 
 AND	= html/CLICK html/KEYBOARD html/STOPANDWAIT html/TICKTOCK
 www:
--- a/src/Makefile.linux
+++ b/src/Makefile.linux
@@ -5,7 +5,7 @@
 #	binutils 2.5.2, and
 #	libelf (0.6.4 onwards)
 #
-WARNINGS =	-Wall -Werror -Wshadow -Wpointer-arith -Wcast-qual \
+WARNINGS =	-Wall -Wshadow -Wpointer-arith -Wcast-qual \
 		-Wcast-align -Wwrite-strings -Wconversion \
 		-Wstrict-prototypes -Wredundant-decls -Winline \
 		-Wcomments -Wtrigraphs -Wimport -Wundef
@@ -20,8 +20,8 @@
 XINCLUDES	= -I/usr/include/tcl8.5
 XLIBS		= -ltcl8.5 -ltk8.5 -lX11
 #
-C99		= gcc -std=c99 -Wall -Werror -pedantic
-CFLAGS		= -O3 -fPIC $(INCLUDES) $(XINCLUDES)
+C99		= $(CC) -std=c99 -Wall -pedantic
+CFLAGS		+= -fPIC $(INCLUDES) $(XINCLUDES)
 #
 LD		= gcc -rdynamic
 LIBDIRS		= $(XLIBDIRS)
--- a/support/Makefile
+++ b/support/Makefile
@@ -7,21 +7,21 @@
 
 it:
 	@if uname -s -r | grep -q "Linux" ; then \
-		make -f Makefile.linux ; fi
+		$(MAKE) -f Makefile.linux ; fi
 	@if uname -s -r | grep -q "Darwin" ; then \
-		make -f Makefile.macosx ; fi
+		$(MAKE) -f Makefile.macosx ; fi
 	@if uname -s -r | grep -q "SunOS 4" ; then \
-		make -f Makefile.sunos ; fi
+		$(MAKE) -f Makefile.sunos ; fi
 	@if uname -s -r | grep -q "SunOS 5" ; then \
-		make -f Makefile.solaris ; fi
+		$(MAKE) -f Makefile.solaris ; fi
 	@if uname -s -r | grep -q "OSF1" ; then \
-		make -f Makefile.osf1 ; fi
+		$(MAKE) -f Makefile.osf1 ; fi
 	@if uname -s -r | grep -q "IRIX" ; then \
-		make -f Makefile.irix5 ; fi
+		$(MAKE) -f Makefile.irix5 ; fi
 	@if uname -s -r | grep -q "FreeBSD" ; then \
-		make -f Makefile.freebsd ; fi
+		$(MAKE) -f Makefile.freebsd ; fi
 	@if uname -s -r | grep -q "NetBSD" ; then \
-		make -f Makefile.netbsd ; fi
+		$(MAKE) -f Makefile.netbsd ; fi
 	@cp -p cnetsupport.h ../lib
 
 # ---------------------------------------------------------------------
--- a/src/Makefile
+++ b/src/Makefile
@@ -8,21 +8,21 @@
 
 it:
 	@if uname -s -r | grep -q "Linux" ; then \
-		make -f Makefile.linux $(NAME) ; fi
+		$(MAKE) -f Makefile.linux $(NAME) ; fi
 	@if uname -s -r | grep -q "Darwin" ; then \
-		make -f Makefile.macosx $(NAME) ; fi
+		$(MAKE) -f Makefile.macosx $(NAME) ; fi
 	@if uname -s -r | grep -q "SunOS 4" ; then \
-		make -f Makefile.sunos $(NAME) ; fi
+		$(MAKE) -f Makefile.sunos $(NAME) ; fi
 	@if uname -s -r | grep -q "SunOS 5" ; then \
-		make -f Makefile.solaris $(NAME) ; fi
+		$(MAKE) -f Makefile.solaris $(NAME) ; fi
 	@if uname -s -r | grep -q "OSF1" ; then \
-		make -f Makefile.osf1 $(NAME) ; fi
+		$(MAKE) -f Makefile.osf1 $(NAME) ; fi
 	@if uname -s -r | grep -q "IRIX" ; then \
-		make -f Makefile.irix5 $(NAME) ; fi
+		$(MAKE) -f Makefile.irix5 $(NAME) ; fi
 	@if uname -s -r | grep -q "FreeBSD" ; then \
-		make -f Makefile.freebsd $(NAME) ; fi
+		$(MAKE) -f Makefile.freebsd $(NAME) ; fi
 	@if uname -s -r | grep -q "NetBSD" ; then \
-		make -f Makefile.netbsd $(NAME) ; fi
+		$(MAKE) -f Makefile.netbsd $(NAME) ; fi
 	@cp -p $(NAME) ../bin
 	@cp -p cnet.h  ../lib
 
@@ -33,7 +33,7 @@
 	@rm -rf HTML GPATH GRTAGS GSYMS GTAGS
 
 hide:
-	make clean
+	$(MAKE) clean
 	echo '#if	HIDE_GLOBAL_NAMES'		 > hidenames.h
 	sort < HIDENAMES | \
 	awk '{ if($$0 !~ /#/) printf("#define\t%-36s\t__CN%03d\n", $$0,++n);}'\
--- a/support/Makefile.common
+++ b/support/Makefile.common
@@ -1,13 +1,12 @@
 #
-C99		= gcc -std=c99 -Wall -Werror -pedantic -O3 -fPIC
 
 DOTH		= cnetsupport.h
 OBJ		= hashtable.o haversine.o lexical.o md5.o queue.o vector.o
 
 $(NAME):	$(OBJ)
 		@echo linking $(NAME)
-		@ar rc $(NAME) $(OBJ)
-		@ranlib $(NAME)
+		$(AR) rc $(NAME) $(OBJ)
+		$(RANLIB) $(NAME)
 		@cp -p $(NAME) ../lib
 
 %.o : %.c $(DOTH)