File: Makefile

package info (click to toggle)
gkrellm 2.3.10-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 4,828 kB
  • sloc: ansic: 58,390; makefile: 665; sh: 270
file content (295 lines) | stat: -rw-r--r-- 8,125 bytes parent folder | download | duplicates (2)
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
# To make GKrellM for different systems, you can simply:
# For Linux:
#	make
# For FreeBSD 2.X:
#	make freebsd2
# For FreeBSD 3.X or later:
#	make freebsd
# For NetBSD 1.5 - 1.6.X
#	make netbsd1
# For NetBSD 2.X
#	make netbsd2
# For OpenBSD
#	make openbsd
# For Darwin < 9.0 / Mac OS X < 10.4
# 	make darwin
# For newer Darwin systems
# 	make darwin9
# For Mac OS X with Quartz-based Gtk+ (experimental)
# 	make macosx
# For Solaris 2.x (8 tested so far):
#	make solaris
# For libgtop if you have version 1.1.x installed:
#	make gtop
# For libgtop if you have version 1.0.x installed in /usr/include & /usr/lib,
# uncomment GTOP lines below:
#	make gtop1.0
# or, eg. if libgtop 1.0 is installed in /opt/gnome/include & /opt/gnome/lib
#	make gtop1.0 GTOP_PREFIX=/opt/gnome
#
# Then:
#	make install
# To override default install locations /usr/local/bin and /usr/local/include
# to, for example, /usr/bin and /usr/include:
#    make install INSTALLDIR=/usr/bin INCLUDEDIR=/usr/include
#
# ------------------------------------------------------------------
#  If you want to override the default behaviour for the above simple "make"
#  steps, then uncomment and edit the appropriate lines below.
#
# Default
#--------
BINMODE = 755

# FreeBSD 2.X
#------------
#SYS_LIBS = -lkvm
#EXTRAOBJS =
#BINMODE = 4111


# FreeBSD 3.X or later
#---------------------
#SYS_LIBS = -lkvm -ldevstat
#EXTRAOBJS =
#BINMODE = 4111

# NetBSD 1.5 - 1.6.X
#------------------
#SYS_LIBS=-lkvm
#EXTRAOBJS =
#MANDIR = $(INSTALLROOT)/man/man1

# NetBSD
#------------------
#SYS_LIBS=-lkvm -lpthread
#EXTRAOBJS =
#MANDIR = $(INSTALLROOT)/man/man1

# OpenBSD
#------------------
#SYS_LIBS=-lkvm -lpthread
#EXTRAOBJS =
#BINMODE=2755

# Solaris 2.x
#------------
#SYS_LIBS = -lkstat -lkvm -ldevinfo
#EXTRAOBJS = md5c.o
#BINMODE=2755
#LOCALEDIR = /usr/local/share/locale

# "make gtop1.0" defaults.  If you don't have gnome or libgtop 1.1.x
# installed, uncomment and edit these if necessary for a libgtop install.
# Or, see below about specifying them on the command line.  These are not
# used if you "make gnome-gtop" or "make gtop".
#-----------------------------------
#GTOP_PREFIX = /usr
#GTOP_INCLUDE = -I$(GTOP_PREFIX)/include
#GTOP_LIBS = -L$(GTOP_PREFIX)/lib -lgtop -lgtop_common -lgtop_sysdeps -lXau
#GTOP_LIBS_D = -L$(GTOP_PREFIX)/lib -lgtop -lgtop_common -lgtop_sysdeps
#export GTOP_INCLUDE GTOP_LIBS GTOP_LIBS_D

VERSION = 2.3.10

INSTALLROOT ?= $(DESTDIR)$(PREFIX)

ifeq ($(INSTALLROOT),)
	INSTALLROOT = /usr/local
endif

INSTALLDIR = $(INSTALLROOT)/bin
SINSTALLDIR ?= $(INSTALLDIR)
MANDIR ?= $(INSTALLROOT)/share/man/man1
SMANDIR ?= $(MANDIR)
MANMODE = 644
MANDIRMODE = 755
INCLUDEDIR = $(INSTALLROOT)/include
INCLUDEMODE = 644
INCLUDEDIRMODE = 755
INSTALL ?= $(shell which install)
PKGCONFIGDIR ?= $(INSTALLROOT)/lib/pkgconfig
LOCALEDIR ?= $(INSTALLROOT)/share/locale

