blob: f3f681f14b8dba09a059cd001631ef2e921fe502 (
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
|
--- trafshow-5.2.3.orig/Makefile.in 2004-06-15 10:29:14.000000000 +0200
+++ trafshow-5.2.3/Makefile.in 2011-01-21 23:49:58.988658729 +0100
@@ -28,21 +28,22 @@ MANDEST = @mandir@
PROG = trafshow
CC = @PTHREAD_CC@
-CFLAGS = @CFLAGS@ -Wall -I. @DEFS@ @PTHREAD_CFLAGS@
+CFLAGS = @CFLAGS@ -Wall @PTHREAD_CFLAGS@
+CPPFLAGS = -I. @DEFS@ @CPPFLAGS@
YACC = @YACC@
YFLAGS = -d -p `echo $@ | sed -e 's/\..*/_/'`
LEX = @LEX@
LEXLIB = @LEXLIB@
LFLAGS =
LDFLAGS = @LDFLAGS@
-LIBS = @PTHREAD_LIBS@ @LIBS@
+LIBS = @PTHREAD_LIBS@ @LIBS@ -pthread
# Explicitly define compilation rule since SunOS 4's make doesn't like gcc.
# Also, gcc does not remove the .o before forking 'as', which can be a
# problem if you don't own the file but can write to the directory.
.c.o:
@rm -f $@
- $(CC) $(CFLAGS) -c $*.c
+ $(CC) $(CPPFLAGS) $(CFLAGS) -c $*.c
CSRC = trafshow.c screen.c colormask.c getkey.c selector.c \
events.c session.c show_if.c show_stat.c show_dump.c \
@@ -59,9 +60,11 @@ OBJ = $(CSRC:.c=.o) $(YSRC:.y=.o) $(LSRC
CLEANFILES = $(PROG) $(OBJ) $(GENSRC) y.tab.h
+all: $(PROG)
+
$(PROG): $(OBJ)
@rm -f $@
- $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJ) $(LIBS)
+ $(CC) $(LDFLAGS) -o $@ $(OBJ) $(LIBS)
$(OBJ): config.h trafshow.h Makefile
version.o: version.c
@@ -73,9 +76,9 @@ version.c: VERSION Makefile
@echo 'char compiled[] = "$(CC) $(CFLAGS) $(LIBS)";' >> $@
install:
- ./install-sh -c -s -m 555 -o bin -g bin $(PROG) $(BINDEST)/$(PROG)
- ./install-sh -c -m 444 -o bin -g bin $(PROG).1 $(MANDEST)/man1/$(PROG).1
- [ -f /etc/$(PROG) ] || ./install-sh -c -m 444 .trafshow /etc/$(PROG)
+ ./install-sh -c -m 755 $(PROG) $(DESTDIR)$(BINDEST)/$(PROG)
+ ./install-sh -c -m 644 $(PROG).1 $(DESTDIR)$(MANDEST)/man1/$(PROG).1
+ ./install-sh -c -m 644 .trafshow $(DESTDIR)/etc/$(PROG)
clean:
rm -f $(CLEANFILES)
|