xref: /aoo41x/ext_libraries/serf/makefile.mk (revision d0556839)
1#**************************************************************
2#
3#  Licensed to the Apache Software Foundation (ASF) under one
4#  or more contributor license agreements.  See the NOTICE file
5#  distributed with this work for additional information
6#  regarding copyright ownership.  The ASF licenses this file
7#  to you under the Apache License, Version 2.0 (the
8#  "License"); you may not use this file except in compliance
9#  with the License.  You may obtain a copy of the License at
10#
11#    http://www.apache.org/licenses/LICENSE-2.0
12#
13#  Unless required by applicable law or agreed to in writing,
14#  software distributed under the License is distributed on an
15#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16#  KIND, either express or implied.  See the License for the
17#  specific language governing permissions and limitations
18#  under the License.
19#
20#**************************************************************
21
22PRJ=.
23
24PRJNAME=serf
25TARGET=so_serf
26
27# --- Settings -----------------------------------------------------
28
29.INCLUDE :	settings.mk
30.INCLUDE :	serf_version.mk
31
32# --- Files --------------------------------------------------------
33
34# Assemble the full version number from the parts defined in serf_version.mk
35LIBSERFVERSION=$(SERF_MAJOR).$(SERF_MINOR).$(SERF_MICRO)
36
37TARFILE_NAME=$(PRJNAME)-$(LIBSERFVERSION)
38TARFILE_MD5=3b179ed18f65c43141528aa6d2440db4
39
40# Apply patches that provide callbacks for ssl certificate verification with the
41# whole certificate chain (issue68.patch).  The patch is taken from serf's
42# issue 68 (http://code.google.com/p/serf/issues/detail?id=68).
43# This patch needs some minor fixes (issue68b.patch) for proper initialization of
44# some callbacks and export of new functions.
45PATCH_FILES=$(TARFILE_NAME).issue68.patch $(TARFILE_NAME).issue68b.patch
46
47# disable default used Transfer-Encoding = chunked for sending requests.
48PATCH_FILES+=$(TARFILE_NAME).nochunkedtransferencoding.patch
49
50.IF "$(OS)"=="WNT"
51
52ADDITIONAL_FILES=Makefile Module_serf.mk Library_serf.mk Package_inc.mk
53
54PATCH_FILES+=$(TARFILE_NAME).makewin32.patch
55
56CONFIGURE_DIR=
57CONFIGURE_ACTION=
58CONFIGURE_FLAGS=
59
60BUILD_DIR=$(CONFIGURE_DIR)
61BUILD_ACTION=$(GNUMAKE)
62BUILD_FLAGS+= -j$(EXTMAXPROCESS)
63
64.ELIF "$(GUI)" == "OS2"
65
66@all:
67	@echo "using system serf. nothing do do."
68
69.ELSE
70
71.IF "$(OS)"=="MACOSX" || "$(OS)"=="FREEBSD" || "$(OS)"=="LINUX"
72# Do not link against expat.  It is not necessary (apr-util is already linked against it)
73# and does not work (we use a different expat library schema.)
74PATCH_FILES+=$(TARFILE_NAME).mac.patch
75.ENDIF
76
77.IF "$(OS)"=="LINUX"
78# Add -ldl as last library so that the linker has no trouble resolving dependencies.
79PATCH_FILES+=$(TARFILE_NAME).ldl.patch
80.ENDIF
81
82CONFIGURE_DIR=
83CONFIGURE_ACTION=autoconf && .$/configure
84
85.IF "$(OS)"=="MACOSX" || "$(OS)"=="LINUX"
86.IF "$(OS)"=="LINUX"
87.IF "$(SYSTEM_OPENSSL)"=="YES"
88CDEFS+=$(OPENSSL_CFLAGS)
89.ELSE
90OPENSSLINCDIR=external
91CDEFS+=-I$(SOLARINCDIR)$/$(OPENSSLINCDIR)
92.ENDIF
93.ENDIF
94# On Linux/Mac we need the content of CDEFS in CFLAGS so that the ssl headers are searched for
95# in a directory that corresponds to the directory that is searched for the ssl library.
96CONFIGURE_FLAGS='CFLAGS=$(CDEFS)'
97.ENDIF
98
99BUILD_DIR=$(CONFIGURE_DIR)
100BUILD_ACTION=$(GNUMAKE)
101BUILD_FLAGS+= -j$(EXTMAXPROCESS)
102
103OUT2INC+=serf*.h
104OUT2INC_SUBDIR=serf
105
106.IF "$(OS)"=="MACOSX"
107OUT2LIB+=.libs/libserf-1.*dylib
108.ELSE
109OUT2LIB=.libs/libserf-1.so*
110.ENDIF
111
112.ENDIF
113
114# --- Targets ------------------------------------------------------
115
116.INCLUDE : set_ext.mk
117.INCLUDE : target.mk
118.INCLUDE : tg_ext.mk
119