xref: /AOO41X/ext_libraries/apr-util/makefile.mk (revision 03c97e340010506c11d4ffaab7f577e5f7050fe6)
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=apr-util
25TARGET=aprutil
26
27# --- Settings -----------------------------------------------------
28
29.INCLUDE :  settings.mk
30.INCLUDE :      aprutil_version.mk
31
32# --- Files --------------------------------------------------------
33
34# Assemble the full version number from the parts defined in aprutil_version.mk
35APRUTIL_VERSION=$(APR_UTIL_MAJOR).$(APR_UTIL_MINOR).$(APR_UTIL_MICRO)
36
37
38TARFILE_NAME=$(PRJNAME)-$(APRUTIL_VERSION)
39TARFILE_MD5=666a5d56098a9debf998510e304c8095
40
41.IF "$(OS)"=="WNT"
42
43ADDITIONAL_FILES=Makefile Module_apr-util.mk Library_apr-util.mk Package_inc.mk
44
45PATCH_FILES= \
46    $(TARFILE_NAME).apu.hw.patch \
47    $(TARFILE_NAME).makewin32.patch
48
49CONFIGURE_DIR=
50CONFIGURE_ACTION=cp include/apu.hw include/apu.h;                           \
51    cp include/apr_ldap.hw include/apr_ldap.h;                              \
52    cp include/private/apu_config.hw include/private/apu_config.h;          \
53    cp include/private/apu_select_dbm.hw include/private/apu_select_dbm.h
54CONFIGURE_FLAGS=
55
56BUILD_DIR=$(CONFIGURE_DIR)
57BUILD_ACTION=$(GNUMAKE)
58BUILD_FLAGS+= -j$(EXTMAXPROCESS)
59
60.ELSE
61
62
63
64CONFIGURE_DIR=
65CONFIGURE_ACTION=autoconf && .$/configure
66CONFIGURE_FLAGS=                                \
67    --with-apr=$(OUTDIR)/bin/apr-1-config       \
68    --prefix=$(OUTDIR)                          \
69    --includedir=$(OUTDIR)$/inc$/apr-util       \
70    --with-iconv="no"
71
72
73# Use our own expat on the Mac.  Maybe we should do this on Linux, too?
74.IF "$(OS)" == "MACOSX"
75
76CONFIGURE_FLAGS+= --with-expat=$(OUTDIR)
77# The non-standard names of our expat libraries (yes, plural) make
78# a special handling in apr-utils configure necessary.
79PATCH_FILES+= $(TARFILE_NAME).mac.expat.patch
80
81.ENDIF
82
83
84BUILD_DIR=$(CONFIGURE_DIR)
85BUILD_ACTION=$(GNUMAKE)
86BUILD_FLAGS+= -j$(EXTMAXPROCESS)
87
88# Make apu-1-config believe that apr-util has been installed.
89INSTALL_ACTION=if [ -f apu-1-config.orig ]; then mv -f apu-1-config.orig apu-1-config; fi;  \
90    cp apu-1-config apu-1-config.orig;                          \
91    sed -e "s/^location=source/location=installed/;s/^\(installbuilddir=.*\)\/.*/\\1\/lib\/apr-util\"/" apu-1-config > apu-1-config.installed;                              \
92    mv -f apu-1-config.installed apu-1-config;  \
93    chmod +x apu-1-config
94
95OUT2INC+=include$/apr*.h
96OUT2INC+=include$/apu.h
97OUT2INC_SUBDIR=apr-util
98
99.IF "$(OS)"=="MACOSX"
100OUT2LIB+=.libs/libaprutil-1.*dylib
101.ELSE
102OUT2LIB=.libs/libaprutil-1.so*
103.ENDIF
104OUT2BIN=apu-1-config
105
106.ENDIF
107
108# --- Targets ------------------------------------------------------
109
110.INCLUDE : set_ext.mk
111.INCLUDE : target.mk
112.INCLUDE : tg_ext.mk
113
114