1ifeq ($(SRCDIR),) 2 updir = $(shell echo $(dir $(1)) | sed 's/.$$//') 3 LIBDIR := $(call updir,$(CURDIR)) 4 SRCDIR := $(call updir,$(LIBDIR)) 5 BLDDIR := $(SRCDIR) 6endif 7SUBDIR := lib/curl_transport 8 9include $(BLDDIR)/config.mk 10 11default: all 12 13MODS := xmlrpc_curl_transport curltransaction curlmulti 14 15.PHONY: all 16all: $(MODS:%=%.o) $(MODS:%=%.osh) 17 18# Rules for the above dependencies are in common.mk, 19# courtesy of TARGET_MODS. 20 21TARGET_MODS = $(MODS) 22 23OMIT_CURL_TRANSPORT_RULE=Y 24 25include $(SRCDIR)/common.mk 26 27# This 'common.mk' dependency makes sure the symlinks get built before 28# this make file is used for anything. 29 30$(SRCDIR)/common.mk: srcdir blddir 31 32CURL_VERSION := $(shell curl-config --vernum) 33 34# Some time at or before Curl 7.12, <curl/types.h> became an empty file 35# (no-op). Some time after Curl 7.18, <curl/types.h> ceased to exist. 36# curl-config --vernum yields a string of 6 digits; the first two are the 37# major version in hexadecimal; the second two are the minor version number 38# and so on. So "071000" means 7.16.0. 39 40NEED_CURL_TYPES_H := $(shell if test $(CURL_VERSION) '<' 071000; then echo Y; fi) 41 42ifeq ($(NEED_CURL_TYPES_H),Y) 43 CFLAGS_LOCAL += -DNEED_CURL_TYPES_H 44endif 45 46CURL_INCLUDES := $(shell curl-config --cflags) 47# We expect that curl-config --cflags just gives us -I options, because 48# we need just the -I options for 'make dep'. Plus, it's scary to think 49# of what any other compiler flag would do to our compile. 50 51INCLUDES = \ 52 -I$(BLDDIR) \ 53 -I$(BLDDIR)/include \ 54 -Isrcdir/include \ 55 -Isrcdir/lib/util/include \ 56 $(CURL_INCLUDES) 57 58.PHONY: clean 59clean: clean-common 60 61.PHONY: distclean 62distclean: clean distclean-common 63 64.PHONY: tags 65tags: TAGS 66 67.PHONY: distdir 68distdir: 69 70.PHONY: install 71install: 72 73.PHONY: uninstall 74uninstall: 75 76.PHONY: dep 77dep: dep-common 78 79include depend.mk 80 81# Need this dependency for those who don't use depend.mk. 82# Without it, version.h doesn't get created. 83xmlrpc_curl_transport.o xmlrpc_curl_transport.osh: version.h 84