xref: /aoo41x/ext_libraries/serf/makefile.mk (revision 1fa2825b)
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"
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.ELSE
76# Add -ldl as last library so that the linker has no trouble resolving dependencies.
77PATCH_FILES+=$(TARFILE_NAME).ldl.patch
78.ENDIF
79
80CONFIGURE_DIR=
81CONFIGURE_ACTION=autoconf && .$/configure
82
83.IF "$(OS)"=="MACOSX" || "$(OS)"=="LINUX"
84.IF "$(OS)"=="LINUX"
85.IF "$(SYSTEM_OPENSSL)"=="YES"
86CDEFS+=$(OPENSSL_CFLAGS)
87.ELSE
88OPENSSLINCDIR=external
89CDEFS+=-I$(SOLARINCDIR)$/$(OPENSSLINCDIR)
90.ENDIF
91.ENDIF
92# On Linux/Mac we need the content of CDEFS in CFLAGS so that the ssl headers are searched for
93# in a directory that corresponds to the directory that is searched for the ssl library.
94CONFIGURE_FLAGS='CFLAGS=$(CDEFS)'
95.ENDIF
96
97BUILD_DIR=$(CONFIGURE_DIR)
98BUILD_ACTION=$(GNUMAKE)
99BUILD_FLAGS+= -j$(EXTMAXPROCESS)
100
101OUT2INC+=serf*.h
102OUT2INC_SUBDIR=serf
103
104.IF "$(OS)"=="MACOSX"
105OUT2LIB+=.libs/libserf-1.*dylib
106.ELSE
107OUT2LIB=.libs/libserf-1.so*
108.ENDIF
109
110.ENDIF
111
112# --- Targets ------------------------------------------------------
113
114.INCLUDE : set_ext.mk
115.INCLUDE : target.mk
116.INCLUDE : tg_ext.mk
117