File: Makefile.in

package info (click to toggle)
pchar 1.5-2
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 644 kB
  • ctags: 402
  • sloc: cpp: 6,096; sh: 2,510; makefile: 192
file content (317 lines) | stat: -rw-r--r-- 7,816 bytes parent folder | download | duplicates (5)
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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
# -*- makefile -*-
#
# $Id: Makefile.in 1084 2005-02-12 20:17:04Z bmah $
#   based on:
# $ID: Makefile.in,v 1.20 1996/11/19 18:56:38 bmah Exp $
#
# Intergalactic Makefile
# Bruce A. Mah <bmah@acm.org>
#
# This work was first produced by an employee of Sandia National
# Laboratories under a contract with the U.S. Department of Energy.
# Sandia National Laboratories dedicates whatever right, title or
# interest it may have in this software to the public. Although no
# license from Sandia is needed to copy and use this software,
# copying and using the software might infringe the rights of
# others. This software is provided as-is. SANDIA DISCLAIMS ANY
# WARRANTY OF ANY KIND, EXPRESS OR IMPLIED.
#

#
# Locations of things
#
srcdir=@srcdir@
VPATH=@srcdir@
INCLUDE_DIR=@srcdir@

prefix=@prefix@
exec_prefix=@exec_prefix@
sbindir=@sbindir@
mandir=@mandir@

# Locations of dependency files.  No reason to change these.
MAKEDEP_TMP=.makedep
MAKEFILE_DEPEND=Makefile.depend

#
# Configuration and stuff
#
host=@host@
host_alias=@host_alias@
host_cpu=@host_cpu@
host_vendor=@host_vendor@
host_os=@host_os@

#
# Compile-time options
#
DFLAGS=	@DEFS@

#
# Compilation flags
#
LDFLAGS=@LDFLAGS@
LIBS=@LIBS@
IFLAGS=@CPPFLAGS@ -I$(srcdir)

#
# Other cc options get defined here.
#
CXXFLAGS=@CXXFLAGS@ $(IFLAGS) $(DFLAGS)

#
# Specification of programs.
#
# Notes:  CC affects the generation of dependencies (at many sites,
# gcc has its own set of include files).
#
# SHELL is absolutely necessary for dependencies to work on Silicon
# Graphics Irix (at least version 3.3, not sure about 4.0 or later).
#
AWK=@AWK@
CXX=@CXX@
ECHO=echo
ECHOQNL=@echoqnl@
GZIP=gzip -9v
INSTALL=@INSTALL@
INSTALL_DATA=@INSTALL_DATA@
INSTALL_PROGRAM=@INSTALL_PROGRAM@
LD=@CXX@
LN_S=@LN_S@
MKDIR=mkdir
MKINSTALLDIRS=${srcdir}/mkinstalldirs
PGP=gpg
RM=rm
SHELL=/bin/sh
TAR=tar
TOUCH=touch

A.OUT=pchar
VERSION=@PC_VERSION@

TARDIR=$(A.OUT)-$(VERSION)
TARFILE=$(TARDIR).tar
TARGZFILE=$(TARFILE).gz
SIGFILE=$(TARGZFILE).asc

#
# Various files
#
# OBJ lists the pathnames of the object files in the build tree as
# defined by $(srcdir).
#
# Other file lists are used in generation distribution tarballs.
#
OBJ	=@obj_subsets@
OBJ_BASE= \
	main.o \
	Kendall.o \
	Pctest.o PctestIpv4.o PctestIpv4File.o PctestIpv4Udp.o PctestIpv4Raw.o\
	PctestIpv4Tcp.o PctestIpv4Icmp.o \
	ResultTable.o \
	TestRecord.o \
	version.o
OBJ_IPV6= \
	PctestIpv6.o PctestIpv6File.o PctestIpv6Icmp.o PctestIpv6Tcp.o \
	PctestIpv6Udp.o 
OBJ_SNMP= \
	GetIfInfo.o

