123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384 |
- $Id$
- --- iptraf-3.0.0.orig/src/Makefile 2005-09-13 11:11:17.000000000 +0200
- +++ 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
- - @size $(BINS)
-
- iptraf: $(OBJS) textlib
- - $(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 $<
- + $(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)
- - make -C ../support clean
- + $(MAKE) -C ../support clean
-
- # 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* \
|