new makefile
This commit is contained in:
parent
27581edf32
commit
58884c9928
1 changed files with 7 additions and 13 deletions
20
Makefile
20
Makefile
|
@ -3,22 +3,16 @@ CFLAGS = -Wall -Wextra -pedantic -I/usr/X11R6/include -L/usr/X11R6/lib -lX11 -lX
|
||||||
PREFIX ?= /usr/local
|
PREFIX ?= /usr/local
|
||||||
CC ?= cc
|
CC ?= cc
|
||||||
|
|
||||||
all: herbe
|
compile:
|
||||||
|
|
||||||
config.h: config.def.h
|
|
||||||
cp config.def.h config.h
|
cp config.def.h config.h
|
||||||
|
|
||||||
herbe: herbe.c config.h
|
|
||||||
$(CC) herbe.c $(CFLAGS) -o herbe
|
$(CC) herbe.c $(CFLAGS) -o herbe
|
||||||
|
|
||||||
install: herbe
|
install: compile
|
||||||
mkdir -p ${DESTDIR}${PREFIX}/bin
|
mkdir -p ~/bin
|
||||||
cp -f herbe ${DESTDIR}${PREFIX}/bin
|
cp -f herbe ~/bin
|
||||||
|
chmod +x ~/bin/herbe
|
||||||
|
|
||||||
uninstall:
|
uninstall:
|
||||||
rm -f ${DESTDIR}${PREFIX}/bin/herbe
|
rm -f ~/bin/herbe
|
||||||
|
|
||||||
clean:
|
.PHONY: compile install uninstall
|
||||||
rm -f herbe
|
|
||||||
|
|
||||||
.PHONY: all install uninstall clean
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue