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