From 195bfa0749997706198dc36e38614eb2693c17d9 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Thu, 16 Sep 2021 18:49:42 +0200 Subject: Improve makefile + m style fix + fix warnings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- Makefile | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 54a0a31..df9d73f 100644 --- a/Makefile +++ b/Makefile @@ -3,28 +3,28 @@ CONFIGFILE = config.mk include $(CONFIGFILE) + all: unstickpixels +unstickpixels.o: unstickpixels.c arg.h -unstickpixels: unstickpixels.o - $(CC) -o $@ unstickpixels.o $(LDFLAGS) +.c.o: + $(CC) -c -o $@ $< $(CFLAGS) $(CPPFLAGS) -unstickpixels.o: unstickpixels.c arg.h +.o: + $(CC) -o $@ $< $(LDFLAGS) install: unstickpixels mkdir -p -- "$(DESTDIR)$(PREFIX)/bin/" mkdir -p -- "$(DESTDIR)$(MANPREFIX)/man1/" - mkdir -p -- "$(DESTDIR)$(PREFIX)/share/licenses/unstickpixels" cp -- unstickpixels "$(DESTDIR)$(PREFIX)/bin/" cp -- unstickpixels.1 "$(DESTDIR)$(MANPREFIX)/man1/" - cp -- LICENSE "$(DESTDIR)$(PREFIX)/share/licenses/unstickpixels" uninstall: -rm -f -- "$(DESTDIR)$(PREFIX)/bin/unstickpixels" -rm -f -- "$(DESTDIR)$(MANPREFIX)/man1/unstickpixels.1" - -rm -rf -- "$(DESTDIR)$(PREFIX)/share/licenses/unstickpixels" clean: - -rm -f -- unstickpixels *.o + -rm -f -- unstickpixels *.o *.su .SUFFIXES: .SUFFIXES: .o .c -- cgit v1.2.3-70-g09d2