Rewrite Makefile #2

Merged
tvrdosrz merged 1 commit from master into master 2021-05-12 18:58:43 +02:00
Showing only changes of commit ab81287e27 - Show all commits

View file

@ -1,11 +1,22 @@
all:
gcc -lm fetchy.c -o /bin/fetchy
PREFIX = /usr/local
CC = gcc
CFLAGS = -lm
all: fetchy
fetchy:
$(CC) $(CFLAGS) fetchy.c -o $@
clean:
rm fetchy
-rm -f fetchy
install:
gcc -lm fetchy.c -o /bin/fetchy
install: all
mkdir -p $(PREFIX)/bin
cp -f fetchy $(PREFIX)/bin
chmod 755 $(PREFIX)/bin/fetchy
uninstall:
rm /bin/fetchy
-rm -f $(PREFIX)/bin/fetchy
.PHONY: all install uninstall clean