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
|
From 822bb45acf93b63e59071903aad842a3dd92a915 Mon Sep 17 00:00:00 2001
From: Michael Orlitzky <michael@orlitzky.com>
Date: Fri, 26 Aug 2016 08:43:12 -0400
Subject: [PATCH 1/1] Rewrite the Makefile to fix CC, CFLAGS, and LDFLAGS
support.
The existing Makefile did not allow the user to set CC, CFLAGS, or
LDFLAGS (or at least, they were ignored). This was fixed somewhat
easily by deleting most of the Makefile, and by appending the
necessary flags to CFLAGS and LDFLAGS. The installation target didn't
do the right thing anyway, so it has been removed.
The resulting Makefile is probably only useful on Gentoo, but upstream
is long gone so maybe that's not a problem.
Gentoo-Bug: 335033
---
Makefile | 34 +++++-----------------------------
1 file changed, 5 insertions(+), 29 deletions(-)
diff --git a/Makefile b/Makefile
index 7916cab..43a0527 100644
--- a/Makefile
+++ b/Makefile
@@ -1,36 +1,12 @@
GTK_INCLUDE = `pkg-config gtk+-2.0 --cflags`
GTK_LIB = `pkg-config gtk+-2.0 --libs`
-INSTALLDIR = /usr/lib/gkrellm2/plugins
-
-FLAGS = -O2 -Wall -fPIC $(GTK_INCLUDE)
+CFLAGS += -fPIC $(GTK_INCLUDE)
LIBS = $(GTK_LIB)
-LFLAGS = -shared
-
-CC = gcc
-
-OBJS = gkrellfire.o
-
-all: gkrellfire.so
-
-%.o: %.c
- $(CC) $(CFLAGS) $(FLAGS) -c -o $@ $<
+LDFLAGS += -shared
-
-gkrellfire.so: $(OBJS)
- $(CC) $(CFLAGS) $(OBJS) -o gkrellfire.so $(LFLAGS) $(LIBS)
+gkrellfire.so: gkrellfire.o
+ $(CC) $(CFLAGS) $(OBJS) -o $@ $(LDFLAGS) $(LIBS)
clean:
- rm -f *.o core *.so* *.bak *~
-
-gkrellfire.o: gkrellfire.c
-
-install:
- if [ -d $(INSTALLDIR) ] ; then \
- install -c -s -m 644 gkrellfire.so $(INSTALLDIR) ; \
- else \
- install -D -c -s -m 644 gkrellfire.so $(INSTALLDIR)/gkrellfire.so ; \
- fi
-
-uninstall:
- rm -f $(INSTALLDIR)/gkrellfire.so
+ rm -f gkrellfire.*o
--
2.7.3
|