From 2e5766f6953821303a1c727c925b9b7e24e2d3d1 Mon Sep 17 00:00:00 2001 From: LAN-TW Date: Mon, 17 Dec 2012 11:17:09 +0800 Subject: =?UTF-8?q?=E5=8A=A0=E5=85=A5=20install=20=E5=92=8C=20uninstall=20?= =?UTF-8?q?=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- l4bds/Makefile | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'l4bds') diff --git a/l4bds/Makefile b/l4bds/Makefile index 1691cee..915b3ed 100644 --- a/l4bds/Makefile +++ b/l4bds/Makefile @@ -1,9 +1,13 @@ CC=cc AR=ar -RM=rm +RM=rm -f +INSTALL=install -m 644 CFLAGS=-Wall -g -I. OBJ=list.o LIBFILE=libl4bds.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) -- cgit v1.2.3