renamed generated config.h to curl_config.h in order to avoid clashes when libcurl...
[platform/upstream/curl.git] / Android.mk
1 # Google Android makefile for curl and libcurl
2 # Place the curl source (including this makefile) into external/curl/ in the
3 # Android source tree.  Then build them with 'make curl' or just 'make libcurl'
4 # from the Android root.
5 #
6 # Note: you must first create a curl_config.h file by running configure in the
7 # Android environment. I haven't found an easy way to do this yet. If there is
8 # no easy way, a static config-android.h may need to be created and checked in
9 # to the libcurl source tree.
10 #
11 # Dan Fandrich
12 # June 2009
13
14 LOCAL_PATH:= $(call my-dir)
15
16 common_CFLAGS := -Wpointer-arith -Wwrite-strings -Wunused -Winline -Wnested-externs -Wmissing-declarations -Wmissing-prototypes -Wno-long-long -Wfloat-equal -Wno-multichar -Wsign-compare -Wno-format-nonliteral -Wendif-labels -Wstrict-prototypes -Wdeclaration-after-statement -Wno-system-headers -DHAVE_CONFIG_H
17
18 #########################
19 # Build the libcurl library
20
21 include $(CLEAR_VARS)
22 include $(LOCAL_PATH)/lib/Makefile.inc
23 LOCAL_SRC_FILES := $(addprefix lib/,$(CSOURCES))
24 LOCAL_C_INCLUDES += $(LOCAL_PATH)/include/
25 LOCAL_CFLAGS += $(common_CFLAGS)
26
27 LOCAL_MODULE:= libcurl
28
29 include $(BUILD_STATIC_LIBRARY)
30
31
32 #########################
33 # Build the curl binary
34
35 include $(CLEAR_VARS)
36 include $(LOCAL_PATH)/src/Makefile.inc
37 LOCAL_SRC_FILES := $(addprefix src/,$(CURL_SOURCES))
38
39 LOCAL_MODULE := curl
40 LOCAL_STATIC_LIBRARIES := libcurl
41 LOCAL_SYSTEM_SHARED_LIBRARIES := libc
42
43 LOCAL_C_INCLUDES += $(LOCAL_PATH)/include $(LOCAL_PATH)/lib
44
45 # This will also need to include $(CURLX_ONES) in order to correctly build
46 # a dynamic library
47 LOCAL_CFLAGS += $(common_CFLAGS)
48
49 include $(BUILD_EXECUTABLE)
50