File: Makefile

package info (click to toggle)
gkrellkam 2.0.0-3
  • links: PTS
  • area: main
  • in suites: sid
  • size: 572 kB
  • sloc: ansic: 10,340; makefile: 83
file content (43 lines) | stat: -rw-r--r-- 1,032 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
# Makefile for the GKrellKam gkrellm plugin
# Copyright (C) 2001  paul cannon <paul@cannon.cs.usu.edu>
#
# Distributed under the GNU Public License- see COPYING
# for details.

TARGET = gkrellkam

# To facilitate packaging- leave blank for normal installation
DESTDIR =

# This should point to the GKrellM headers
GKRELLM_HDRS = /usr/include

CC ?= gcc
PKG_CONFIG ?= pkg-config
GTKFLAGS := $(shell $(PKG_CONFIG) gtk+-2.0 --cflags)
CFLAGS := $(CFLAGS) $(CPPFLAGS) -fPIC -Wall $(GTKFLAGS) -I$(GKRELLM_HDRS)
LDFLAGS := $(LDFLAGS) -shared
INST_DIR := $(DESTDIR)/usr/lib/gkrellm2/plugins
USER_INST_DIR := $(DESTDIR)$(HOME)/.gkrellm2/plugins
MANPAGES := gkrellkam-list.5
MANPAGE_DIR := $(DESTDIR)/usr/share/man/man5

.PHONY: clean install

all: $(TARGET).so

%.so: %.o
	$(CC) $(LDFLAGS) -o $@ $<

clean:
	-rm -f $(TARGET).so $(TARGET).o

install:
	mkdir -p $(INST_DIR)
	cp -f $(TARGET).so $(INST_DIR)
	mkdir -p $(MANPAGE_DIR)
	cp -f $(MANPAGES) $(MANPAGE_DIR)

userinstall:
	mkdir -p $(USER_INST_DIR)
	cp -f $(TARGET).so $(USER_INST_DIR)