summaryrefslogtreecommitdiff
blob: 39852204b78f9a27da6c0432a8d505585fd96e38 (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
--- Makefile
+++ Makefile
@@ -10,16 +10,16 @@
 MANDIR=/usr/share/man/man8
 CC?=gcc
 
-CFLAGS := -O2 -g -fstack-protector -D_FORTIFY_SOURCE=2 -Wall -W -Wstrict-prototypes -Wundef -fno-common -Werror-implicit-function-declaration -Wdeclaration-after-statement
+CFLAGS ?= -O2 -g -fstack-protector -D_FORTIFY_SOURCE=2 -Wall -W -Wstrict-prototypes -Wundef -fno-common -Werror-implicit-function-declaration -Wdeclaration-after-statement
 
-MY_CFLAGS := `pkg-config --cflags libnotify gtk+-2.0`
+MY_CFLAGS := `pkg-config --cflags dbus-glib-1 libnotify gtk+-2.0`
 #
 # pkg-config tends to make programs pull in a ton of libraries, not all 
 # are needed. -Wl,--as-needed tells the linker to just drop unused ones,
 # and that makes the applet load faster and use less memory.
 #
-LDF_A := -Wl,--as-needed `pkg-config --libs libnotify gtk+-2.0`
-LDF_D := -Wl,--as-needed `pkg-config --libs glib-2.0 dbus-glib-1` `curl-config --libs` -Wl,"-z relro" -Wl,"-z now" 
+LIBSA := `pkg-config --libs dbus-glib-1 libnotify gtk+-2.0`
+LIBSD := `pkg-config --libs glib-2.0 dbus-glib-1` `curl-config --libs` 
 
 all:	kerneloops kerneloops-applet kerneloops.8.gz
 
@@ -30,11 +30,11 @@
  
 
 kerneloops:	kerneloops.o submit.o dmesg.o configfile.o kerneloops.h
-	gcc kerneloops.o submit.o dmesg.o configfile.o $(LDF_D) -o kerneloops
+	$(CC) $(LDFLAGS) kerneloops.o submit.o dmesg.o configfile.o -o kerneloops $(LIBSD)
 	@(cd po/ && $(MAKE))
 
 kerneloops-applet: kerneloops-applet.o
-	gcc kerneloops-applet.o $(LDF_A)-o kerneloops-applet
+	$(CC) $(LDFLAGS) kerneloops-applet.o -o kerneloops-applet $(LIBSA)
 
 kerneloops.8.gz: kerneloops.8
 	gzip -9 -c $< > $@