patch-Makefile_in 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. --- trafshow-5.2.3.orig/Makefile.in 2004-06-15 10:29:14.000000000 +0200
  2. +++ trafshow-5.2.3/Makefile.in 2011-01-21 23:49:58.988658729 +0100
  3. @@ -28,21 +28,22 @@ MANDEST = @mandir@
  4. PROG = trafshow
  5. CC = @PTHREAD_CC@
  6. -CFLAGS = @CFLAGS@ -Wall -I. @DEFS@ @PTHREAD_CFLAGS@
  7. +CFLAGS = @CFLAGS@ -Wall @PTHREAD_CFLAGS@
  8. +CPPFLAGS = -I. @DEFS@ @CPPFLAGS@
  9. YACC = @YACC@
  10. YFLAGS = -d -p `echo $@ | sed -e 's/\..*/_/'`
  11. LEX = @LEX@
  12. LEXLIB = @LEXLIB@
  13. LFLAGS =
  14. LDFLAGS = @LDFLAGS@
  15. -LIBS = @PTHREAD_LIBS@ @LIBS@
  16. +LIBS = @PTHREAD_LIBS@ @LIBS@ -pthread
  17. # Explicitly define compilation rule since SunOS 4's make doesn't like gcc.
  18. # Also, gcc does not remove the .o before forking 'as', which can be a
  19. # problem if you don't own the file but can write to the directory.
  20. .c.o:
  21. @rm -f $@
  22. - $(CC) $(CFLAGS) -c $*.c
  23. + $(CC) $(CPPFLAGS) $(CFLAGS) -c $*.c
  24. CSRC = trafshow.c screen.c colormask.c getkey.c selector.c \
  25. events.c session.c show_if.c show_stat.c show_dump.c \
  26. @@ -59,9 +60,11 @@ OBJ = $(CSRC:.c=.o) $(YSRC:.y=.o) $(LSRC
  27. CLEANFILES = $(PROG) $(OBJ) $(GENSRC) y.tab.h
  28. +all: $(PROG)
  29. +
  30. $(PROG): $(OBJ)
  31. @rm -f $@
  32. - $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJ) $(LIBS)
  33. + $(CC) $(LDFLAGS) -o $@ $(OBJ) $(LIBS)
  34. $(OBJ): config.h trafshow.h Makefile
  35. version.o: version.c
  36. @@ -73,9 +76,9 @@ version.c: VERSION Makefile
  37. @echo 'char compiled[] = "$(CC) $(CFLAGS) $(LIBS)";' >> $@
  38. install:
  39. - ./install-sh -c -s -m 555 -o bin -g bin $(PROG) $(BINDEST)/$(PROG)
  40. - ./install-sh -c -m 444 -o bin -g bin $(PROG).1 $(MANDEST)/man1/$(PROG).1
  41. - [ -f /etc/$(PROG) ] || ./install-sh -c -m 444 .trafshow /etc/$(PROG)
  42. + ./install-sh -c -m 755 $(PROG) $(DESTDIR)$(BINDEST)/$(PROG)
  43. + ./install-sh -c -m 644 $(PROG).1 $(DESTDIR)$(MANDEST)/man1/$(PROG).1
  44. + ./install-sh -c -m 644 .trafshow $(DESTDIR)/etc/$(PROG)
  45. clean:
  46. rm -f $(CLEANFILES)