From 0509a860fb23c7c81c36beb1ef00b58314c7934c Mon Sep 17 00:00:00 2001 From: Eric Fischer Date: Fri, 21 Feb 2014 16:55:36 -0800 Subject: [PATCH] Make it an actual library --- Makefile | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 281305b..f2f2e50 100644 --- a/Makefile +++ b/Makefile @@ -1,9 +1,19 @@ -all: jsoncat +PREFIX=/usr/local + +all: jsoncat libjsonpull.a + +install: jsonpull.h libjsonpull.a + cp jsonpull.h $(PREFIX)/include/jsonpull.h + cp libjsonpull.a $(PREFIX)/lib/libjsonpull.a jsoncat: jsoncat.o jsonpull.o cc -g -Wall -o $@ $^ jsoncat.o jsonpull.o: jsonpull.h +libjsonpull.a: jsonpull.o + ar rc $@ $^ + ranlib $@ + %.o: %.c cc -g -Wall -c $<