summaryrefslogtreecommitdiff
path: root/recipes-support/jsoncpp/jsoncpp-1.6.0/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-support/jsoncpp/jsoncpp-1.6.0/Makefile')
-rw-r--r--recipes-support/jsoncpp/jsoncpp-1.6.0/Makefile21
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