Makefile 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. ifeq ($(SRCDIR),)
  2. updir = $(shell echo $(dir $(1)) | sed 's/.$$//')
  3. LIBDIR := $(call updir,$(CURDIR))
  4. SRCDIR := $(call updir,$(LIBDIR))
  5. BLDDIR := $(SRCDIR)
  6. endif
  7. SUBDIR := lib/curl_transport
  8. include $(BLDDIR)/config.mk
  9. default: all
  10. MODS := xmlrpc_curl_transport curltransaction curlmulti lock_pthread
  11. .PHONY: all
  12. all: $(MODS:%=%.o) $(MODS:%=%.osh)
  13. # Rules for the above dependencies are in common.mk,
  14. # courtesy of TARGET_MODS.
  15. TARGET_MODS = $(MODS)
  16. OMIT_CURL_TRANSPORT_RULE=Y
  17. include $(SRCDIR)/common.mk
  18. # This 'common.mk' dependency makes sure the symlinks get built before
  19. # this make file is used for anything.
  20. $(SRCDIR)/common.mk: srcdir blddir
  21. CURL_INCLUDES := $(shell curl-config --cflags)
  22. # We expect that curl-config --cflags just gives us -I options, because
  23. # we need just the -I options for 'make dep'. Plus, it's scary to think
  24. # of what any other compiler flag would do to our compile.
  25. INCLUDES = \
  26. -I$(BLDDIR) \
  27. -I$(BLDDIR)/include \
  28. -Isrcdir/include \
  29. -Isrcdir/lib/util/include \
  30. $(CURL_INCLUDES)
  31. .PHONY: clean
  32. clean: clean-common
  33. .PHONY: distclean
  34. distclean: clean distclean-common
  35. .PHONY: tags
  36. tags: TAGS
  37. .PHONY: distdir
  38. distdir:
  39. .PHONY: install
  40. install:
  41. .PHONY: dep
  42. dep: dep-common
  43. include depend.mk
  44. # Need this dependency for those who don't use depend.mk.
  45. # Without it, version.h doesn't get created.
  46. xmlrpc_curl_transport.o xmlrpc_curl_transport.osh: version.h