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