From e2a4445825c6c221f66c0995de87a2a4c2ebd749 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Thu, 16 Sep 2021 16:24:43 +0200 Subject: Improve makefile + m whitespace fix MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- Makefile | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 15dc151..d57a21c 100644 --- a/Makefile +++ b/Makefile @@ -3,13 +3,11 @@ CONFIGFILE = config.mk include $(CONFIGFILE) -all: exec-as test -exec-as: exec-as.o - $(CC) -o $@ exec-as.o $(LDFLAGS) +all: exec-as test -test: test.o - $(CC) -o $@ test.o $(LDFLAGS) +.o: + $(CC) -o $@ $< $(LDFLAGS) .c.o: $(CC) -c -o $@ $< $(CFLAGS) $(CPPFLAGS) @@ -18,21 +16,18 @@ check: exec-as test test "$$(./exec-as ./test)" = "" test "$$(./exec-as ./test 1 2 3)" = "1,3" -install: +install: exec-as mkdir -p -- "$(DESTDIR)$(PREFIX)/bin" mkdir -p -- "$(DESTDIR)$(MANPREFIX)/man1" - mkdir -p -- "$(DESTDIR)$(PREFIX)/share/licenses/exec-as" cp -- exec-as "$(DESTDIR)$(PREFIX)/bin/" cp -- exec-as.1 "$(DESTDIR)$(MANPREFIX)/man1/" - cp -- LICENSE "$(DESTDIR)$(PREFIX)/share/licenses/exec-as/" uninstall: -rm -f -- "$(DESTDIR)$(PREFIX)/bin/exec-as" -rm -f -- "$(DESTDIR)$(MANPREFIX)/man1/exec-as.1" - -rm -rf -- "$(DESTDIR)$(PREFIX)/share/licenses/exec-as" clean: - -rm -f -- exec-as test *.o + -rm -f -- exec-as test *.o *.su .SUFFIXES: .SUFFIXES: .o .c -- cgit v1.2.3-70-g09d2