diff options
author | Paul Duncan <pabs@pablotron.org> | 2016-08-28 00:47:28 -0400 |
---|---|---|
committer | Paul Duncan <pabs@pablotron.org> | 2016-08-28 00:47:28 -0400 |
commit | 56b49c7258f6c597da56ac615c7387b655485c47 (patch) | |
tree | 5ecf6002975f58eadd8193402c99ab171b64720d /Makefile | |
parent | 0089842c454e51367a10dd86856cca8884bd2f01 (diff) | |
download | libfhp-56b49c7258f6c597da56ac615c7387b655485c47.tar.bz2 libfhp-56b49c7258f6c597da56ac615c7387b655485c47.zip |
generate static lib
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -3,22 +3,26 @@ CFLAGS=-std=c99 -W -Wall -pedantic -O2 -Iinclude -fPIC OBJS=fhp.o hash.o error.o token.o env.o te-parser.o SONAME=libfhp.so LIB=libfhp.so +STATIC_LIB=libfhp.a TEST_OBJS=test.o TEST_APP=./fhp-test TEST_LDFLAGS=-lfhp -L. -all: $(LIB) +all: $(LIB) $(STATIC_LIB) test: $(TEST_APP) LD_LIBRARY_PATH=. $(TEST_APP) clean: - rm -f $(LIB) $(OBJS) $(TEST_APP) $(TEST_OBJS) + rm -f $(LIB) $(STATIC_LIB) $(OBJS) $(TEST_APP) $(TEST_OBJS) $(LIB): $(OBJS) $(CC) -o $(LIB) -shared -Wl,-soname,$(SONAME) $(OBJS) +$(STATIC_LIB): $(OBJS) + ar r $(STATIC_LIB) $(OBJS) + $(TEST_APP): $(LIB) $(TEST_OBJS) $(CC) -o $(TEST_APP) $(TEST_OBJS) $(TEST_LDFLAGS) |