source: trunk/third/traceroute/Makefile.in @ 14140

Revision 14140, 3.8 KB checked in by danw, 25 years ago (diff)
kill savestr() and use strdup() instead, because the memory savestr() returns can't safely be free()ed. Fixes a SEGV under Solaris.
Line 
1#  Copyright (c) 1988, 1989, 1990, 1991, 1992, 1995, 1996, 1997
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: /afs/dev.mit.edu/source/repository/third/traceroute/Makefile.in,v 1.3 1999-12-27 17:52:36 danw Exp $ (LBL)
21
22#
23# Various configurable paths (remember to edit Makefile.in, not Makefile)
24#
25
26# Top level hierarchy
27prefix = @prefix@
28exec_prefix = @exec_prefix@
29# Pathname of directory to install the binary
30BINDEST = @sbindir@
31# Pathname of directory to install the man page
32MANDEST = @mandir@
33
34# VPATH
35srcdir = @srcdir@
36VPATH = @srcdir@
37
38#
39# You shouldn't need to edit anything below here.
40#
41
42CC = @CC@
43CCOPT = @V_CCOPT@
44INCLS = -I. @V_INCLS@
45DEFS = @DEFS@
46
47# Standard CFLAGS
48CFLAGS = $(CCOPT) $(DEFS) $(INCLS)
49
50# Standard LIBS
51LIBS = @LIBS@
52
53INSTALL = @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 $(srcdir)/$*.c
61
62CSRC =  traceroute.c ifaddrlist.c
63GENSRC = version.c
64
65SRC =   $(CSRC) $(GENSRC)
66HDR =   ifaddrlist.h
67
68TAGHDR = \
69        /usr/include/netinet/in.h \
70        /usr/include/netinet/ip_icmp.h \
71        /usr/include/netinet/udp.h
72
73TAGFILES = $(SRC) $(HDR) $(TAGHDR)
74
75# We would like to say "OBJ = $(SRC:.c=.o)" but Ultrix's make cannot
76# hack the extra indirection
77OBJ =   $(CSRC:.c=.o) $(GENSRC:.c=.o) @LIBOBJS@
78
79CLEANFILES = $(OBJ) traceroute $(GENSRC)
80
81all: traceroute
82
83traceroute: $(OBJ)
84        @rm -f $@
85        $(CC) $(CFLAGS) -o $@ $(OBJ) $(LIBS)
86
87version.o: version.c
88version.c: $(srcdir)/VERSION
89        @rm -f $@
90        sed -e 's/.*/char version[] = "&";/' $(srcdir)/VERSION > $@
91
92install: force
93        $(INSTALL) -m 4555 -o root -g bin traceroute $(DESTDIR)$(BINDEST)
94        $(INSTALL) -m 444 -o bin -g bin traceroute.8 $(DESTDIR)$(MANDEST)/man8
95
96lint: $(GENSRC) force
97        lint -hbxn $(SRC) | \
98            grep -v 'struct/union .* never defined' | \
99            grep -v 'possible pointer alignment problem'
100
101clean: force
102        rm -f $(CLEANFILES)
103
104distclean: force
105        rm -f $(CLEANFILES) Makefile config.cache config.log config.status \
106            gnuc.h os-proto.h
107
108tags: $(TAGFILES)
109        ctags -wtd $(TAGFILES)
110
111tar: force
112        @cwd=`pwd` ; dir=`basename $$cwd` ; name=traceroute-`cat VERSION` ; \
113            list="" ; tar="tar chFFf" ; \
114            for i in `cat FILES` ; do list="$$list $$name/$$i" ; done; \
115            echo \
116            "rm -f ../$$name; ln -s $$dir ../$$name" ; \
117             rm -f ../$$name; ln -s $$dir ../$$name ; \
118            echo \
119            "(cd .. ; $$tar - [lots of files]) | compress > /tmp/$$name.tar.Z" ; \
120             (cd .. ; $$tar - $$list) | compress > /tmp/$$name.tar.Z ; \
121            echo \
122            "rm -f ../$$name" ; \
123             rm -f ../$$name
124
125force: /tmp
126depend: $(GENSRC) force
127        ./mkdep -c $(CC) $(DEFS) $(INCLS) $(SRC)
Note: See TracBrowser for help on using the repository browser.