diff options
Diffstat (limited to 'package/iptraf/patches')
-rw-r--r-- | package/iptraf/patches/patch-src_Makefile | 70 | ||||
-rw-r--r-- | package/iptraf/patches/patch-support_Makefile | 9 |
2 files changed, 68 insertions, 11 deletions
diff --git a/package/iptraf/patches/patch-src_Makefile b/package/iptraf/patches/patch-src_Makefile index c65ad0743..c73f68411 100644 --- a/package/iptraf/patches/patch-src_Makefile +++ b/package/iptraf/patches/patch-src_Makefile @@ -1,23 +1,70 @@ $Id$ --- iptraf-3.0.0.orig/src/Makefile 2005-09-13 11:11:17.000000000 +0200 -+++ iptraf-3.0.0/src/Makefile 2010-10-05 10:07:10.000000000 +0200 -@@ -107,13 +107,13 @@ BINS = iptraf rvnamed rawtime ++++ iptraf-3.0.0/src/Makefile 2011-01-21 13:46:03.628658655 +0100 +@@ -18,7 +18,8 @@ VERSION = -DVERSION=\"$(VERNUMBER)\" + BINDIR = ../../iptraf-$(VERNUMBER).bin.$(ARCH) + + CC = gcc +-LIBS = -L../support -ltextbox -lpanel -lncurses # in this order! ++LIBS ?= ++LIBS += -ltextbox -lpanel -lncurses # in this order! + + # comment this one out to omit debug code when done. + +@@ -31,15 +32,17 @@ PROF = #-pg + # options to be passed to the compiler. I don't believe they need to be + # modified (except for -m486 on non-Intel x86 platforms). + +-CFLAGS = -Wall #-O2 #-m486 ++CFLAGS ?= -Wall #-O2 #-m486 + DIRS = -DWORKDIR=\"$(WORKDIR)\" \ + -DLOGDIR=\"$(LOGDIR)\" -DEXECDIR=\"$(TARGET)\" +-LDOPTS = #-static ++LDFLAGS ?= ++LDFLAGS += -L../support + + # you may want to change this to point to your ncurses include directory + # if the ncurses include files are not in the default location. + +-INCLUDEDIR = -I/usr/include/ncurses -I../support ++CPPFLAGS ?= ++CPPFLAGS += -I../support + + # You can uncomment this one to disable the backspace key in input fields. + # This means you must use the Del key or Ctrl+H combination to erase the +@@ -106,33 +109,31 @@ error.o log.o mode.o getpath.o bar.o par + BINS = iptraf rvnamed rawtime all: $(BINS) - @echo +- @echo - @size $(BINS) -+ #@size $(BINS) iptraf: $(OBJS) textlib - $(CC) $(LDOPTS) $(PROF) -o iptraf $(OBJS) $(LIBS) +- $(CC) $(LDOPTS) $(PROF) -o iptraf $(OBJS) $(LIBS) ++ $(CC) $(LDFLAGS) -o iptraf $(OBJS) $(LIBS) textlib: - make -C ../support + $(MAKE) -C ../support %.o: %.c *.h version - $(CC) $(CFLAGS) $(DIRS) $(INCLUDEDIR) $(VERSION) $(PLATFORM) $(PROF) $(DEBUG) $(EXECPERM) $(BSSETTING) -c -o $*.o $< -@@ -132,7 +132,7 @@ rawtime: rawtime.c +- $(CC) $(CFLAGS) $(DIRS) $(INCLUDEDIR) $(VERSION) $(PLATFORM) $(PROF) $(DEBUG) $(EXECPERM) $(BSSETTING) -c -o $*.o $< ++ $(CC) $(CPPFLAGS) $(CFLAGS) $(DIRS) $(VERSION) $(PLATFORM) $(EXECPERM) $(BSSETTING) -c -o $*.o $< + + rvnamed: rvnamed.o getpath.o +- $(CC) $(LDOPTS) $(PROF) -o rvnamed rvnamed.o getpath.o ++ $(CC) $(LDFLAGS) -o $@ $^ + + rvnamed.o: rvnamed.c rvnamed.h +- $(CC) $(CFLAGS) $(PROF) $(DEBUG) -c -o rvnamed.o rvnamed.c ++ $(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ rvnamed.c + + rawtime: rawtime.c +- $(CC) $(CFLAGS) $(LDOPTS) $(PROF) $(DEBUG) -o rawtime rawtime.c ++ $(CC) $(CFLAGS) $(LDFLAGS) -o rawtime rawtime.c + + + # rule to clear out all object files and the executables (pow!) clean: rm -f *.o *~ core $(BINS) @@ -26,3 +73,12 @@ $Id$ # I just included this rule to clear out the .o files, leaving the # executables, stripped and ready for packing. +@@ -162,7 +163,7 @@ install: + # and the compiled programs for release as a ready-to-run distribution. + + dist-bin: all +- $(CC) $(LDOPTS) $(PROF) -o iptraf $(OBJS) -L../support -ltextbox /usr/lib/libpanel.a /usr/lib/libncurses.a ++ $(CC) $(LDFLAGS) -o iptraf $(OBJS) -L../support -ltextbox -lpanel -lncurses + rm -rf $(BINDIR) + mkdir $(BINDIR) + /bin/cp -p ../CHANGES ../LICENSE ../FAQ ../INSTALL ../README* \ diff --git a/package/iptraf/patches/patch-support_Makefile b/package/iptraf/patches/patch-support_Makefile index c72b89ef6..fae8e3938 100644 --- a/package/iptraf/patches/patch-support_Makefile +++ b/package/iptraf/patches/patch-support_Makefile @@ -1,7 +1,9 @@ $Id: update-patches 24 2008-08-31 14:56:13Z wbx $ --- iptraf-3.0.0.orig/support/Makefile 2002-07-19 18:31:48.000000000 +0200 -+++ iptraf-3.0.0/support/Makefile 2008-10-09 17:34:11.000000000 +0200 -@@ -3,16 +3,14 @@ INCLUDEDIR = -I/usr/include/ncurses ++++ iptraf-3.0.0/support/Makefile 2011-01-21 13:47:38.508658394 +0100 +@@ -1,18 +1,13 @@ +-INCLUDEDIR = -I/usr/include/ncurses +- OBJS = input.o menurt.o listbox.o winops.o labels.o \ msgboxes.o txbox.o @@ -14,11 +16,10 @@ $Id: update-patches 24 2008-08-31 14:56:13Z wbx $ -# gcc -shared -o libtextbox.so $(OBJS) + $(AR) cq libtextbox.a $(OBJS) + $(RANLIB) libtextbox.a -+# $(CC) -shared -o libtextbox.so $(OBJS) %.o: %.c *.h - gcc -O2 -g -Wall -fPIC $(INCLUDEDIR) -c -o $*.o $< -+ $(CC) -O2 -g -Wall -fPIC $(INCLUDEDIR) -c -o $*.o $< ++ $(CC) $(CPPFLAGS) $(CFLAGS) -fPIC -c -o $*.o $< clean: rm -rf *.o *~ libtextbox.a libtextbox.so |