OS_RELEASE=$(shell uname -r)

export SYS_LIBS EXTRAOBJS BINMODE
export INSTALLDIR SINSTALLDIR INCLUDEDIR INCLUDEMODE INCLUDEDIRMODE LOCALEDIR
export MANDIR SMANDIR MANDIRMODE MANMODE
export OS_RELEASE

enable_nls=1
debug=0
export enable_nls
export debug

GKRELLM_PC_EXTRA=

all gkrellm: gkrellm.pc
	(cd po && ${MAKE} all)
	(cd src && ${MAKE} gkrellm)
	(cd server && ${MAKE} gkrellmd)

gkrellm.pc: Makefile
	echo 'prefix=$(INSTALLROOT)' > gkrellm.pc
	echo 'Name: GKrellM' >> gkrellm.pc
	echo 'Description: Extensible GTK system monitoring application' >> gkrellm.pc
	echo 'Version: $(VERSION)' >> gkrellm.pc
	echo 'Requires: gtk+-2.0 >= 2.4.0' >> gkrellm.pc
	echo 'Cflags: -I$(INCLUDEDIR)' >> gkrellm.pc
	echo '$(GKRELLM_PC_EXTRA)' >> gkrellm.pc

install: install_gkrellm.pc
	(cd po && ${MAKE} install)
	(cd src && ${MAKE} install STRIP="")
	(cd server && ${MAKE} install STRIP="")

uninstall:
	(cd po && ${MAKE} uninstall)
	(cd src && ${MAKE} uninstall)
	(cd server && ${MAKE} uninstall)
	rm -f $(PKGCONFIGDIR)/gkrellm.pc

install_gkrellm.pc: gkrellm.pc
	$(INSTALL) -d $(PKGCONFIGDIR)
	$(INSTALL) -m $(INCLUDEMODE) -c gkrellm.pc $(PKGCONFIGDIR)

install_darwin install_darwin9 install_macosx: install_gkrellm.pc
	(cd po && ${MAKE} install)
	(cd src && ${MAKE} install STRIP="")
	(cd server && ${MAKE} install STRIP="")

install_freebsd: install_gkrellm.pc
	(cd po && ${MAKE} install)
	(cd src && ${MAKE} install_freebsd)
	(cd server && ${MAKE} install_freebsd)

install_netbsd: install_gkrellm.pc
	(cd po && ${MAKE} install)
	(cd src && ${MAKE} install_netbsd)
	(cd server && ${MAKE} install_netbsd)

install_openbsd: install_gkrellm.pc
	(cd po && ${MAKE} install)
	(cd src && ${MAKE} install_openbsd)
	(cd server && ${MAKE} install_openbsd)

install_solaris: install_gkrellm.pc
	(cd po && ${MAKE} install)
	(cd src && ${MAKE} install_solaris)
	(cd server && ${MAKE} install_solaris)

install_windows: windows install_gkrellm.pc
	(cd po && ${MAKE} install)
	(cd src && ${MAKE} install_windows)
	(cd server && ${MAKE} install_windows)

clean:
	(cd po && ${MAKE} clean)
	(cd src && ${MAKE} clean)
	(cd server && ${MAKE} clean)
	rm -f gkrellm.pc

freebsd2:	gkrellm.pc
	(cd po && ${MAKE} all)
	(cd src && ${MAKE} freebsd2)
	(cd server && ${MAKE} \
		EXTRAOBJS= SYS_LIBS="-lkvm -lmd" gkrellmd )

freebsd3 freebsd4 freebsd5 freebsd: gkrellm.pc
	(cd po && ${MAKE} all)
	(cd src && ${MAKE} freebsd)
	(cd server && ${MAKE} \
		EXTRAOBJS= SYS_LIBS="-lkvm -ldevstat -lmd" gkrellmd )

darwin: gkrellm.pc
	(cd po && ${MAKE} all)
	(cd src && ${MAKE} darwin)
	(cd server && ${MAKE} darwin)

darwin9: gkrellm.pc
	(cd po && ${MAKE} all)
	(cd src && ${MAKE} darwin9)
	(cd server && ${MAKE} darwin9)

macosx: gkrellm.pc
	(cd po && ${MAKE} all)
	(cd src && ${MAKE} macosx)
	(cd server && ${MAKE} macosx)

