freq

unnamed repository
Log | Files | Refs

commit d5a2646377301d4a00a76bd46f3b0da09183a452
parent d1099db7a31d99400512c99357b0584e7bf445ce
Author: phoebos <ben@bvnf.space>
Date:   Mon, 21 Mar 2022 19:03:45 +0000

add clean and install targets to Makefile

Diffstat:
MMakefile | 14++++++++++++++
1 file changed, 14 insertions(+), 0 deletions(-)

diff --git a/Makefile b/Makefile @@ -1,6 +1,20 @@ .POSIX: XCFLAGS = $(CFLAGS) -Wall -Wextra -pedantic -Og -g -D_XOPEN_SOURCE=700 +PREFIX = /usr/local +MANPATH = $(PREFIX)/share/man +all: freq freq: freq.c $(CC) $(XCFLAGS) freq.c -o $@ + +clean: + rm -f freq + +install: freq + mkdir -p $(DESTDIR)$(PREFIX)/bin/ + mkdir -p $(DESTDIR)$(MANPATH)/man1/ + cp freq $(DESTDIR)$(PREFIX)/bin/freq + cp freq.1 $(DESTDIR)$(MANPATH)/man1/freq.1 + +.PHONY: clean install