diff options
author | Jason Reiss <jreiss@multitech.com> | 2019-10-01 14:16:27 -0500 |
---|---|---|
committer | Serhii Kostiuk <serhii.o.kostiuk@globallogic.com> | 2020-05-20 19:50:21 +0300 |
commit | 8decc63b8b82e49113bc0a9939487dabbeaf3513 (patch) | |
tree | ca6b46a7546fcee8c80fbacfe8689b861877aa66 /recipes-support/jsoncpp/jsoncpp-1.6.0/Makefile | |
parent | 3ada7995d9654f5e43858e6bd25fba917b1d8f03 (diff) | |
download | meta-mlinux-8decc63b8b82e49113bc0a9939487dabbeaf3513.tar.gz meta-mlinux-8decc63b8b82e49113bc0a9939487dabbeaf3513.tar.bz2 meta-mlinux-8decc63b8b82e49113bc0a9939487dabbeaf3513.zip |
change jsoncpp recipe/makefile to build shared library
Diffstat (limited to 'recipes-support/jsoncpp/jsoncpp-1.6.0/Makefile')
-rw-r--r-- | recipes-support/jsoncpp/jsoncpp-1.6.0/Makefile | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/recipes-support/jsoncpp/jsoncpp-1.6.0/Makefile b/recipes-support/jsoncpp/jsoncpp-1.6.0/Makefile index 3be3743..7df3d63 100644 --- a/recipes-support/jsoncpp/jsoncpp-1.6.0/Makefile +++ b/recipes-support/jsoncpp/jsoncpp-1.6.0/Makefile @@ -16,29 +16,32 @@ json_reader.d \ json_value.d \ json_writer.d -all: libjsoncpp.a +TARGET = libjsoncpp.so -libjsoncpp.a: $(OBJS) +all: $(TARGET) + +libjsoncpp.so: $(OBJS) @echo 'Building target: $@' - $(AR) -r libjsoncpp.a $(OBJS) + #$(AR) -r libjsoncpp.a $(OBJS) + $(CXX) ${LDFLAGS} -shared -o $@ $^ @echo 'Finished building target: $@' @echo ' ' %.o: src/lib_json/%.cpp @echo 'Building file: $<' - $(CXX) $(CFLAGS) -Iinclude -Wall -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<" + $(CXX) $(CFLAGS) -Iinclude -Wall -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -fPIC -o "$@" "$<" @echo 'Finished building: $<' @echo ' ' install: - mkdir -p $(DESTDIR)$(libdir) - mkdir -p $(DESTDIR)$(includedir)/jsoncpp/json - cp libjsoncpp.a $(DESTDIR)$(libdir)/ - cp include/json/* $(DESTDIR)$(includedir)/jsoncpp/json/ + install -d $(DESTDIR)/usr/include/json + install -m 644 include/json/*.h $(DESTDIR)/usr/include/json + mkdir -p $(DESTDIR)/usr/lib + cp libjsoncpp.so $(DESTDIR)/usr/lib # Other Targets clean: - -$(RM) $(OBJS)$(CPP_DEPS) libjsoncpp.a + -$(RM) $(OBJS)$(CPP_DEPS) libjsoncpp.so -@echo ' ' .PHONY: all clean dependents |