xref: /aoo41x/ext_libraries/apr-util/makefile.mk (revision 4023fbb7)
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.ELIF "$(GUI)" == "OS2"
61
62@all:
63	@echo "using system apr-util. nothing do do."
64
65
66.ELSE
67
68
69
70CONFIGURE_DIR=
71CONFIGURE_ACTION=autoconf && .$/configure
72CONFIGURE_FLAGS=								\
73	--with-apr=$(OUTDIR)/bin/apr-1-config		\
74	--prefix=$(OUTDIR)							\
75	--includedir=$(OUTDIR)$/inc$/apr-util		\
76	--with-iconv="no"
77
78
79# Use our own expat on the Mac.  Maybe we should do this on Linux, too?
80.IF "$(OS)" == "MACOSX"
81
82CONFIGURE_FLAGS+= --with-expat=$(OUTDIR)
83# The non-standard names of our expat libraries (yes, plural) make
84# a special handling in apr-utils configure necessary.
85PATCH_FILES+= $(TARFILE_NAME).mac.expat.patch
86
87.ENDIF
88
89
90BUILD_DIR=$(CONFIGURE_DIR)
91BUILD_ACTION=$(GNUMAKE)
92BUILD_FLAGS+= -j$(EXTMAXPROCESS)
93
94# Make apu-1-config believe that apr-util has been installed.
95INSTALL_ACTION=if [ -f apu-1-config.orig ]; then mv -f apu-1-config.orig apu-1-config; fi;	\
96	cp apu-1-config apu-1-config.orig;							\
97	sed -e "s/^location=source/location=installed/;s/^\(installbuilddir=.*\)\/.*/\\1\/lib\/apr-util\"/" apu-1-config > apu-1-config.installed;								\
98	mv -f apu-1-config.installed apu-1-config;	\
99	chmod +x apu-1-config
100
101OUT2INC+=include$/apr*.h
102OUT2INC+=include$/apu.h
103OUT2INC_SUBDIR=apr-util
104
105.IF "$(OS)"=="MACOSX"
106OUT2LIB+=.libs/libaprutil-1.*dylib
107.ELSE
108OUT2LIB=.libs/libaprutil-1.so*
109.ENDIF
110OUT2BIN=apu-1-config
111
112.ENDIF
113
114# --- Targets ------------------------------------------------------
115
116.INCLUDE : set_ext.mk
117.INCLUDE : target.mk
118.INCLUDE : tg_ext.mk
119
120