about summary refs log tree commit diff
path: root/Makefile
diff options
context:
space:
mode:
authorNakidai <nakidai@disroot.org>2024-11-24 17:28:03 +0300
committerNakidai <nakidai@disroot.org>2024-11-24 17:28:03 +0300
commitebedf7a6c7487e9845ae36d55e6b5c461a243d0c (patch)
treeab647bfd76a486918164a3e292361abf601db323 /Makefile
parent366e82eda8ca21af78334e046eefa2846542aa63 (diff)
downloadlibhttpc-ebedf7a6c7487e9845ae36d55e6b5c461a243d0c.tar.gz
libhttpc-ebedf7a6c7487e9845ae36d55e6b5c461a243d0c.zip
Add install & uninstall recipies
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile12
1 files changed, 12 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 0da4d45..86265ce 100644
--- a/Makefile
+++ b/Makefile
@@ -1,3 +1,5 @@
+include config.mk
+
 OBJS += obj/header.o
 OBJS += obj/libhttpc.o
 OBJS += obj/malloc.o
@@ -24,5 +26,15 @@ libhttpc.so:
 libhttpc.a:
 	ar rcs $@ $^
 
+install: all
+	install -d $(DESTDIR)/lib
+	install -m644 libhttpc.a $(DESTDIR)/lib
+	install -m755 libhttpc.so $(DESTDIR)/lib
+	install -m644 include/libhttpc.h $(DESTDIR)/include
+
+uninstall:
+	$(RM) $(DESTDIR)/lib/libhttpc.{a,so}
+	$(RM) $(DESTDIR)/include/libhttpc.h
+
 clean:
 	rm -f ${OBJS} libhttpc.a libhttpc.so