change login detection to `true'
[tlock.git] / Makefile
blobe1fc944ef15329c6561b9d3f1499d98e0301d4ce
1 .SUFFIXES:
2 .SUFFIXES: .o .c
4 CFLAGS ?=
5 LDFLAGS ?=
7 PREFIX ?= /usr
8 BINDIR ?= $(PREFIX)/bin
9 SHAREDIR ?= $(PREFIX)/share
10 MANDIR ?= $(PREFIX)/share/man
12 CFLAGS += -std=c99 -D_POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE=1
14 # Debug
15 CFLAGS += -pedantic -Wall -Wextra -Werror
17 PROG = tlock
19 default: $(PROG)
21 $(PROG): tlock.o
22 $(CC) -o $@ $^ $(LDFLAGS)
24 %.o: %.c macros.h
25 $(CC) $(CFLAGS) -c -o $@ $<
27 .PHONY: clean
28 clean:
29 find -name '*.o' -delete
30 rm -f $(PROG)
32 .PHONY: install
33 install: $(PROG)
34 mkdir -p $(DESTDIR)$(BINDIR)
35 cp -f $(PROG) $(DESTDIR)$(BINDIR)/
36 mkdir -p $(DESTDIR)$(MANDIR)
37 cp -f $(PROG).1 $(DESTDIR)$(MANDIR)/
39 .PHONY: uninstall
40 uninstall:
41 cd $(DESTDIR)$(BINDIR) && rm -f $(PROG)
42 cd $(DESTDIR)$(MANDIR) && rm -f $(PROG).1