xref: /aoo41x/ext_libraries/apr-util/makefile.mk (revision 59ddfc10)
13e9d7d56SAndre Fischer#/**************************************************************
23e9d7d56SAndre Fischer# *
33e9d7d56SAndre Fischer# * Licensed to the Apache Software Foundation (ASF) under one
43e9d7d56SAndre Fischer# * or more contributor license agreements.  See the NOTICE file
53e9d7d56SAndre Fischer# * distributed with this work for additional information
63e9d7d56SAndre Fischer# * regarding copyright ownership.  The ASF licenses this file
73e9d7d56SAndre Fischer# * to you under the Apache License, Version 2.0 (the
83e9d7d56SAndre Fischer# * "License"); you may not use this file except in compliance
93e9d7d56SAndre Fischer# * with the License.  You may obtain a copy of the License at
103e9d7d56SAndre Fischer# *
113e9d7d56SAndre Fischer# *   http://www.apache.org/licenses/LICENSE-2.0
123e9d7d56SAndre Fischer# *
133e9d7d56SAndre Fischer# * Unless required by applicable law or agreed to in writing,
143e9d7d56SAndre Fischer# * software distributed under the License is distributed on an
153e9d7d56SAndre Fischer# * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
163e9d7d56SAndre Fischer# * KIND, either express or implied.  See the License for the
173e9d7d56SAndre Fischer# * specific language governing permissions and limitations
183e9d7d56SAndre Fischer# * under the License.
193e9d7d56SAndre Fischer# *
203e9d7d56SAndre Fischer# *************************************************************/
213e9d7d56SAndre Fischer
223e9d7d56SAndre FischerPRJ=.
233e9d7d56SAndre Fischer
243e9d7d56SAndre FischerPRJNAME=apr-util
253e9d7d56SAndre FischerTARGET=aprutil
263e9d7d56SAndre Fischer
273e9d7d56SAndre Fischer# --- Settings -----------------------------------------------------
283e9d7d56SAndre Fischer
293e9d7d56SAndre Fischer.INCLUDE :	settings.mk
30*59ddfc10SAndre Fischer.INCLUDE :      aprutil_version.mk
313e9d7d56SAndre Fischer
323e9d7d56SAndre Fischer# --- Files --------------------------------------------------------
333e9d7d56SAndre Fischer
34*59ddfc10SAndre Fischer# Assemble the full version number from the parts defined in aprutil_version.mk
35*59ddfc10SAndre FischerAPRUTIL_VERSION=$(APR_UTIL_MAJOR).$(APR_UTIL_MINOR).$(APR_UTIL_MICRO)
363e9d7d56SAndre Fischer
37*59ddfc10SAndre Fischer
38*59ddfc10SAndre FischerTARFILE_NAME=$(PRJNAME)-$(APRUTIL_VERSION)
393e9d7d56SAndre FischerTARFILE_MD5=666a5d56098a9debf998510e304c8095
403e9d7d56SAndre Fischer
413e9d7d56SAndre Fischer.IF "$(OS)"=="WNT"
423e9d7d56SAndre Fischer
433e9d7d56SAndre FischerADDITIONAL_FILES=Makefile Module_apr-util.mk Library_apr-util.mk Package_inc.mk
443e9d7d56SAndre Fischer
453e9d7d56SAndre FischerPATCH_FILES= \
463e9d7d56SAndre Fischer    $(TARFILE_NAME).apu.hw.patch \
473e9d7d56SAndre Fischer    $(TARFILE_NAME).makewin32.patch
483e9d7d56SAndre Fischer
493e9d7d56SAndre FischerCONFIGURE_DIR=
503e9d7d56SAndre FischerCONFIGURE_ACTION=cp include/apu.hw include/apu.h;							\
513e9d7d56SAndre Fischer	cp include/apr_ldap.hw include/apr_ldap.h;								\
523e9d7d56SAndre Fischer	cp include/private/apu_config.hw include/private/apu_config.h;			\
533e9d7d56SAndre Fischer	cp include/private/apu_select_dbm.hw include/private/apu_select_dbm.h
543e9d7d56SAndre FischerCONFIGURE_FLAGS=
553e9d7d56SAndre Fischer
563e9d7d56SAndre FischerBUILD_DIR=$(CONFIGURE_DIR)
573e9d7d56SAndre FischerBUILD_ACTION=$(GNUMAKE)
583e9d7d56SAndre FischerBUILD_FLAGS+= -j$(EXTMAXPROCESS)
593e9d7d56SAndre Fischer
603e9d7d56SAndre Fischer.ELSE
613e9d7d56SAndre Fischer
62*59ddfc10SAndre Fischer
63*59ddfc10SAndre Fischer
643e9d7d56SAndre FischerCONFIGURE_DIR=
65*59ddfc10SAndre FischerCONFIGURE_ACTION=autoconf && .$/configure
663e9d7d56SAndre FischerCONFIGURE_FLAGS=								\
673e9d7d56SAndre Fischer	--with-apr=$(OUTDIR)/bin/apr-1-config		\
683e9d7d56SAndre Fischer	--prefix=$(OUTDIR)							\
693e9d7d56SAndre Fischer	--includedir=$(OUTDIR)$/inc$/apr-util		\
70*59ddfc10SAndre Fischer	--with-iconv="no"
71*59ddfc10SAndre Fischer
72*59ddfc10SAndre Fischer
73*59ddfc10SAndre Fischer# Use our own expat on the Mac.  Maybe we should do this on Linux, too?
74*59ddfc10SAndre Fischer.IF "$(OS)" == "MACOSX"
75*59ddfc10SAndre Fischer
76*59ddfc10SAndre FischerCONFIGURE_FLAGS+= --with-expat=$(OUTDIR)
77*59ddfc10SAndre Fischer# The non-standard names of our expat libraries (yes, plural) make
78*59ddfc10SAndre Fischer# a special handling in apr-utils configure necessary.
79*59ddfc10SAndre FischerPATCH_FILES+= $(TARFILE_NAME).mac.expat.patch
80*59ddfc10SAndre Fischer
81*59ddfc10SAndre Fischer.ENDIF
82*59ddfc10SAndre Fischer
833e9d7d56SAndre Fischer
843e9d7d56SAndre FischerBUILD_DIR=$(CONFIGURE_DIR)
853e9d7d56SAndre FischerBUILD_ACTION=$(GNUMAKE)
863e9d7d56SAndre FischerBUILD_FLAGS+= -j$(EXTMAXPROCESS)
873e9d7d56SAndre Fischer
883e9d7d56SAndre Fischer# Make apu-1-config believe that apr-util has been installed.
893e9d7d56SAndre FischerINSTALL_ACTION=if [ -f apu-1-config.orig ]; then mv -f apu-1-config.orig apu-1-config; fi;	\
903e9d7d56SAndre Fischer	cp apu-1-config apu-1-config.orig;							\
913e9d7d56SAndre Fischer	sed -e "s/^location=source/location=installed/;s/^\(installbuilddir=.*\)\/.*/\\1\/lib\/apr-util\"/" apu-1-config > apu-1-config.installed;								\
923e9d7d56SAndre Fischer	mv -f apu-1-config.installed apu-1-config;	\
933e9d7d56SAndre Fischer	chmod +x apu-1-config
943e9d7d56SAndre Fischer
953e9d7d56SAndre FischerOUT2INC+=include$/apr*.h
963e9d7d56SAndre FischerOUT2INC+=include$/apu.h
973e9d7d56SAndre FischerOUT2INC_SUBDIR=apr-util
983e9d7d56SAndre Fischer
993e9d7d56SAndre Fischer.IF "$(OS)"=="MACOSX"
1003e9d7d56SAndre FischerOUT2LIB+=.libs/libaprutil-1.*dylib
1013e9d7d56SAndre Fischer.ELSE
1023e9d7d56SAndre FischerOUT2LIB=.libs/libaprutil-1.so*
1033e9d7d56SAndre Fischer.ENDIF
1043e9d7d56SAndre FischerOUT2BIN=apu-1-config
1053e9d7d56SAndre Fischer
1063e9d7d56SAndre Fischer.ENDIF
1073e9d7d56SAndre Fischer
1083e9d7d56SAndre Fischer# --- Targets ------------------------------------------------------
1093e9d7d56SAndre Fischer
1103e9d7d56SAndre Fischer.INCLUDE : set_ext.mk
1113e9d7d56SAndre Fischer.INCLUDE : target.mk
1123e9d7d56SAndre Fischer.INCLUDE : tg_ext.mk
1133e9d7d56SAndre Fischer
114