File: Makefile

package info (click to toggle)
ibam 1%3A0.5.2-2.1
  • links: PTS
  • area: main
  • in suites: bullseye, buster, jessie, jessie-kfreebsd, stretch, wheezy
  • size: 192 kB
  • ctags: 100
  • sloc: cpp: 759; sh: 187; makefile: 104
file content (82 lines) | stat: -rw-r--r-- 2,613 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
# IBAM, the Intelligent Battery Monitor
# Copyright (C) 2001-2003, Sebastian Ritterbusch (IBAM@Ritterbusch.de)
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
IBAM_VERSION=0.5.2

CC=g++
CFLAGS=-O3 -DIBAM_VERSION=\"$(IBAM_VERSION)\" -Wall

PREFIX=/usr

INSTALL=install -m 755
RM=rm -f
RMDIR=rm -rf
INSTDIR=install -d

all:    ibam

ibam:	ibam.cpp ibam.inl ibam.hpp
	$(CC) $(CFLAGS) ibam.cpp -o ibam

krell:	ibam-krell.so

ibam-krell.so: ibam-krell.o
	$(CC) $(CFLAGS) -fPIC -shared -Wl -o ibam-krell.so ibam-krell.o

ibam-krell.o: ibam-krell.cpp ibam.hpp ibam.inl
	$(CC) $(CFLAGS) -fPIC `pkg-config gtk+-2.0 --cflags` `gdk-pixbuf-config --cflags` -c ibam-krell.cpp

krell1:	ibam-krell1.so

ibam-krell1.so: ibam-krell1.o
	$(CC) $(CFLAGS) -shared -Wl -o ibam-krell1.so ibam-krell1.o

ibam-krell1.o: ibam-krell1.cpp ibam.hpp ibam.inl
	$(CC) $(CFLAGS) -fPIC `gtk-config --cflags` `imlib-config --cflags-gdk` -c ibam-krell1.cpp

install: ibam
	$(INSTALL) ./ibam $(PREFIX)/local/bin/
	-$(INSTALL) ./ibam-krell.so $(PREFIX)/local/lib/gkrellm/plugins/
	-$(INSTALL) ./ibam-krell1.so $(PREFIX)/local/lib/gkrellm/plugins/

source-archive:	clean
	$(RMDIR) ibam-$(IBAM_VERSION)
	mkdir ibam-$(IBAM_VERSION)
	-cp -f * ibam-$(IBAM_VERSION)
	-$(RM) ibam-$(IBAM_VERSION).tar.gz
	tar cvfz ibam-$(IBAM_VERSION).tar.gz ibam-$(IBAM_VERSION)
	$(RMDIR) ibam-$(IBAM_VERSION)

deb:	source-archive
	@echo
	@echo "***************************************"
	@echo "THIS IS UNTESTED - HELP IS APPRECIATED!"
	@echo "***************************************"
	@echo "/me does not know debian... :)"
	dpkg-buildpackage -rfakeroot -us -uc ibam-$(IBAM_VERSION).tar.gz
	-$(RM)	ibam-$(IBAM_VERSION).tar.gz

rpm:	source-archive
	rpm -ta --clean ibam-$(IBAM_VERSION).tar.gz
	-$(RM)	ibam-$(IBAM_VERSION).tar.gz

uninstall:
	$(RM)	$(PREFIX)/local/bin/ibam
	$(RM)	$(PREFIX)/local/lib/gkrellm/plugins/ibam-krell.so

clean:
	$(RMDIR) core ibam ibam-krell.so ibam-krell1.so *.o *~ ibam-*.tar.gz ibam-*.rpm