-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
78 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
From cb1a6ad9a2d17ae908e94a87ff8e6fa24c2f0ceb Mon Sep 17 00:00:00 2001 | ||
From: =?UTF-8?q?Andr=C3=A9=20Cerqueira?= <acerqueira021@gmail.com> | ||
Date: Mon, 25 Jul 2022 08:49:39 +0100 | ||
Subject: [PATCH 1/1] b | ||
|
||
--- | ||
Makefile | 36 +++++++++++------------------------- | ||
1 file changed, 11 insertions(+), 25 deletions(-) | ||
|
||
diff --git a/Makefile b/Makefile | ||
index a50c609..9d5b712 100644 | ||
--- a/Makefile | ||
+++ b/Makefile | ||
@@ -3,47 +3,33 @@ | ||
NAME = batsignal | ||
VERSION != grep VERSION version.h | cut -d \" -f2 | ||
|
||
-CC = cc | ||
-RM = rm -f | ||
-INSTALL = install | ||
-SED = sed | ||
- | ||
PREFIX = /usr/local | ||
|
||
-MANPREFIX.$(PREFIX)=$(PREFIX)/share/man | ||
-MANPREFIX./usr/local=/usr/local/man | ||
-MANPREFIX.=/usr/share/man | ||
-MANPREFIX=$(MANPREFIX.$(PREFIX)) | ||
- | ||
-INCLUDES != pkg-config --cflags libnotify | ||
-CFLAGS_EXTRA = -pedantic -Wall -Wextra -Werror -Wno-unused-parameter -Os | ||
-CFLAGS := $(CFLAGS_EXTRA) -std=c11 $(INCLUDES) | ||
+MANPREFIX = $(PREFIX)/share/man | ||
|
||
-LIBS != pkg-config --libs libnotify | ||
-LIBS := $(LIBS) -lm | ||
-LDFLAGS_EXTRA = -s | ||
-LDFLAGS := $(LIBS) $(LDFLAGS_EXTRA) | ||
+CFLAGS_EXTRA = -pedantic -Wall -Wextra -Werror -Wno-unused-parameter -Os -s | ||
+CFLAGS := $(CFLAGS_EXTRA) $(CFLAGS) -std=c99 $(shell pkg-config --cflags libnotify) | ||
+LDFLAGS := $(LDFLAGS) -lm $(shell pkg-config --libs libnotify) | ||
|
||
all: $(NAME) $(NAME).1 | ||
|
||
$(NAME).o: version.h | ||
|
||
$(NAME): $(NAME).o | ||
- $(CC) -o $(NAME) $(NAME).o $(LDFLAGS) | ||
|
||
$(NAME).1: $(NAME).1.in version.h | ||
- $(SED) "s/VERSION/$(VERSION)/g" < $(NAME).1.in > $@ | ||
+ sed "s/VERSION/$(VERSION)/g" < $(NAME).1.in > $@ | ||
|
||
install: all | ||
@echo Installing in $(DESTDIR)$(PREFIX) | ||
- $(INSTALL) -d $(DESTDIR)$(PREFIX)/bin | ||
- $(INSTALL) -d $(DESTDIR)$(MANPREFIX)/man1 | ||
- $(INSTALL) -m 0755 $(NAME) $(DESTDIR)$(PREFIX)/bin/ | ||
- $(INSTALL) -m 0644 $(NAME).1 $(DESTDIR)$(MANPREFIX)/man1/ | ||
+ install -d $(DESTDIR)$(PREFIX)/bin | ||
+ install -d $(DESTDIR)$(MANPREFIX)/man1 | ||
+ install -m 0755 $(NAME) $(DESTDIR)$(PREFIX)/bin/ | ||
+ install -m 0644 $(NAME).1 $(DESTDIR)$(MANPREFIX)/man1/ | ||
|
||
install-service: install | ||
- $(INSTALL) -d $(DESTDIR)$(PREFIX)/lib/systemd/user | ||
- $(INSTALL) -m 0644 $(NAME).service $(DESTDIR)$(PREFIX)/lib/systemd/user/ | ||
+ install -d $(DESTDIR)$(PREFIX)/lib/systemd/user | ||
+ install -m 0644 $(NAME).service $(DESTDIR)$(PREFIX)/lib/systemd/user/ | ||
|
||
uninstall: | ||
@echo Removing files from $(DESTDIR)$(PREFIX) | ||
-- | ||
2.37.1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters