File: Makefile.in

package info (click to toggle)
gps 1.1.0.0-2
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 1,212 kB
  • ctags: 987
  • sloc: cpp: 11,600; sh: 381; makefile: 319; ansic: 227; perl: 17
file content (258 lines) | stat: -rw-r--r-- 8,204 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
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
# $Id: Makefile.in,v 1.28 2002/04/28 19:33:21 bergo Exp $

#
# See (and read :) ) the file INSTALL for details on installation
#

# and remember: AUTOMAKE IS EVIL! AVOID AVOID AVOID

CCC = @CXX@
CXXFLAGS=@CXXFLAGS@
GTKLIB = @GTK_LIBS@
GTKFLAG = @GTK_FLAGS@
PREFIX = @prefix@

DESTDIR =

RLFLAG = -DWDOC=\"$(PREFIX)/doc\"

PROGINST = @INSTALL@
ALLLIBS = $(GTKLIB) @SYSTEM_DEPENDENT_LIBS@
ALLFLAGS = $(CXXFLAGS) $(GTKFLAG) $(RLFLAG) @SYSTEM_DEPENDENT_FLAGS@
LDFLAGS=@LDFLAGS@ @LIBS@

ALLDOTOS = details.o diefast.o direct.o filter.o freebsd.o \
           globalvars.o gps.o history.o \
           linuxprocfs.o msgbox.o netpolling.o \
           netwatch.o pipedtop.o polling.o quickbar.o \
           renice.o tabledata.o \
           treeview.o tstring.o userbox.o userinfo.o \
           watchp.o
ALLDOTHS = details.h diefast.h direct.h filter.h freebsd.h gps.h \
           history.h \
           importglobals.h linuxprocfs.h msgbox.h nativepollers.h \
           netpolling.h \
           netwatch.h pipedtop.h polling.h quickbar.h renice.h \
           tabledata.h \
           treeview.h tstring.h userbox.h userinfo.h \
           watchp.h

all: @PRECOMPILE_TARGETS@ @ALL_TOPLEVEL_TARGETS@ do_man_page install_guide

silent: module_gps module_rgpsp do_man_page

do_gps: msg_gps module_gps

do_rgpsp: msg_rgpsp module_rgpsp

msg_gps:
	@echo "---->  compiling gPS main program"

msg_rgpsp:
	@echo "---->  compiling the remote gPS poller(s) (rgpsp)"

module_rgpsp:
	@$(MAKE) -C ./rgpsp

module_gps: $(ALLDOTOS)
	$(CCC) $(ALLDOTOS) -o gps $(ALLLIBS) $(ALLFLAGS) $(LDFLAGS)

# i.  I know how to make generic rules.
# ii. I don't want to.

gps.o: gps.cc $(ALLDOTHS)
	$(CCC) -c gps.cc -o gps.o $(ALLFLAGS)

msgbox.o: msgbox.cc $(ALLDOTHS)
	$(CCC) -c msgbox.cc -o msgbox.o $(ALLFLAGS) -I./pixmaps

filter.o: filter.cc $(ALLDOTHS)
	$(CCC) -c filter.cc -o filter.o $(ALLFLAGS)

tabledata.o: tabledata.cc $(ALLDOTHS)
	$(CCC) -c tabledata.cc -o tabledata.o $(ALLFLAGS)

renice.o: renice.cc $(ALLDOTHS)
	$(CCC) -c renice.cc -o renice.o $(ALLFLAGS)

details.o: details.cc $(ALLDOTHS)
	$(CCC) -c details.cc -o details.o $(ALLFLAGS)

diefast.o: diefast.cc $(ALLDOTHS)
	$(CCC) -c diefast.cc -o diefast.o $(ALLFLAGS)

history.o: history.cc $(ALLDOTHS)
	$(CCC) -O2 -c history.cc -o history.o $(ALLFLAGS)

polling.o: polling.cc $(ALLDOTHS)
	$(CCC) -c polling.cc -o polling.o $(ALLFLAGS)

linuxprocfs.o: linuxprocfs.cc $(ALLDOTHS)
	$(CCC) -O2 -c linuxprocfs.cc -o linuxprocfs.o $(ALLFLAGS)

pipedtop.o: pipedtop.cc $(ALLDOTHS)
	$(CCC) -c pipedtop.cc -o pipedtop.o $(ALLFLAGS)

