aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorXavier Del Campo Romero <xavi.dcr@tutanota.com>2023-09-26 23:47:06 +0200
committerXavier Del Campo Romero <xavi.dcr@tutanota.com>2023-09-27 01:05:04 +0200
commit93153289831a5e67f13488054410a20558719d41 (patch)
tree24f2f58c2724fa18224458d5eaada3958eb4902a /Makefile
parent8b39bc5db98c252269fe526a8c411bf245770ba2 (diff)
downloadlibweb-93153289831a5e67f13488054410a20558719d41.tar.gz
Makefile, CMakeLists.txt: Add installation targets
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile10
1 files changed, 10 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index c9a29e8..283c005 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,8 @@
.POSIX:
PROJECT = libslweb.a
+PREFIX = /usr/local
+DST = $(PREFIX)/lib
O = -Og
CDEFS = -D_FILE_OFFSET_BITS=64 # Required for large file support on 32-bit.
CFLAGS = $(O) $(CDEFS) -g -Iinclude -Idynstr/include -MD -MF $(@:.o=.d)
@@ -14,6 +16,14 @@ OBJECTS = \
all: $(PROJECT)
+install: all
+ mkdir -p $(PREFIX)/include
+ cp -R include/slweb $(PREFIX)/include
+ chmod 0644 $(PREFIX)/include/slweb/*.h
+ mkdir -p $(DST)
+ cp $(PROJECT) $(DST)
+ chmod 0755 $(DST)/$(PROJECT)
+
clean:
rm -f $(OBJECTS) $(DEPS)
+cd examples && $(MAKE) clean