new makefile

This commit is contained in:
Umgeher Torgersen 2022-10-04 18:22:32 +00:00
parent 27581edf32
commit 58884c9928

View file

@ -3,22 +3,16 @@ CFLAGS = -Wall -Wextra -pedantic -I/usr/X11R6/include -L/usr/X11R6/lib -lX11 -lX
PREFIX ?= /usr/local
CC ?= cc
all: herbe
config.h: config.def.h
compile:
cp config.def.h config.h
herbe: herbe.c config.h
$(CC) herbe.c $(CFLAGS) -o herbe
install: herbe
mkdir -p ${DESTDIR}${PREFIX}/bin
cp -f herbe ${DESTDIR}${PREFIX}/bin
install: compile
mkdir -p ~/bin
cp -f herbe ~/bin
chmod +x ~/bin/herbe
uninstall:
rm -f ${DESTDIR}${PREFIX}/bin/herbe
rm -f ~/bin/herbe
clean:
rm -f herbe
.PHONY: all install uninstall clean
.PHONY: compile install uninstall