Skip to content

Commit

Permalink
update makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
jovanlanik committed May 18, 2022
1 parent f91c57b commit 3a3e5ff
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
1 change: 1 addition & 0 deletions gtklock.pam
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
auth include login
18 changes: 8 additions & 10 deletions makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,30 +4,28 @@
# Makefile

NAME := gtklock
PREFIX ?= /usr/local

LIBS := pam gtk+-3.0 gtk-layer-shell-0 wayland-client
CFLAGS += -std=c11 $(shell pkg-config --cflags $(LIBS))
LDFLAGS += $(shell pkg-config --libs $(LIBS))

ifndef NDEBUG
NDEBUG := 0
endif

ifeq '$(NDEBUG)' '1'
CFLAGS += -DNDEBUG -O2
LDFLAGS += -Wl,-S
endif

SRC = $(wildcard *.c)
OBJ = wlr-input-inhibitor-unstable-v1-client-protocol.o $(SRC:%.c=%.o)

TRASH = $(OBJ) $(NAME) $(wildcard *-client-protocol.h) $(wildcard *-client-protocol.c)

.PHONY: all clean
.PHONY: all clean install uninstall

all: $(NAME)
clean:
@rm $(TRASH) | true
install:
install $(NAME) $(DESTDIR)$(PREFIX)/bin/$(NAME)
install -m 644 $(NAME).pam $(DESTDIR)/etc/pam.d/$(NAME)
uninstall:
rm -f $(DESTDIR)$(PREFIX)/bin/$(NAME)
rm -f $(DESTDIR)/etc/pam.d/$(NAME)
$(NAME): wlr-input-inhibitor-unstable-v1-client-protocol.h $(OBJ)
$(CC) $(LDFLAGS) $(OBJ) -o $@
%-client-protocol.c: %.xml
Expand Down

0 comments on commit 3a3e5ff

Please sign in to comment.