File: Makefile

package info (click to toggle)
bing 1.3.5-5
  • links: PTS
  • area: main
  • in suites: bookworm, sid
  • size: 456 kB
  • sloc: ansic: 3,774; makefile: 51
file content (135 lines) | stat: -rw-r--r-- 3,083 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
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
#
# $Id: Makefile,v 1.6 1999/10/24 23:30:09 fgouget Exp $
#


##########
#
# Customise the following variables to match your configuration standards
#
##########

BINDIR=/usr/local/bin
MANDIR=/usr/local/man


##########
#
# Uncomment the lines below as appropriate for your platform.
#
##########

# Uncomment if you need the 4.4 BSD compatibility includes.
#  -> required on Linux (and Win32)
#COMPAT_INCS = -Iinclude
#COMPAT_INCS = -I/usr/include

# Maybe specify some specific compatibility options
#  -> on AIX activate the BSD mode
#COMPAT_DEFS= -D_BSD

# On some systems you may need to link with specific libraries
#  -> on SunOS 5 (Solaris) link with
#COMPAT_LIBS=-lnsl -lsocket -L/usr/ucblib -lucb

# Define if you lack srandom()/random()
#  -> required on Win32 (and maybe sometimes on Solaris, but better avoided)
#NO_RANDOM = -DNO_RANDOM=1

# Define to use srandom/random rather than srand/rand
#  -> required on SunOS 4.1.3, SunOS 5, AIX 2 (BOSX 2 really), OSF1 V2.0
#NO_SNPRINTF = -DNO_SNPRINTF=1

# Define if you lack strerror()
#NO_STRERROR = -DNO_STRERROR=1

# You may optionally provide some optimisation flags. Optimising bing for 
# speed should slightly improve the results.
#  -> if you want to debug bing define
COPTIM = -g -Wall -D_DEBUG
#  -> on Linux, SunOS 4 and OSF1 V2.0 you may specify
#COPTIM = -O2
#  -> on Solaris you may use
#COPTIM = -O
# on some hosts like AIX, HP-UX the optimisation options are already set


##########
#
# Define where tools are stored
#
##########

INSTALL=install -c
GROFF=groff
NROFF=nroff
RM=/bin/rm


##########
#
# Compilation rules
#
##########

BINCS = \
	-I. \
	$(COMPAT_INCS)

BDEFS = \
	$(COMPAT_DEFS) \
	$(NO_RANDOM) \
	$(NO_SNPRINTF) \
	$(NO_STRERROR) \
	$(CDEBUG) \
	$(COPTIM)

BLIBS = \
	$(COMPAT_LIBS)

OBJS=	\
	bing.o \
	bing_misc.o \
	bing_probes.o \
	bing_stats.o \
	lin_reg.o \
	icmp_ux.o


# (!!) These dependencies are incorrect. They should be computed automatically.
# Besides it would be a good idea to use autoconf, would it generate code that 
# does that for us ?

all:	bing bing.0 bing.ps

dist:	clean bing.0 bing.ps

bing.o:		bing.c bing_stats.h mod_icmp.h
	$(CC) $(CFLAGS) $(CPPFLAGS) $(BINCS) $(BDEFS) -o $@ -c bing.c
bing_misc.o:	bing_misc.c bing_misc.h 
	$(CC) $(CFLAGS) $(CPPFLAGS) $(BINCS) $(BDEFS) -o $@ -c bing_misc.c
bing_probes.o:	bing_probes.c bing_probes.h 
	$(CC) $(CFLAGS) $(CPPFLAGS) $(BINCS) $(BDEFS) -o $@ -c bing_probes.c
bing_stats.o:	bing_stats.c bing_stats.h
	$(CC) $(CFLAGS) $(CPPFLAGS) $(BINCS) $(BDEFS) -o $@ -c bing_stats.c
lin_reg.o:	lin_reg.c
	$(CC) $(CFLAGS) $(CPPFLAGS) $(BINCS) $(BDEFS) -o $@ -c lin_reg.c

icmp_ux.o:	unix/icmp_ux.c mod_icmp.h
	$(CC) $(CFLAGS) $(BINCS) $(BDEFS) -o $@ -c unix/icmp_ux.c

bing:	$(OBJS)
	$(CC) $(LDFLAGS) -o $@ $(OBJS) $(BLIBS) -lm

bing.ps: unix/bing.8
	$(GROFF) -man unix/bing.8 > bing.ps

bing.0: unix/bing.8
	$(NROFF) -man unix/bing.8 > bing.0

clean:
	$(RM) -f bing bing.ps bing.0 $(OBJS)

#install: bing unix/bing.8
#	$(INSTALL) -m 644 -o man -g man unix/bing.8 $(MANDIR)/man8
#	$(INSTALL) -m 4555 -o root -g staff bing $(BINDIR)