summaryrefslogtreecommitdiff
blob: bcfef8b8f824cc093cbfce508d4736fe435d9188 (plain)
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
--- a/Makefile
+++ b/Makefile
@@ -3,11 +3,10 @@
 #
 # updated for gkrellm2.0
 
-CC = gcc
-CFLAGS = -c -O -Wall -fPIC `${EXTRACONF}`
+CC = $(CC)
+INCLUDE = -c -fPIC `${EXTRACONF}`
 
-LD = $(CC)
-LDFLAGS = -shared -Wl -o
+LDFLAGS = $(LDFLAGS)
 INCPATH  = -I.
 INCPATH += ${GKRELL_INC}
 
@@ -25,10 +24,10 @@
 	(make GKRELL_INC=-DGKRELLM EXTRACONF="gtk-config --cflags;imlib-config --cflags-gdk" ${TARGET})
 
 gkrellm2:
-	(make GKRELL_INC=-DGKRELLM2 EXTRACONF="pkg-config --cflags gtk+-2.0 gthread-2.0" ${TARGET})
+	($(MAKE) GKRELL_INC=-DGKRELLM2 EXTRACONF="pkg-config --cflags gtk+-2.0 gthread-2.0" ${TARGET})
 
 ${TARGET}:	${OBJS}
-		${LD} ${DEBUG} ${LDFLAGS} ${TARGET} ${OBJS}
+		${CC} -shared ${LDFLAGS} ${CFLAGS} -o ${TARGET} ${OBJS} 
 
 clean:
 	rm -f ${OBJS}
@@ -47,5 +46,5 @@
 	./install-sub.sh	${TARGET} gkrellm2
 
 %.o :	%.c
-	${CC} ${CFLAGS} $(INCPATH) -o $@ $<
+	${CC} ${CFLAGS} $(INCLUDE) ${LDFLAGS} $(INCPATH) -o $@ $<