From 0697dd90a560cb5d5bb73e4961de91abc924baa3 Mon Sep 17 00:00:00 2001 From: Tj Holowaychuk Date: Sat, 14 Aug 2010 16:45:53 -0700 Subject: [PATCH] Added liblist.a --- Makefile | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index d568894..a55da59 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,5 @@ +AR = ar CC = gcc CFLAGS = -O3 -std=c99 -Wall @@ -8,7 +9,11 @@ SRCS = src/list.c \ OBJS = $(SRCS:.c=.o) -all: bin/test +all: build/liblist.a + +build/liblist.a: $(OBJS) + @mkdir -p build + $(AR) rcs $@ $^ bin/test: test.o $(OBJS) @mkdir -p bin @@ -22,9 +27,7 @@ bin/benchmark: benchmark.o $(OBJS) $(CC) $< $(CFLAGS) -c -o $@ clean: - rm -fr bin - rm -f *.o - rm -f src/*.o + rm -fr bin build *.o src/*.o test: bin/test @./$<