patch-makefile 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. --- libjson.orig/makefile 2014-01-17 20:38:29.584543459 +0100
  2. +++ libjson/makefile 2014-01-17 20:38:14.372460375 +0100
  3. @@ -128,7 +128,7 @@ objects = internalJSONNode.o JSON
  4. JSONDebug.o JSONIterators.o JSONMemory.o JSONNode.o \
  5. JSONNode_Mutex.o JSONPreparse.o JSONStream.o JSONValidator.o \
  6. JSONWorker.o JSONWriter.o libjson.o
  7. -OS=$(shell uname)
  8. +OS=Linux
  9. # Defaults
  10. ifeq ($(OS), Darwin)
  11. @@ -158,8 +158,7 @@ srcdir ?= _internal/Source
  12. CXX ?= c++
  13. AR ?= ar
  14. PIC ?= PIC
  15. -BUILD_TYPE ?= "default"
  16. -SHARED ?= "1"
  17. +SHARED ?= 1
  18. # Internal Variables
  19. @@ -237,18 +236,16 @@ endif
  20. # Compile object files
  21. $(objdir)/%.o: $(srcdir)/%.cpp
  22. - $(CXX) $< -o $@ -c $(CXXFLAGS)
  23. + $(CXX) $< -o $@ -c $(CPPFLAGS) $(CXXFLAGS)
  24. ifeq ($(SHARED),1)
  25. install: banner install_headers $(lib_target)
  26. @echo "Install shared library"
  27. + mkdir -p $(inst_path)
  28. cp -f ./$(lib_target) $(inst_path)
  29. cd $(inst_path) ; \
  30. ln -sf $(lib_target) $(libname_shared_major_version) ; \
  31. ln -sf $(libname_shared_major_version) $(libname_shared)
  32. -ifneq ($(OS),Darwin)
  33. - ldconfig
  34. -endif
  35. @echo "Install shared library: Done."
  36. else
  37. install: banner install_headers $(lib_target)
  38. @@ -266,7 +263,6 @@ install_headers: banner
  39. cp -r ./$(srcdir)/JSONDefs $(include_path)/$(libname_hdr)/$(srcdir)
  40. chmod -R a+r $(include_path)/$(libname_hdr)
  41. find $(include_path)/$(libname_hdr) -type d -exec chmod a+x {} \;
  42. - cp -rv $(srcdir)/Dependencies/ $(include_path)/$(libname_hdr)/$(srcdir)
  43. @echo "Install header files: Done."
  44. clean: banner