xref: /aoo41x/ext_libraries/apr/makefile.mk (revision 677439b9)
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
25TARGET=apr
26
27# --- Settings -----------------------------------------------------
28
29.INCLUDE :	settings.mk
30.INCLUDE :      apr_version.mk
31
32# --- Files --------------------------------------------------------
33
34# Assemble the full version number from the parts defined in apr_version.mk
35APRVERSION=$(APR_MAJOR).$(APR_MINOR).$(APR_MICRO)
36
37TARFILE_NAME=$(PRJNAME)-$(APRVERSION)
38TARFILE_MD5=97262fe54dddaf583eaaee3497a426e1
39
40PATCH_FILES=apr-1.4.5.patch
41
42.IF "$(OS)"=="WNT"
43
44CONFIGURE_ACTION=cp include/apr.hw include/apr.h
45BUILD_DIR=
46BUILD_ACTION=INCLUDE="$(INCLUDE);./include"  nmake -f Makefile.win buildall
47
48#INSTALL_ACTION=cp Release/libapr-1.lib $(OUTDIR)/lib/libapr-1.lib
49
50.ELIF "$(GUI)" == "OS2"
51
52@all:
53	@echo "using system apr. nothing do do."
54
55.ELSE
56
57CONFIGURE_DIR=
58CONFIGURE_ACTION=.$/configure --prefix=$(OUTDIR) --includedir=$(OUTDIR)$/inc$/apr
59CONFIGURE_FLAGS=
60
61BUILD_DIR=$(CONFIGURE_DIR)
62BUILD_ACTION=$(GNUMAKE)
63BUILD_FLAGS+= -j$(EXTMAXPROCESS)
64
65# Make apr-1-config believe that apr has been installed.
66INSTALL_ACTION=if [ -f apr-1-config.orig ]; then mv -f apr-1-config.orig apr-1-config; fi;	\
67	cp apr-1-config apr-1-config.orig;							\
68	sed -e "s/^location=source/location=installed/;s/^\(installbuilddir=.*\)\/.*/\\1\/lib\/apr\"/" apr-1-config > apr-1-config.installed;								\
69	mv -f apr-1-config.installed apr-1-config;	\
70	chmod +x apr-1-config
71
72.ENDIF
73
74OUT2INC+=include$/apr*.h
75OUT2INC_SUBDIR=apr
76
77.IF "$(OS)"=="WNT"
78OUT2LIB+=LibR$/*.lib
79OUT2LIB+=LibR$/*.pdb
80OUT2LIB+=Release$/libaprapp-1.lib
81OUT2LIB+=Release$/libaprapp-1.pdb
82OUT2LIB+=Release$/libapr-1.lib
83OUT2LIB+=Release$/libapr-1.exp
84OUT2BIN+=Release$/libapr-1.dll
85OUT2BIN+=Release$/libapr-1.pdb
86.ELSE
87.IF "$(OS)"=="MACOSX"
88OUT2LIB+=.libs/libapr-1.*dylib
89.ELSE
90OUT2LIB+=.libs/libapr-1.so*
91.ENDIF
92OUT2BIN=build/apr_rules.mk
93OUT2BIN+=libtool
94OUT2BIN+=apr-1-config
95.ENDIF
96
97
98# --- Targets ------------------------------------------------------
99
100.INCLUDE : set_ext.mk
101.INCLUDE : target.mk
102.INCLUDE : tg_ext.mk
103