Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 276412 | Differences between
and this patch

Collapse All | Expand All

(-)a/Makefile (-8 / +19 lines)
Lines 10-40 LOCALESDIR=/usr/share/locale Link Here
10
MANDIR=/usr/share/man/man8
10
MANDIR=/usr/share/man/man8
11
CC?=gcc
11
CC?=gcc
12
12
13
CFLAGS := -O2 -g -fstack-protector -D_FORTIFY_SOURCE=2 -Wall -W -Wstrict-prototypes -Wundef -fno-common -Werror-implicit-function-declaration -Wdeclaration-after-statement -Wformat -Wformat-security -Werror=format-security
13
CFLAGS += -O2 -g -fstack-protector -D_FORTIFY_SOURCE=2 -Wall -W -Wstrict-prototypes -Wundef -fno-common -Werror-implicit-function-declaration -Wdeclaration-after-statement -Wformat -Wformat-security -Werror=format-security
14
15
#
16
# As the daemon does not need the applet, and does not need gtk+ or libnotify
17
# lets seperate the CFLAGS and LDFLAGS so they only get what they need.
18
#
19
A_CFLAGS := `pkg-config --cflags libnotify gtk+-2.0`
20
D_CFLAGS := `pkg-config --cflags glib-2.0 dbus-glib-1`
21
A_LDFLAGS := `pkg-config --libs libnotify gtk+-2.0`
22
D_LDFLAGS := `pkg-config --libs glib-2.0 dbus-glib-1` `curl-config --libs` -Wl,"-z relro" -Wl,"-z now" 
14
23
15
MY_CFLAGS := `pkg-config --cflags libnotify gtk+-2.0`
16
#
24
#
17
# pkg-config tends to make programs pull in a ton of libraries, not all 
25
# pkg-config tends to make programs pull in a ton of libraries, not all 
18
# are needed. -Wl,--as-needed tells the linker to just drop unused ones,
26
# are needed. -Wl,--as-needed tells the linker to just drop unused ones,
19
# and that makes the applet load faster and use less memory.
27
# and that makes the applet load faster and use less memory.
20
#
28
#
21
LDF_A := -Wl,--as-needed `pkg-config --libs libnotify gtk+-2.0`
29
LDFLAGS += -Wl,--as-needed
22
LDF_D := -Wl,--as-needed `pkg-config --libs glib-2.0 dbus-glib-1` `curl-config --libs` -Wl,"-z relro" -Wl,"-z now" 
30
23
31
24
all:	kerneloops kerneloops-applet kerneloops.8.gz
32
all:	kerneloops kerneloops-applet kerneloops.8.gz
25
33
26
noui:	kerneloops kerneloops.8.gz
34
noui:	kerneloops kerneloops.8.gz
27
35
28
.c.o:
36
.c.o:
29
	$(CC) $(CFLAGS) $(MY_CFLAGS) -c -o $@ $<
37
	$(CC) $(CFLAGS) -c -o $@ $<
30
 
38
 
31
39
40
kerneloops:	CFLAGS += $(D_CFLAGS)
41
kerneloops:	LDFLAGS += $(D_LDFLAGS)
32
kerneloops:	kerneloops.o submit.o dmesg.o configfile.o kerneloops.h
42
kerneloops:	kerneloops.o submit.o dmesg.o configfile.o kerneloops.h
33
	gcc kerneloops.o submit.o dmesg.o configfile.o $(LDF_D) -o kerneloops
43
	$(CC) kerneloops.o submit.o dmesg.o configfile.o $(CFLAGS) $(LDFLAGS) -o kerneloops
34
	@(cd po/ && $(MAKE))
44
	@(cd po/ && $(MAKE))
35
45
46
kerneloops-applet:	CFLAGS += $(A_CFLAGS)
47
kerneloops-applet:	LDFLAGS += $(A_LDFLAGS)
36
kerneloops-applet: kerneloops-applet.o
48
kerneloops-applet: kerneloops-applet.o
37
	gcc kerneloops-applet.o $(LDF_A)-o kerneloops-applet
49
	$(CC) kerneloops-applet.o $(CFLAGS) $(LDFLAGS) -o kerneloops-applet
38
50
39
kerneloops.8.gz: kerneloops.8
51
kerneloops.8.gz: kerneloops.8
40
	gzip -9 -c $< > $@
52
	gzip -9 -c $< > $@
41
- 

Return to bug 276412