netwatch.o: netwatch.cc $(ALLDOTHS)
	$(CCC) -c netwatch.cc -o netwatch.o $(ALLFLAGS)

netpolling.o: netpolling.cc $(ALLDOTHS)
	$(CCC) -c netpolling.cc -o netpolling.o $(ALLFLAGS)

tstring.o: tstring.cc $(ALLDOTHS)
	$(CCC) -c tstring.cc -o tstring.o $(ALLFLAGS)

globalvars.o: globalvars.cc $(ALLDOTHS)
	$(CCC) -c globalvars.cc -o globalvars.o $(ALLFLAGS)

userbox.o: userbox.cc $(ALLDOTHS)
	$(CCC) -c userbox.cc -o userbox.o $(ALLFLAGS)

userinfo.o: userinfo.cc $(ALLDOTHS)
	$(CCC) -c userinfo.cc -o userinfo.o $(ALLFLAGS)

treeview.o: treeview.cc $(ALLDOTHS)
	$(CCC) -c treeview.cc -o treeview.o $(ALLFLAGS)

freebsd.o: freebsd.cc $(ALLDOTHS)
	$(CCC) -c freebsd.cc -o freebsd.o $(ALLFLAGS)

direct.o: direct.cc $(ALLDOTHS)
	$(CCC) -c direct.cc -o direct.o $(ALLFLAGS)

quickbar.o: quickbar.cc $(ALLDOTHS)
	$(CCC) -c quickbar.cc -o quickbar.o $(ALLFLAGS)

watchp.o: watchp.cc $(ALLDOTHS)
	$(CCC) -c watchp.cc -o watchp.o $(ALLFLAGS)

# FreeBSD >= 4.0 hack
vmmap_hack:
	./freebsd4_header.pl </usr/include/vm/vm_map.h >freebsd4_vmmap.h

do_man_page: gps.1x.hpp
	rm -f gps.1x.inc gps.1x
	echo "#define @THIS_SYSTEM@ 1" > gps.1x.inc
	echo "#define CURRENT_OS \"@THIS_SYSTEM@\"" >> gps.1x.inc
	@CPP@ -C -P - <gps.1x.hpp >gps.1x
	if test ! -f gps.1x ; then cp gps.1x.linux gps.1x ; fi 
	rm -f gps.1x.inc

install_guide:
	@rm -f current.prefix
	@echo "$(PREFIX)" > current.prefix
	@echo
	@echo "----> gPS install directions                              "
	@echo " Now you may run one of these:                            "
	@echo
	@echo " make install          : installs everything.             "
	@echo " make install_gps      : installs gPS main program only   "
	@echo " make install_net_all  : installs network pollers only    "
	@echo " make install_net_best : installs best network poller     "
	@echo

# lots of install targets...
# it is safer to talk to me before changing anything below here,
# as it is me who will have to handle uninstall on next versions.

# this is meant to be run by the RPM packager, will fix
# symlink troubles
install_rpm: install_gps install_net_rpm

install: install_gps install_net_all

install_gps:
	@echo "----> installing gPS main program"
	$(PROGINST) -d $(DESTDIR)$(PREFIX)/doc/gps-@GPS_RELEASE@
	$(PROGINST) -d $(DESTDIR)$(PREFIX)/bin
	$(PROGINST) -d $(DESTDIR)$(PREFIX)/man/man1
	$(PROGINST) -d $(DESTDIR)$(PREFIX)/share/icons
	$(PROGINST) gps                  $(DESTDIR)$(PREFIX)/bin
	$(PROGINST) gps.1x               $(DESTDIR)$(PREFIX)/man/man1
	$(PROGINST) README               $(DESTDIR)$(PREFIX)/doc/gps-@GPS_RELEASE@
	$(PROGINST) INSTALL              $(DESTDIR)$(PREFIX)/doc/gps-@GPS_RELEASE@
	$(PROGINST) COPYING              $(DESTDIR)$(PREFIX)/doc/gps-@GPS_RELEASE@
	$(PROGINST) CHANGELOG            $(DESTDIR)$(PREFIX)/doc/gps-@GPS_RELEASE@
	$(PROGINST) TODO                 $(DESTDIR)$(PREFIX)/doc/gps-@GPS_RELEASE@
	$(PROGINST) README.NetWatch      $(DESTDIR)$(PREFIX)/doc/gps-@GPS_RELEASE@
	$(PROGINST) pixmaps/xray-tux.xpm $(DESTDIR)$(PREFIX)/share/icons
	$(PROGINST) pixmaps/bsdwatcher.xpm $(DESTDIR)$(PREFIX)/share/icons
	@if test "@THIS_SYSTEM@" = "FreeBSD" ; then chmod 2755 $(DESTDIR)$(PREFIX)/bin/gps ;\
	chgrp kmem $(DESTDIR)$(PREFIX)/bin/gps ; chown root $(DESTDIR)$(PREFIX)/bin/gps ; fi
	@echo

