diff options
Diffstat (limited to 'src/prog.mk')
-rw-r--r-- | src/prog.mk | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/prog.mk b/src/prog.mk index 84f43142d..b2ccf6147 100644 --- a/src/prog.mk +++ b/src/prog.mk | |||
@@ -9,25 +9,26 @@ HDRS := $(sort $(wildcard *.h)) $(MOD_HDRS) | |||
9 | SRCS := $(sort $(wildcard *.c)) $(MOD_SRCS) | 9 | SRCS := $(sort $(wildcard *.c)) $(MOD_SRCS) |
10 | OBJS := $(SRCS:.c=.o) $(MOD_OBJS) | 10 | OBJS := $(SRCS:.c=.o) $(MOD_OBJS) |
11 | 11 | ||
12 | CFLAGS += \ | 12 | PROG_CFLAGS = \ |
13 | -ggdb $(HAVE_FATAL_WARNINGS) -O2 -DVERSION='"$(VERSION)"' \ | 13 | -ggdb $(HAVE_FATAL_WARNINGS) -O2 -DVERSION='"$(VERSION)"' \ |
14 | -fstack-protector-all -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security \ | 14 | -fstack-protector-all -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security \ |
15 | -fPIE \ | 15 | -fPIE \ |
16 | -DPREFIX='"$(prefix)"' -DSYSCONFDIR='"$(sysconfdir)/firejail"' \ | 16 | -DPREFIX='"$(prefix)"' -DSYSCONFDIR='"$(sysconfdir)/firejail"' \ |
17 | -DLIBDIR='"$(libdir)"' -DBINDIR='"$(bindir)"' \ | 17 | -DLIBDIR='"$(libdir)"' -DBINDIR='"$(bindir)"' \ |
18 | -DVARDIR='"/var/lib/firejail"' \ | 18 | -DVARDIR='"/var/lib/firejail"' \ |
19 | $(HAVE_GCOV) $(MANFLAGS) | 19 | $(HAVE_GCOV) $(MANFLAGS) \ |
20 | $(EXTRA_CFLAGS) | ||
20 | 21 | ||
21 | LDFLAGS += -pie -fPIE -Wl,-z,relro -Wl,-z,now | 22 | PROG_LDFLAGS = -pie -fPIE -Wl,-z,relro -Wl,-z,now $(EXTRA_LDFLAGS) |
22 | 23 | ||
23 | .PHONY: all | 24 | .PHONY: all |
24 | all: $(TARGET) | 25 | all: $(TARGET) |
25 | 26 | ||
26 | %.o : %.c $(HDRS) $(ROOT)/config.mk | 27 | %.o : %.c $(HDRS) $(ROOT)/config.mk |
27 | $(CC) $(CFLAGS) $(EXTRA_CFLAGS) $(INCLUDE) -c $< -o $@ | 28 | $(CC) $(PROG_CFLAGS) $(CFLAGS) $(INCLUDE) -c $< -o $@ |
28 | 29 | ||
29 | $(PROG): $(OBJS) $(ROOT)/config.mk | 30 | $(PROG): $(OBJS) $(ROOT)/config.mk |
30 | $(CC) $(LDFLAGS) -o $@ $(OBJS) $(LIBS) $(EXTRA_LDFLAGS) | 31 | $(CC) $(PROG_LDFLAGS) $(LDFLAGS) -o $@ $(OBJS) $(LIBS) |
31 | 32 | ||
32 | .PHONY: clean | 33 | .PHONY: clean |
33 | clean:; rm -fr *.o $(PROG) *.gcov *.gcda *.gcno *.plist $(TOCLEAN) | 34 | clean:; rm -fr *.o $(PROG) *.gcov *.gcda *.gcno *.plist $(TOCLEAN) |