From 00bbde88b8167783b278de4dd7b8cac067705083 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Ho=C5=A1ek?= Date: Sat, 30 Jun 2012 13:54:48 +0200 Subject: [PATCH] support building a static library on Unix --- HLLib/Makefile | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/HLLib/Makefile b/HLLib/Makefile index 1fbe074..e8ba7f1 100644 --- a/HLLib/Makefile +++ b/HLLib/Makefile @@ -1,4 +1,6 @@ CXX = g++ +AR = ar +RANLIB = ranlib HLLIB_VERS = 2.3.0 LDFLAGS = -shared -Wl,-soname,libhl.so.2 CXXFLAGS = -O2 -g -fpic -funroll-loops -fvisibility=hidden @@ -15,7 +17,7 @@ objs = $(sources:.cpp=.o) .cpp.o: $(CXX) -c $(CXXFLAGS) -o $@ $< -all: libhl.so.$(HLLIB_VERS) +all: libhl.so.$(HLLIB_VERS) libhl.a clean: rm -f \#* *~ *.o *.so.* @@ -29,3 +31,7 @@ install: libhl.so.$(HLLIB_VERS) libhl.so.$(HLLIB_VERS): $(objs) $(CXX) $(LDFLAGS) -o $@ $(objs) + +libhl.a: $(objs) + $(AR) -rcu $@ $^ + $(RANLIB) $@