summaryrefslogtreecommitdiff
blob: 0d1e25ec9659335db1c855bfdabec8e8c5982138 (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
 Makefile | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/Makefile b/Makefile
index 9c4b69b..cf8958d 100644
--- a/Makefile
+++ b/Makefile
@@ -1,8 +1,9 @@
 ARCHIV := spu-tools.tar.gz
 
-CC = gcc
-CFLAGS = -g -Wall
+CC ?= gcc
+CFLAGS ?= -g -Wall
 PREFIX = $(DESTDIR)/usr
+LIBS ?= -lncurses
 
 objs = ctx-info.o spu-info.o proc-info.o general-info.o spu-top.o spu-ps.o
 target = spu-top spu-ps
@@ -16,10 +17,10 @@ spu-top.o: spu-top.c spu-tools.h
 spu-ps.o: spu-ps.c spu-tools.h
 
 spu-top: ctx-info.o spu-info.o proc-info.o general-info.o spu-top.o
-	$(CC) $(CFLAGS) -lncurses ctx-info.o spu-info.o proc-info.o general-info.o spu-top.o -o spu-top
+	$(CC) $(CFLAGS) $(LDFLAGS) ctx-info.o spu-info.o proc-info.o general-info.o spu-top.o -o spu-top $(LIBS)
 
 spu-ps: ctx-info.o spu-ps.o
-	$(CC) $(CFLAGS) ctx-info.o spu-ps.o -o spu-ps
+	$(CC) $(CFLAGS) $(LDFLAGS) ctx-info.o spu-ps.o -o spu-ps
 
 clean:
 	@rm -Rf *.o *~ $(objs) $(target) spu-top.1 spu-ps.1