GENSRC= \
	version.cc

SRCFILES= \
	main.cc \
	GetIfInfo.cc GetIfInfo.h \
	Kendall.cc Kendall.h \
	Pctest.cc Pctest.h \
	PctestIpv4.cc PctestIpv4.h \
	PctestIpv4File.cc PctestIpv4File.h \
	PctestIpv4Udp.cc PctestIpv4Udp.h \
	PctestIpv4Raw.cc PctestIpv4Raw.h \
	PctestIpv4Tcp.cc PctestIpv4Tcp.h \
	PctestIpv4Icmp.cc PctestIpv4Icmp.h \
	PctestIpv6.cc PctestIpv6.h \
	PctestIpv6File.cc PctestIpv6File.h \
	PctestIpv6Icmp.cc PctestIpv6Icmp.h \
	PctestIpv6Tcp.cc PctestIpv6Tcp.h \
	PctestIpv6Udp.cc PctestIpv6Udp.h \
	ResultTable.cc ResultTable.h \
	TestRecord.cc TestRecord.h \
	pc.h

OTHERFILES= \
	README CHANGES FAQ pchar.8 \
	Makefile.in Makefile.depend.in \
	VERSION \
	aclocal.m4 \
	config.guess config.sub configure configure.in install-sh mkinstalldirs

CONFIGFILES= \
	Makefile $(MAKEFILE_DEPEND) $(MAKEDEP_TMP)\
	config.cache config.log config.status

#
# Main target dependencies
#
all: $(A.OUT)

$(A.OUT): $(OBJ)
	$(LD) $(OBJ) $(LDFLAGS) $(LIBS) -o $(A.OUT) 

version.o: version.cc
version.cc: VERSION
	@$(RM) -f $@
	@$(TOUCH) $@
	@echo "# Generating $@ for this build..."
	@echo "static char version[] = \"$(A.OUT) `cat $(srcdir)/VERSION`\";" >> $@
	@echo "static char copyright[] = " >> $@
	@echo '"This work was first produced by an employee of Sandia National"' >> $@
	@${ECHOQNL} >> $@
	@echo '"Laboratories under a contract with the U.S. Department of Energy."' >> $@
	@${ECHOQNL} >> $@
	@echo '"Sandia National Laboratories dedicates whatever right, title or"' >> $@
	@${ECHOQNL} >> $@
	@echo '"interest it may have in this software to the public. Although no"' >> $@
	@${ECHOQNL} >> $@
	@echo '"license from Sandia is needed to copy and use this software,"' >> $@
	@${ECHOQNL} >> $@
	@echo '"copying and using the software might infringe the rights of"' >> $@
	@${ECHOQNL} >> $@
	@echo '"others. This software is provided as-is. SANDIA DISCLAIMS ANY"' >> $@
	@${ECHOQNL} >> $@
	@echo '"WARRANTY OF ANY KIND, EXPRESS OR IMPLIED."' >> $@
	@${ECHOQNL} >> $@
	@echo ';' >> $@
	@echo "static char build[] = \"Built for $(host) by `hostname` on `date`\";" >> $@
	@echo "static char dflags[] = \"$(DFLAGS)\";" >> $@
	@echo "char *Version = version;" >> $@
	@echo "char *Copyright = copyright;" >> $@
	@echo "char *Build = build;" >> $@
	@echo "char *DFlags = dflags;" >> $@

FORCE:

#
# install
#
TRANSFORM=@program_transform_name@
install: install-program install-man

install-program: all
	$(MKINSTALLDIRS) ${sbindir}
	$(INSTALL_PROGRAM) $(A.OUT) $(sbindir)/`echo $(A.OUT) | sed '$(TRANSFORM)'`

install-man:
	$(MKINSTALLDIRS) ${mandir}/man8
	$(INSTALL_DATA) ${srcdir}/pchar.8 ${mandir}/man8/pchar.8

