![Петар Каприш](/assets/img/avatar_default.png)
The Makefile was rewritten in a more usual fashion, using make variables and prerequisites in the expected manner. The install destination was changed from /bin to the more typical /usr/local/bin. When this program is packaged, this destination should be changed to /usr/bin, since packaged programs are usually meant to be in this directory, they could be overwritten with a call such as: make PREFIX=/usr install
23 lines
296 B
Makefile
23 lines
296 B
Makefile
PREFIX = /usr/local
|
|
|
|
CC = gcc
|
|
CFLAGS = -lm
|
|
|
|
all: fetchy
|
|
|
|
fetchy:
|
|
$(CC) $(CFLAGS) fetchy.c -o $@
|
|
|
|
clean:
|
|
-rm -f fetchy
|
|
|
|
install: all
|
|
mkdir -p $(PREFIX)/bin
|
|
cp -f fetchy $(PREFIX)/bin
|
|
chmod 755 $(PREFIX)/bin/fetchy
|
|
|
|
uninstall:
|
|
-rm -f $(PREFIX)/bin/fetchy
|
|
|
|
.PHONY: all install uninstall clean
|