diff options
author | 2023-02-04 01:06:40 +0100 | |
---|---|---|
committer | 2023-02-04 01:06:40 +0100 | |
commit | a07a7d1583a2488dd38a1c4d52b9313551047591 (patch) | |
tree | b1e87d6c71d31ae9c55452aa6db494e11777995b | |
parent | 5f93e47f7e4aa784e87cd86668cab26393278761 (diff) | |
download | log-a07a7d1583a2488dd38a1c4d52b9313551047591.tar.gz log-a07a7d1583a2488dd38a1c4d52b9313551047591.zip |
Edit targets to generate static and shared
libraries
I need to clean all objects because I have to compile objects for shared
library using `-fPIC` flag and the archive library doesn't must have
that flag.
This is only a shit! BSD make is missing of functionality to compile
objects inside a different directory than soruces.
-rw-r--r-- | Makefile | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -11,14 +11,16 @@ LIBNAME = liblog CFLAGS = -Wall -ansi --std=c89 -pedantic ${OPT} ${LIBINC} LDFLAGS = ${LIBS} -dist: - @make OPT='-O2 -pipe -Werror' all +dist: static shared -static: clean libs +# ar -rc libaz.a libabc.a libxyz.a +static: libs @make OPT='-O2 -pipe -Werror' ${LIBNAME:=.a} + rm -f ${OBJ} -shared: clean libs +shared: libs @make OPT='-O2 -pipe -Werror -fPIC' ${LIBNAME:=.so} + rm -f ${OBJ} debug: @make OPT=-g all |