netbsd1: gkrellm.pc
	(cd po && ${MAKE} all)
	(cd src && ${MAKE} netbsd1)
	(cd server && ${MAKE} \
		EXTRAOBJS= SYS_LIBS="-lkvm" gkrellmd )

netbsd2: gkrellm.pc
	(cd po && ${MAKE} all)
	(cd src && ${MAKE} netbsd2)
	(cd server && ${MAKE} \
		EXTRAOBJS= SYS_LIBS="-lkvm -pthread" gkrellmd )

openbsd: gkrellm.pc
	(cd po && ${MAKE} all)
	(cd src && ${MAKE} \
		PTHREAD_INC=-I${PREFIX}/include EXTRAOBJS= \
		SYS_LIBS="-lkvm -pthread" gkrellm )
	(cd server && ${MAKE} \
		PTHREAD_INC=-I${PREFIX}/include EXTRAOBJS= \
		SYS_LIBS="-lkvm -pthread" gkrellmd )

solaris: gkrellm.pc
	(cd po && ${MAKE} MSGFMT_OPT="-v -o" \
		LOCALEDIR=/usr/local/share/locale all)
ifeq ($(OS_RELEASE),5.8)
	(cd src && ${MAKE} CC=gcc \
		CFLAGS="-Wno-implicit-int" \
		SYS_LIBS="-lkstat -lkvm -ldevinfo -lresolv -lsocket -lX11 -lintl" \
		LINK_FLAGS="" gkrellm )
	(cd server && ${MAKE} CC=gcc \
		CFLAGS="-Wno-implicit-int -DSOLARIS_8" \
		SYS_LIBS="-lkstat -lkvm -ldevinfo -lsocket -lnsl -lintl" \
		LINK_FLAGS="" gkrellmd )
else
	(cd src && ${MAKE} CC=gcc \
		CFLAGS="-Wno-implicit-int" \
		SYS_LIBS="-lkstat -lkvm -ldevinfo -lresolv -lsocket -lX11" LINK_FLAGS="" gkrellm )
	(cd server && ${MAKE} CC=gcc \
		CFLAGS="-Wno-implicit-int" \
		SYS_LIBS="-lkstat -lkvm -ldevinfo -lsocket -lnsl" LINK_FLAGS="" gkrellmd )
endif

gnome-gtop: gkrellm.pc
	(cd po && ${MAKE} all)
	(cd src && ${MAKE} GTOP_PREFIX="\`gnome-config --prefix libgtop\`" \
		GTOP_INCLUDE="\`gnome-config --cflags libgtop\`" \
		GTOP_LIBS="\`gnome-config --libs libgtop\`" \
		SYS_LIBS= gkrellm )
	(cd server && ${MAKE} GTOP_PREFIX="\`gnome-config --prefix libgtop\`" \
		GTOP_INCLUDE="\`gnome-config --cflags libgtop\`" \
		GTOP_LIBS_D="\`gnome-config --libs libgtop\`" \
		SYS_LIBS= gkrellmd )

gtop: gkrellm.pc
	(cd po && ${MAKE} all)
	(cd src && ${MAKE} GTOP_INCLUDE="\`libgtop-config --cflags\`" \
		GTOP_LIBS="\`libgtop-config --libs\`" \
		SYS_LIBS="-lXau" gkrellm )
	(cd server && ${MAKE} GTOP_INCLUDE="\`libgtop-config --cflags\`" \
		GTOP_LIBS_D="\`libgtop-config --libs\`" \
		SYS_LIBS= gkrellmd )

gtop1.0: gkrellm.pc
	(cd po && ${MAKE} all)
	(cd src && ${MAKE} gkrellm )
	(cd server && ${MAKE} gkrellmd )

windows: GKRELLM_PC_EXTRA:=Libs: -L$${prefix}/lib -Wl,-Bstatic,-lgkrellm,-Bdynamic
windows: gkrellm.pc
	(cd po && ${MAKE} LOCALEDIR="share/locale" all)
	(cd src && ${MAKE} LOCALEDIR="share/locale" windows )
	(cd server && ${MAKE} LOCALEDIR="share/locale" windows)

msgmerge:
	(cd po && ${MAKE} messages)
	(cd po && ${MAKE} merge)