File: Makefile.in

package info (click to toggle)
netdiag 1.2-1
  • links: PTS
  • area: main
  • in suites: buster, sid
  • size: 3,268 kB
  • sloc: ansic: 23,895; sh: 5,544; makefile: 328; awk: 130
file content (96 lines) | stat: -rw-r--r-- 2,854 bytes parent folder | download | duplicates (3)
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
#
#	Copyright (c) 1993-2004 Rinet Corp., Novosibirsk, Russia
#
# Redistribution and use in source forms, with and without modification,
# are permitted provided that this entire comment appears intact.
# Redistribution in binary form may occur without any restrictions.
#
# THIS SOFTWARE IS PROVIDED ``AS IS'' WITHOUT ANY WARRANTIES OF ANY KIND.
#

#
# Makefile.in -- template for Makefile
# Process this file with `./configure' to produce Makefile
# 	remember to edit Makefile.in, not Makefile
#

# Top level hierarchy
prefix = @prefix@
exec_prefix = @exec_prefix@
# Pathname of directory to install the binary
BINDEST = @bindir@
# Pathname of directory to install the man page
MANDEST = @mandir@

#
# You shouldn't need to edit anything below here.
#

PROG = trafshow
CC = @PTHREAD_CC@
CFLAGS = @CFLAGS@ -Wall -I. @DEFS@ @PTHREAD_CFLAGS@
YACC = @YACC@
YFLAGS = -d -p `echo $@ | sed -e 's/\..*/_/'`
LEX = @LEX@
LEXLIB = @LEXLIB@
LFLAGS =
LDFLAGS = @LDFLAGS@
LIBS = @PTHREAD_LIBS@ @LIBS@

# 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

CSRC	= trafshow.c screen.c colormask.c getkey.c selector.c \
	events.c session.c show_if.c show_stat.c show_dump.c \
	parse_dl.c parse_ip.c netstat.c cisco_netflow.c addrtoname.c \
	hashtab.c lookupa.c recycle.c util.c help_page.c domain_resolver.c
YSRC	=
LSRC	=
GENSRC	= version.c
SRC	= $(CSRC) $(YSRC) $(LSRC) $(GENSRC)

# We would like to say "OBJ = $(SRC:.c=.o)" but Ultrix's make cannot
# hack the extra indirection
OBJ	= $(CSRC:.c=.o) $(YSRC:.y=.o) $(LSRC:.l=.o) $(GENSRC:.c=.o) @LIBOBJS@

CLEANFILES = $(PROG) $(OBJ) $(GENSRC) y.tab.h

$(PROG): $(OBJ)
	@rm -f $@
	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJ) $(LIBS)

$(OBJ): config.h trafshow.h Makefile
version.o: version.c
version.c: VERSION Makefile
	@rm -f $@
	@sed -e 's/.*/char package[] = "&";/' PACKAGE > $@
	@sed -e 's/.*/char version[] = "&";/' VERSION >> $@
	@echo 'char target[] = "@target@";' >> $@
	@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)

clean:
	rm -f $(CLEANFILES)

distclean:
	rm -f $(CLEANFILES) Makefile config.h \
		config.cache config.log	config.status autom4te.cache

tar:
	@cwd=`pwd`; dir=`basename $$cwd`; name=`cat PACKAGE`-`cat VERSION`; \
	list=""; tar="tar cvf"; \
	for i in `cat FILES`; do list="$$list $$name/$$i"; done; \
	rm -f ../$$name; ln -s $$dir ../$$name; \
	(cd ..; $$tar - $$list) | gzip -c > /tmp/$$name.tgz; \
	rm -f ../$$name

depend:	$(GENSRC)
	mkdep $(CFLAGS) $(SRC)