xref: /aoo41x/ext_libraries/apr-util/makefile.mk (revision 56ff6264)
1c9f2ebcaSAriel Constenla-Haile#**************************************************************
2c9f2ebcaSAriel Constenla-Haile#
3c9f2ebcaSAriel Constenla-Haile#  Licensed to the Apache Software Foundation (ASF) under one
4c9f2ebcaSAriel Constenla-Haile#  or more contributor license agreements.  See the NOTICE file
5c9f2ebcaSAriel Constenla-Haile#  distributed with this work for additional information
6c9f2ebcaSAriel Constenla-Haile#  regarding copyright ownership.  The ASF licenses this file
7c9f2ebcaSAriel Constenla-Haile#  to you under the Apache License, Version 2.0 (the
8c9f2ebcaSAriel Constenla-Haile#  "License"); you may not use this file except in compliance
9c9f2ebcaSAriel Constenla-Haile#  with the License.  You may obtain a copy of the License at
10c9f2ebcaSAriel Constenla-Haile#
11c9f2ebcaSAriel Constenla-Haile#    http://www.apache.org/licenses/LICENSE-2.0
12c9f2ebcaSAriel Constenla-Haile#
13c9f2ebcaSAriel Constenla-Haile#  Unless required by applicable law or agreed to in writing,
14c9f2ebcaSAriel Constenla-Haile#  software distributed under the License is distributed on an
15c9f2ebcaSAriel Constenla-Haile#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16c9f2ebcaSAriel Constenla-Haile#  KIND, either express or implied.  See the License for the
17c9f2ebcaSAriel Constenla-Haile#  specific language governing permissions and limitations
18c9f2ebcaSAriel Constenla-Haile#  under the License.
19c9f2ebcaSAriel Constenla-Haile#
20c9f2ebcaSAriel 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
302a5ff614SAndre Fischer.INCLUDE :	aprutil_version.mk
313e9d7d56SAndre Fischer
323e9d7d56SAndre Fischer# --- Files --------------------------------------------------------
333e9d7d56SAndre Fischer
34fdf35928SAndre Fischer.IF "$(SYSTEM_APR_UTIL)"=="YES"
35fdf35928SAndre Fischer
36fdf35928SAndre Fischerall:
37fdf35928SAndre Fischer	@echo "Using system apr-util.  Does not have to be built."
38fdf35928SAndre Fischer
39fdf35928SAndre Fischer.ELSE
40fdf35928SAndre Fischer
4159ddfc10SAndre Fischer# Assemble the full version number from the parts defined in aprutil_version.mk
4258b02f87SAndre FischerAPR_UTIL_VERSION=$(APR_UTIL_MAJOR).$(APR_UTIL_MINOR).$(APR_UTIL_MICRO)
433e9d7d56SAndre Fischer
4459ddfc10SAndre Fischer
4558b02f87SAndre FischerTARFILE_NAME=$(PRJNAME)-$(APR_UTIL_VERSION)
463e9d7d56SAndre FischerTARFILE_MD5=666a5d56098a9debf998510e304c8095
473e9d7d56SAndre Fischer
483e9d7d56SAndre Fischer.IF "$(OS)"=="WNT"
493e9d7d56SAndre Fischer
503e9d7d56SAndre FischerADDITIONAL_FILES=Makefile Module_apr-util.mk Library_apr-util.mk Package_inc.mk
513e9d7d56SAndre Fischer
523e9d7d56SAndre FischerPATCH_FILES= \
533e9d7d56SAndre Fischer    $(TARFILE_NAME).apu.hw.patch \
543e9d7d56SAndre Fischer    $(TARFILE_NAME).makewin32.patch
553e9d7d56SAndre Fischer
563e9d7d56SAndre FischerCONFIGURE_DIR=
573e9d7d56SAndre FischerCONFIGURE_ACTION=cp include/apu.hw include/apu.h;							\
583e9d7d56SAndre Fischer	cp include/apr_ldap.hw include/apr_ldap.h;								\
593e9d7d56SAndre Fischer	cp include/private/apu_config.hw include/private/apu_config.h;			\
603e9d7d56SAndre Fischer	cp include/private/apu_select_dbm.hw include/private/apu_select_dbm.h
613e9d7d56SAndre FischerCONFIGURE_FLAGS=
623e9d7d56SAndre Fischer
633e9d7d56SAndre FischerBUILD_DIR=$(CONFIGURE_DIR)
643e9d7d56SAndre FischerBUILD_ACTION=$(GNUMAKE)
6594c338afSHerbert Dürr#BUILD_FLAGS+= -j$(EXTMAXPROCESS)
663e9d7d56SAndre Fischer
674023fbb7SYuri Dario.ELIF "$(GUI)" == "OS2"
684023fbb7SYuri Dario
694023fbb7SYuri Dario@all:
704023fbb7SYuri Dario	@echo "using system apr-util. nothing do do."
714023fbb7SYuri Dario
724023fbb7SYuri Dario
733e9d7d56SAndre Fischer.ELSE
743e9d7d56SAndre Fischer
7559ddfc10SAndre Fischer
7659ddfc10SAndre Fischer
773e9d7d56SAndre FischerCONFIGURE_DIR=
7859ddfc10SAndre FischerCONFIGURE_ACTION=autoconf && .$/configure
793e9d7d56SAndre FischerCONFIGURE_FLAGS=								\
803e9d7d56SAndre Fischer	--with-apr=$(OUTDIR)/bin/apr-1-config		\
813e9d7d56SAndre Fischer	--prefix=$(OUTDIR)							\
823e9d7d56SAndre Fischer	--includedir=$(OUTDIR)$/inc$/apr-util		\
8359ddfc10SAndre Fischer	--with-iconv="no"
8459ddfc10SAndre Fischer
8559ddfc10SAndre Fischer
86605aedb6SAriel Constenla-Haile# Use our own expat on the Mac.  Maybe we should do this on Linux, too? Yes!
87605aedb6SAriel Constenla-Haile.IF "$(OS)" == "MACOSX" || ("$(OS)" == "LINUX" && "$(SYSTEM_EXPAT)"!="YES")
8859ddfc10SAndre Fischer
89*56ff6264SAriel Constenla-Haileexpat_CPPFLAGS=-I$(SOLARINCDIR)$/external
90*56ff6264SAriel Constenla-Haileexpat_LDFLAGS+=-L$(SOLARLIBDIR)
91*56ff6264SAriel Constenla-HaileCONFIGURE_FLAGS+= SOLARINCDIR=$(SOLARINCDIR) SOLARLIBDIR=$(SOLARLIBDIR) \
92*56ff6264SAriel Constenla-Haile	CPPFLAGS=$(expat_CPPFLAGS) LDFLAGS=$(expat_LDFLAGS)
93*56ff6264SAriel Constenla-Haile
9459ddfc10SAndre Fischer# The non-standard names of our expat libraries (yes, plural) make
9559ddfc10SAndre Fischer# a special handling in apr-utils configure necessary.
96605aedb6SAriel Constenla-HailePATCH_FILES+= $(TARFILE_NAME).expat.patch
9759ddfc10SAndre Fischer
9859ddfc10SAndre Fischer.ENDIF
9959ddfc10SAndre Fischer
1003e9d7d56SAndre Fischer
1013e9d7d56SAndre FischerBUILD_DIR=$(CONFIGURE_DIR)
1023e9d7d56SAndre FischerBUILD_ACTION=$(GNUMAKE)
1033e9d7d56SAndre FischerBUILD_FLAGS+= -j$(EXTMAXPROCESS)
1043e9d7d56SAndre Fischer
1053e9d7d56SAndre Fischer# Make apu-1-config believe that apr-util has been installed.
1063e9d7d56SAndre FischerINSTALL_ACTION=if [ -f apu-1-config.orig ]; then mv -f apu-1-config.orig apu-1-config; fi;	\
1073e9d7d56SAndre Fischer	cp apu-1-config apu-1-config.orig;							\
1083e9d7d56SAndre Fischer	sed -e "s/^location=source/location=installed/;s/^\(installbuilddir=.*\)\/.*/\\1\/lib\/apr-util\"/" apu-1-config > apu-1-config.installed;								\
1093e9d7d56SAndre Fischer	mv -f apu-1-config.installed apu-1-config;	\
1103e9d7d56SAndre Fischer	chmod +x apu-1-config
1113e9d7d56SAndre Fischer
1123e9d7d56SAndre FischerOUT2INC+=include$/apr*.h
1133e9d7d56SAndre FischerOUT2INC+=include$/apu.h
1143e9d7d56SAndre FischerOUT2INC_SUBDIR=apr-util
1153e9d7d56SAndre Fischer
1163e9d7d56SAndre Fischer.IF "$(OS)"=="MACOSX"
1173e9d7d56SAndre FischerOUT2LIB+=.libs/libaprutil-1.*dylib
1183e9d7d56SAndre Fischer.ELSE
1193e9d7d56SAndre FischerOUT2LIB=.libs/libaprutil-1.so*
1203e9d7d56SAndre Fischer.ENDIF
1213e9d7d56SAndre FischerOUT2BIN=apu-1-config
1223e9d7d56SAndre Fischer
1233e9d7d56SAndre Fischer.ENDIF
1243e9d7d56SAndre Fischer
1253e9d7d56SAndre Fischer# --- Targets ------------------------------------------------------
1263e9d7d56SAndre Fischer
1273e9d7d56SAndre Fischer.INCLUDE : set_ext.mk
1283e9d7d56SAndre Fischer.INCLUDE : target.mk
1293e9d7d56SAndre Fischer.INCLUDE : tg_ext.mk
1303e9d7d56SAndre Fischer
131fdf35928SAndre Fischer.ENDIF
132