mirror of
https://github.com/google/brotli.git
synced 2024-11-25 13:00:06 +00:00
Merge pull request #390 from chad-iris/master
Add a "lib" target to the Makefile to build a static library: libbrotli.a
This commit is contained in:
commit
a5a38bd7a1
12
Makefile
12
Makefile
@ -1,9 +1,11 @@
|
||||
OS := $(shell uname)
|
||||
SOURCES = $(wildcard common/*.c) $(wildcard dec/*.c) $(wildcard enc/*.c) \
|
||||
tools/bro.c
|
||||
LIBSOURCES = $(wildcard common/*.c) $(wildcard dec/*.c) $(wildcard enc/*.c)
|
||||
SOURCES = $(LIBSOURCES) tools/bro.c
|
||||
BINDIR = bin
|
||||
OBJDIR = $(BINDIR)/obj
|
||||
LIBOBJECTS = $(addprefix $(OBJDIR)/, $(LIBSOURCES:.c=.o))
|
||||
OBJECTS = $(addprefix $(OBJDIR)/, $(SOURCES:.c=.o))
|
||||
LIB_A = libbrotli.a
|
||||
EXECUTABLE = bro
|
||||
DIRS = $(OBJDIR)/common $(OBJDIR)/dec $(OBJDIR)/enc \
|
||||
$(OBJDIR)/tools $(BINDIR)/tmp
|
||||
@ -27,9 +29,13 @@ $(OBJECTS): $(DIRS)
|
||||
$(EXECUTABLE): $(OBJECTS)
|
||||
$(CC) $(OBJECTS) -lm -o $(BINDIR)/$(EXECUTABLE)
|
||||
|
||||
lib: $(LIBOBJECTS)
|
||||
rm -f $(LIB_A)
|
||||
ar -crs $(LIB_A) $(LIBOBJECTS)
|
||||
|
||||
test: $(EXECUTABLE)
|
||||
tests/compatibility_test.sh
|
||||
tests/roundtrip_test.sh
|
||||
|
||||
clean:
|
||||
rm -rf $(BINDIR)
|
||||
rm -rf $(BINDIR) $(LIB_A)
|
||||
|
Loading…
Reference in New Issue
Block a user