xref: /aoo41x/ext_libraries/apr-util/makefile.mk (revision 746748b1)
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
42APR_UTIL_VERSION=$(APR_UTIL_MAJOR).$(APR_UTIL_MINOR).$(APR_UTIL_MICRO)
43
44
45TARFILE_NAME=$(PRJNAME)-$(APR_UTIL_VERSION)
46TARFILE_MD5=866825c04da827c6e5f53daff5569f42
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)
65#BUILD_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? Yes!
87.IF "$(OS)" == "MACOSX" || ("$(OS)" == "LINUX" && "$(SYSTEM_EXPAT)"!="YES")
88
89expat_CPPFLAGS=-I$(SOLARINCDIR)$/external
90expat_LDFLAGS+=-L$(SOLARLIBDIR)
91CONFIGURE_FLAGS+= SOLARINCDIR=$(SOLARINCDIR) SOLARLIBDIR=$(SOLARLIBDIR) \
92	CPPFLAGS=$(expat_CPPFLAGS) LDFLAGS=$(expat_LDFLAGS)
93
94# The non-standard names of our expat libraries (yes, plural) make
95# a special handling in apr-utils configure necessary.
96PATCH_FILES+= $(TARFILE_NAME).expat.patch
97
98.ENDIF
99
100
101BUILD_DIR=$(CONFIGURE_DIR)
102BUILD_ACTION=$(GNUMAKE)
103BUILD_FLAGS+= -j$(EXTMAXPROCESS)
104
105# Make apu-1-config believe that apr-util has been installed.
106INSTALL_ACTION=if [ -f apu-1-config.orig ]; then mv -f apu-1-config.orig apu-1-config; fi;	\
107	cp apu-1-config apu-1-config.orig;							\
108	sed -e "s/^location=source/location=installed/;s/^\(installbuilddir=.*\)\/.*/\\1\/lib\/apr-util\"/" apu-1-config > apu-1-config.installed;								\
109	mv -f apu-1-config.installed apu-1-config;	\
110	chmod +x apu-1-config
111
112OUT2INC+=include$/apr*.h
113OUT2INC+=include$/apu*.h
114OUT2INC_SUBDIR=apr-util
115
116.IF "$(OS)"=="MACOSX"
117OUT2LIB+=.libs/libaprutil-1.*dylib
118.ELSE
119OUT2LIB=.libs/libaprutil-1.so*
120.ENDIF
121OUT2BIN=apu-1-config
122
123.ENDIF
124
125# --- Targets ------------------------------------------------------
126
127.INCLUDE : set_ext.mk
128.INCLUDE : target.mk
129.INCLUDE : tg_ext.mk
130
131.ENDIF
132