blob: 2f060a7e60e542be40f0922720f345e9181787c3 (
plain)
1 #@ Makefile for pam_xdg(8).
2
3 PREFIX = /
4 MANPREFIX = /usr
5 DESTDIR =
6 LIBDIR = $(DESTDIR)$(PREFIX)/lib/security
7 MANDIR = $(DESTDIR)$(MANPREFIX)/share/man/man8
8 NAME = pam_xdg
9
10 CC = cc
11 CFLAGS = -DNDEBUG \
12 -O2 -W -Wall -Wextra -pedantic \
13 -Wno-uninitialized -Wno-unused-result -Wno-unused-value \
14 -fno-asynchronous-unwind-tables -fno-unwind-tables \
15 -fno-common \
16 -fstrict-aliasing -fstrict-overflow \
17 -fstack-protector-strong -D_FORTIFY_SOURCE=2 -fPIE
18 LDFLAGS = -Wl,-z,relro -Wl,-z,now -Wl,-z,noexecstack -Wl,--as-needed \
19 -Wl,--enable-new-dtags -pie -shared
20 INSTALL = install
21 RM = rm
22
23 .PHONY: all clean distclean install uninstall
24 all: $(NAME).so
25
26 $(NAME).so: $(NAME).c
27 $(CC) $(CFLAGS) $(LDFLAGS) -o $(@) $(?)
28
29 clean:
30 $(RM) -f $(NAME).so
31
32 distclean: clean
33
34 install: all
35 $(INSTALL) -D -m 0755 $(NAME).so $(LIBDIR)/$(NAME).so
36 $(INSTALL) -D -m 0644 $(NAME).8 $(MANDIR)/$(NAME).8
37
38 uninstall:
39 $(RM) -f $(LIBDIR)/$(NAME).so $(MANDIR)/$(NAME).8
40
41 # s-mk-mode
|