install_net_all:
	@echo "----> installing network pollers (rgpsp)"
	@if test -x rgpsp/linux/linux_rgpsp ; then \
	  $(MAKE) -C rgpsp/linux install ; fi	
	@if test -x rgpsp/freebsd/freebsd_rgpsp ; then \
	  $(MAKE) -C rgpsp/freebsd install ; fi	
	$(MAKE) -C rgpsp install_docs
	$(MAKE) -C rgpsp install_scripts

install_net_rpm:
	@if test -x rgpsp/linux/linux_rgpsp ; then \
	  $(MAKE) -C rgpsp/linux install_rpm ; fi	
	$(MAKE) -C rgpsp install_rpm

install_net_best:
	@echo "----> installing network pollers (rgpsp)"
	@if test -x rgpsp/linux/linux_rgpsp ; then \
	  $(MAKE) -C rgpsp/linux install ; fi	
	@if test -x rgpsp/freebsd/freebsd_rgpsp ; then \
	  $(MAKE) -C rgpsp/freebsd install ; fi	
	$(MAKE) -C rgpsp install_docs

#
# install_rtop (when rtop comes in)
#

uninstall:
	rm -rf $(DESTDIR)$(PREFIX)/doc/gps-*
	rm -f  $(DESTDIR)$(PREFIX)/man/man1/gps.1x
	rm -f  $(DESTDIR)$(PREFIX)/man/man1/rgpsp.1
	rm -f  $(DESTDIR)$(PREFIX)/bin/gps
	rm -f  $(DESTDIR)$(PREFIX)/bin/rgpsp
	rm -f  $(DESTDIR)$(PREFIX)/bin/rgpsp_*
	rm -f  $(DESTDIR)$(PREFIX)/share/icons/xray-tux.xpm
	rm -f  $(DESTDIR)$(PREFIX)/share/icons/bsdwatcher.xpm
	rm -f  $(DESTDIR)/etc/rc.d/init.d/rgpsp
	@echo
	@echo
	@echo "I'm about to remove the configuration file /etc/rgpsp.conf"
	@echo "Hit <Ctrl-C> within 5 seconds to prevent me from doing so."
	sleep 5
	rm -f  /etc/rgpsp.conf
	@echo "Uninstall complete."

#
# clean-up targets
#

clean:
	rm -f *.o gps compile.log gps.1x gps.1x.inc freebsd4_vmmap.h
	rm -rf devdoc
	$(MAKE) -C ./rgpsp clean

distclean: clean-devel

clean-devel:
	$(MAKE) -C rgpsp distclean
	@rm -f *.o gps *.cache config.* transient.h systype.h current.prefix gps.spec compile.log freebsd4_vmmap.h
	@rm -f rgpsp/Makefile
	@rm -f Makefile

# code documentation

# requires doc++ to generate code documentation
# http://www.linuxsupportline.com/~doc++
#
# will create development docs in devdoc directory
devdoc:
	rm -rf devdoc
	mkdir devdoc
	doc++ -s -v -d ./devdoc *.h

# makes a source tarball and places it in /usr/src/redhat/SOURCES
boggle_rpm:
	cd .. ; mv gps gps-@GPS_RELEASE@ ; rm -f gps-@GPS_RELEASE@.tar.gz ; tar zcvf gps-@GPS_RELEASE@.tar.gz gps-@GPS_RELEASE@	; mv gps-@GPS_RELEASE@ gps ; cp -f gps-@GPS_RELEASE@.tar.gz /usr/src/redhat/SOURCES/gps-@GPS_RELEASE@.tar.gz ; cd gps ; echo "--> The tarball is there: (it's not a distclean tarball)" ; ls -l /usr/src/redhat/SOURCES/gps*