commit 72a537dfc9aa27e78dbede42ff397208d09ac233 parent c24462e068a3181a57e4f0126700fbf1c3c9ba0c Author: aabacchus <ben@bvnf.space> Date: Sat, 2 Oct 2021 21:45:48 +0100 add install target Diffstat:
M | Makefile | | | 11 | ++++++++++- |
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/Makefile b/Makefile @@ -1,5 +1,7 @@ .POSIX: + XCFLAGS = $(CFLAGS) -Wall -Wextra -Wpedantic -Og -ggdb3 -D_XOPEN_SOURCE=600 +PREFIX = /usr/local OBJS = libcsv.o @@ -13,7 +15,14 @@ $(OBJS:.o=.c): csv.h libcsv.a: $(OBJS) $(AR) -rcs $@ $(OBJS) +install: libcsv.a csv.h + mkdir -p \ + $(DESTDIR)$(PREFIX)/lib \ + $(DESTDIR)$(PREFIX)/include + cp libcsv.a $(DESTDIR)$(PREFIX)/lib/ + cp csv.h $(DESTDIR)$(PREFIX)/include/ + clean: rm -f $(OBJS) libcsv.a -.PHONY: clean +.PHONY: clean install