Skip to content

Commit

Permalink
Added make install
Browse files Browse the repository at this point in the history
  • Loading branch information
tj committed Nov 4, 2010
1 parent aab6888 commit 8146db8
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions Makefile
@@ -1,6 +1,8 @@

AR = ar
CC = gcc
AR ?= ar
CC ?= gcc
PREFIX ?= /usr/local

CFLAGS = -O3 -std=c99 -Wall

SRCS = src/list.c \
Expand All @@ -11,6 +13,12 @@ OBJS = $(SRCS:.c=.o)

all: build/liblist.a

install: all
cp -f build/liblist.a $(PREFIX)/lib/liblist.a

uninstall:
rm -f $(PREFIX)/lib/liblist.a

build/liblist.a: $(OBJS)
@mkdir -p build
$(AR) rcs $@ $^
Expand All @@ -35,4 +43,4 @@ test: bin/test
benchmark: bin/benchmark
@./$<

.PHONY: test benchmark clean
.PHONY: test benchmark clean install uninstall

0 comments on commit 8146db8

Please sign in to comment.