aboutsummaryrefslogtreecommitdiffstats
path: root/l4darr/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'l4darr/Makefile')
-rw-r--r--l4darr/Makefile13
1 files changed, 11 insertions, 2 deletions
diff --git a/l4darr/Makefile b/l4darr/Makefile
index 3bc40c7..6aa5428 100644
--- a/l4darr/Makefile
+++ b/l4darr/Makefile
@@ -1,9 +1,13 @@
CC=cc
AR=ar
-RM=rm
+RM=rm -f
+INSTALL=install -m 644
CFLAGS=-Wall -g -I.
OBJ=d1array.o d1arrstr.o d2array.o
LIBFILE=libl4darr.a
+DESTDIR=/
+PREFIX=/usr/local
+LIBDIR=$(DESTDIR)/$(PREFIX)/lib
.PHONY: all clean
@@ -11,4 +15,9 @@ all: $(LIBFILE)
$(LIBFILE): $(OBJ)
$(AR) rcs $(LIBFILE) $(OBJ)
clean:
- $(RM) -f $(LIBFILE) $(OBJ)
+ $(RM) $(LIBFILE) $(OBJ)
+install:
+ mkdir -p $(LIBDIR)
+ $(INSTALL) -c $(LIBFILE) $(LIBDIR)
+uninstall:
+ $(RM) $(LIBDIR)/$(LIBFILE)