puer/Makefile

32 lines
479 B
Makefile
Raw Permalink Normal View History

2021-04-04 23:16:58 +00:00
DESTDIR ?=
PREFIX ?= /usr/local
EXEC_PREFIX ?= $(PREFIX)
BINDIR ?= $(EXEC_PREFIX)/bin
2021-04-09 20:13:31 +00:00
CFLAGS ?= -std=gnu11 -Os -Wall -Wextra -pedantic
2021-04-04 23:16:58 +00:00
.SUFFIXES:
.SUFFIXES: .c .o
2021-04-08 19:45:08 +00:00
all: puer
2021-04-04 23:16:58 +00:00
puer: puer.o
$(CC) $(LDFLAGS) -o $@ $<
.c.o:
$(CC) -c $(CFLAGS) $(CPPFLAGS) -o $@ $<
clean:
rm -f puer *.o
distclean: clean
2021-04-09 20:13:31 +00:00
install: puer
install -D -m 775 -t '$(DESTDIR)$(BINDIR)' puer
uninstall:
cd $(DESTDIR)$(BINDIR) && rm puer
.PHONY: all clean distclean install uninstall
2021-04-04 23:16:58 +00:00
.DEFAULT: all