Add the DragonFly cvs id and perform general cleanups on cvs/rcs/sccs ids. Most
[dragonfly.git] / contrib / traceroute / Makefile.in
1 #  Copyright (c) 1988, 1989, 1990, 1991, 1992, 1995, 1996
2 #       The Regents of the University of California.  All rights reserved.
3 #
4 #  Redistribution and use in source and binary forms, with or without
5 #  modification, are permitted provided that: (1) source code distributions
6 #  retain the above copyright notice and this paragraph in its entirety, (2)
7 #  distributions including binary code include the above copyright notice and
8 #  this paragraph in its entirety in the documentation or other materials
9 #  provided with the distribution, and (3) all advertising materials mentioning
10 #  features or use of this software display the following acknowledgement:
11 #  ``This product includes software developed by the University of California,
12 #  Lawrence Berkeley Laboratory and its contributors.'' Neither the name of
13 #  the University nor the names of its contributors may be used to endorse
14 #  or promote products derived from this software without specific prior
15 #  written permission.
16 #  THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
17 #  WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
18 #  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
19 #
20 # @(#) $Header: Makefile.in,v 1.21 96/09/16 18:49:46 leres Exp $ (LBL)
21
22 #
23 # Various configurable paths (remember to edit Makefile.in, not Makefile)
24 #
25
26 # Top level hierarchy
27 prefix = @prefix@
28 exec_prefix = @exec_prefix@
29 # Pathname of directory to install the binary
30 BINDEST = @sbindir@
31 # Pathname of directory to install the man page
32 MANDEST = @mandir@
33
34 # VPATH
35 srcdir = @srcdir@
36 VPATH = @srcdir@
37
38 #
39 # You shouldn't need to edit anything below here.
40 #
41
42 CC = @CC@
43 CCOPT = @V_CCOPT@
44 INCLS = -I. @V_INCLS@
45 DEFS = @DEFS@
46
47 # Standard CFLAGS
48 CFLAGS = $(CCOPT) $(DEFS) $(INCLS)
49
50 # Standard LIBS
51 LIBS = @LIBS@
52
53 INSTALL = @INSTALL@
54
55 # Explicitly define compilation rule since SunOS 4's make doesn't like gcc.
56 # Also, gcc does not remove the .o before forking 'as', which can be a
57 # problem if you don't own the file but can write to the directory.
58 .c.o:
59         @rm -f $@
60         $(CC) $(CFLAGS) -c $*.c
61
62 CSRC =  traceroute.c
63 GENSRC = version.c
64
65 SRC =   $(CSRC) $(GENSRC)
66
67 TAGHDR = \
68         /usr/include/netinet/in.h \
69         /usr/include/netinet/ip_icmp.h \
70         /usr/include/netinet/udp.h
71
72 TAGFILES = $(SRC) $(TAGHDR)
73
74 # We would like to say "OBJ = $(SRC:.c=.o)" but Ultrix's make cannot
75 # hack the extra indirection
76 OBJ =   $(CSRC:.c=.o) $(GENSRC:.c=.o) @LIBOBJS@
77
78 CLEANFILES = $(OBJ) traceroute $(GENSRC)
79
80 traceroute: $(OBJ)
81         @rm -f $@
82         $(CC) $(CFLAGS) -o $@ $(OBJ) $(LIBS)
83
84 version.o: version.c
85 version.c: $(srcdir)/VERSION
86         @rm -f $@
87         sed -e 's/.*/char version[] = "&";/' $(srcdir)/VERSION > $@
88
89 install: force
90         $(INSTALL) -m 4555 -o root -g bin traceroute $(DESTDIR)$(BINDEST)
91
92 install-man: force
93         $(INSTALL) -m 444 -o bin -g bin traceroute.8 $(DESTDIR)$(MANDEST)/man8
94
95 lint:   $(GENSRC) force
96         lint -hbxn $(SRC) | \
97             grep -v 'struct/union .* never defined' | \
98             grep -v 'possible pointer alignment problem'
99
100 clean: force
101         rm -f $(CLEANFILES)
102
103 distclean: force
104         rm -f $(CLEANFILES) Makefile config.cache config.log config.status \
105             gnuc.h os-proto.h
106
107 tags:   $(TAGFILES)
108         ctags -wtd $(TAGFILES)
109
110 tar:    force
111         @cwd=`pwd` ; dir=`basename $$cwd` ; name=traceroute-`cat VERSION` ; \
112             list="" ; tar="tar chFFf" ; \
113             for i in `cat FILES` ; do list="$$list $$name/$$i" ; done; \
114             echo \
115             "rm -f ../$$name; ln -s $$dir ../$$name" ; \
116              rm -f ../$$name; ln -s $$dir ../$$name ; \
117             echo \
118             "(cd .. ; $$tar - [lots of files]) | compress > /tmp/$$name.tar.Z" ; \
119              (cd .. ; $$tar - $$list) | compress > /tmp/$$name.tar.Z ; \
120             echo \
121             "rm -f ../$$name" ; \
122              rm -f ../$$name
123
124 force:  /tmp
125 depend: $(GENSRC) force
126         ./mkdep -c $(CC) $(DEFS) $(INCLS) $(SRC)