xref: /aoo41x/ext_libraries/apr-util/makefile.mk (revision c9f2ebca)
1*c9f2ebcaSAriel Constenla-Haile#**************************************************************
2*c9f2ebcaSAriel Constenla-Haile#
3*c9f2ebcaSAriel Constenla-Haile#  Licensed to the Apache Software Foundation (ASF) under one
4*c9f2ebcaSAriel Constenla-Haile#  or more contributor license agreements.  See the NOTICE file
5*c9f2ebcaSAriel Constenla-Haile#  distributed with this work for additional information
6*c9f2ebcaSAriel Constenla-Haile#  regarding copyright ownership.  The ASF licenses this file
7*c9f2ebcaSAriel Constenla-Haile#  to you under the Apache License, Version 2.0 (the
8*c9f2ebcaSAriel Constenla-Haile#  "License"); you may not use this file except in compliance
9*c9f2ebcaSAriel Constenla-Haile#  with the License.  You may obtain a copy of the License at
10*c9f2ebcaSAriel Constenla-Haile#
11*c9f2ebcaSAriel Constenla-Haile#    http://www.apache.org/licenses/LICENSE-2.0
12*c9f2ebcaSAriel Constenla-Haile#
13*c9f2ebcaSAriel Constenla-Haile#  Unless required by applicable law or agreed to in writing,
14*c9f2ebcaSAriel Constenla-Haile#  software distributed under the License is distributed on an
15*c9f2ebcaSAriel Constenla-Haile#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*c9f2ebcaSAriel Constenla-Haile#  KIND, either express or implied.  See the License for the
17*c9f2ebcaSAriel Constenla-Haile#  specific language governing permissions and limitations
18*c9f2ebcaSAriel Constenla-Haile#  under the License.
19*c9f2ebcaSAriel Constenla-Haile#
20*c9f2ebcaSAriel Constenla-Haile#**************************************************************
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
3059ddfc10SAndre Fischer.INCLUDE :      aprutil_version.mk
313e9d7d56SAndre Fischer
323e9d7d56SAndre Fischer# --- Files --------------------------------------------------------
333e9d7d56SAndre Fischer
3459ddfc10SAndre Fischer# Assemble the full version number from the parts defined in aprutil_version.mk
3559ddfc10SAndre FischerAPRUTIL_VERSION=$(APR_UTIL_MAJOR).$(APR_UTIL_MINOR).$(APR_UTIL_MICRO)
363e9d7d56SAndre Fischer
3759ddfc10SAndre Fischer
3859ddfc10SAndre 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
6259ddfc10SAndre Fischer
6359ddfc10SAndre Fischer
643e9d7d56SAndre FischerCONFIGURE_DIR=
6559ddfc10SAndre 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		\
7059ddfc10SAndre Fischer	--with-iconv="no"
7159ddfc10SAndre Fischer
7259ddfc10SAndre Fischer
7359ddfc10SAndre Fischer# Use our own expat on the Mac.  Maybe we should do this on Linux, too?
7459ddfc10SAndre Fischer.IF "$(OS)" == "MACOSX"
7559ddfc10SAndre Fischer
7659ddfc10SAndre FischerCONFIGURE_FLAGS+= --with-expat=$(OUTDIR)
7759ddfc10SAndre Fischer# The non-standard names of our expat libraries (yes, plural) make
7859ddfc10SAndre Fischer# a special handling in apr-utils configure necessary.
7959ddfc10SAndre FischerPATCH_FILES+= $(TARFILE_NAME).mac.expat.patch
8059ddfc10SAndre Fischer
8159ddfc10SAndre Fischer.ENDIF
8259ddfc10SAndre 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