#
# clean
#
# Remove all object and executable files.
#
clean:
	$(RM) -f $(OBJ) $(A.OUT) $(GENSRC)

#
# pristine
#
# Like clean target, but also removes "meta-files" and distribution
# tarballs that we might have lying around
#
pristine: clean
	$(RM) -f $(CONFIGFILES)
	$(RM) -f $(TARDIR) $(TARFILE) $(TARGZFILE) $(SIGFILE)
	$(RM) -f core $(A.OUT).core
distclean: pristine

#
# dist
#
# Create a tarball in the current directory
#
dist: $(TARGZFILE)
$(TARGZFILE):
	$(RM) -rf $(TARDIR) $(TARFILE) $(TARGZFILE)	
	$(MKDIR) $(TARDIR)
	for f in `echo $(SRCFILES) $(OTHERFILES)`; do \
		(cd $(TARDIR); $(LN_S) ../$(srcdir)/$$f $$f); \
	done;
	(export POSIXLY_CORRECT=yes; $(TAR) -cvhlf $(TARFILE) $(TARDIR))
	$(GZIP) $(GZIPFLAGS) $(TARFILE)
	$(RM) -rf $(TARDIR)

#
# sign
#
# PGP-sign a distribution
#
sign: $(SIGFILE)
$(SIGFILE): $(TARGZFILE)
	@$(PGP) -sba $(TARGZFILE)

#
# depend
#
# Create source file dependency rules at the end of this file.
# 
depend:
	@$(RM) -f $(MAKEDEP_TMP)
	@echo "# make depend started on" `hostname` "on" `date` > $(MAKEDEP_TMP)
	@echo "Building dependencies ..."; \
	for src in `echo $(OBJ) $(SRC) " " | sed -e 's/\.o[ \t\n]/.cc /g'`; do \
	    echo -n " " $$src ": "; \
	    if [ -r $(srcdir)/$$src ]; then \
		$(CXX) -M $(CXXFLAGS) $(srcdir)/$$src >> $(MAKEDEP_TMP); \
		echo "done"; \
	    else \
		echo "nonexistent"; \
	    fi; \
	done;
	@echo "# make depend completed on" `hostname` "on" `date` >> $(MAKEDEP_TMP)
	@echo "Commiting dependencies to" $(MAKEFILE_DEPEND) "..."
	@$(RM) -f $(MAKEFILE_DEPEND)
	@mv $(MAKEDEP_TMP) $(MAKEFILE_DEPEND)
	@echo "Done."

#
# Modified default rules.  They are roughly the same as the defaults,
# but compilation commands are modified to put the compiler output at
# the location specified by the makefile target instead of the current
# directory.
#
# .cc		C++ source file
# .tcl		Tcl source file
# .cdf		Cumulative distribution function file
# .pdf		Probability density function file
#
.SUFFIXES: .cc .tcl .cdf .pdf
.cc.o:
	$(CXX) $(CXXFLAGS) -c $< -o $@
.tcl.cc:
	@$(RM) -f $@
	@$(TOUCH) $@
	@echo "# Generating $@ from $<..."
	@echo "// $@ generated from $<" > $@
	@echo "// on `date` by $$USER" >> $@
	@echo "" >> $@
	@echo 'static char foo[] = {' >> $@
	@sed -e '/^$$/d'             \
	    -e 's/	/ /g'        \
	    -e 's/^ *//g'            \
	    -e "s/\\(.\\)/'\\1',/g"  \
	    -e 's/\\/\\\\/g'         \
	    -e 's/$$/0x0a,/'         \
	    $< >> $@
	@echo '0x0 };' >> $@
	@echo "" >> $@
	@echo "// Indirection is needed to fool damaged linker" >> $@
	@echo "" >> $@
	@echo 'char *$(*F) = foo;' >> $@

#
# Grab dependencies.  Note that the file $(MAKEFILE_DEPEND) *must*
# exist, even if empty.
#
include $(MAKEFILE_DEPEND)