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=98492e965963f852ab29f9e61b2ad700 46 47.IF "$(OS)"=="WNT" 48 49PATCH_FILES+= $(TARFILE_NAME)-windows.patch 50PATCH_FILES+= $(TARFILE_NAME)-no-devenv.patch 51CONFIGURE_ACTION=cp include/apr.hw include/apr.h 52BUILD_DIR= 53BUILD_ACTION=INCLUDE="$(INCLUDE);./include" USEMAK=1 nmake -f Makefile.win buildall 54 55.ELIF "$(GUI)" == "OS2" 56 57@all: 58 @echo "using system apr. nothing do do." 59 60.ELSE 61 62.IF "$(OS)"=="MACOSX" 63PATCH_FILES+= $(TARFILE_NAME)-darwin19.6.patch 64.ENDIF 65 66CONFIGURE_DIR= 67CONFIGURE_ACTION=.$/configure --prefix=$(OUTDIR) --includedir=$(OUTDIR)$/inc$/apr 68CONFIGURE_FLAGS= 69 70BUILD_DIR=$(CONFIGURE_DIR) 71BUILD_ACTION=$(GNUMAKE) --debug=b 72#BUILD_FLAGS+= -j$(EXTMAXPROCESS) 73 74# Make apr-1-config believe that apr has been installed. 75INSTALL_ACTION=if [ -f apr-1-config.orig ]; then mv -f apr-1-config.orig apr-1-config; fi; \ 76 cp apr-1-config apr-1-config.orig; \ 77 sed -e "s/^location=source/location=installed/;s/^\(installbuilddir=.*\)\/.*/\\1\/lib\/apr\"/" apr-1-config > apr-1-config.installed; \ 78 mv -f apr-1-config.installed apr-1-config; \ 79 chmod +x apr-1-config 80 81.ENDIF 82 83OUT2INC+=include$/apr*.h 84OUT2INC_SUBDIR=apr 85 86.IF "$(OS)"=="WNT" 87OUT2LIB+=LibR$/*.lib 88OUT2LIB+=LibR$/*.pdb 89OUT2LIB+=Release$/libaprapp-1.lib 90OUT2LIB+=Release$/libaprapp-1.pdb 91OUT2LIB+=Release$/libapr-1.lib 92OUT2LIB+=Release$/libapr-1.exp 93OUT2BIN+=Release$/libapr-1.dll 94OUT2BIN+=Release$/libapr-1.pdb 95.ELSE 96.IF "$(OS)"=="MACOSX" 97OUT2LIB+=.libs/libapr-1.*dylib 98.ELSE 99OUT2LIB+=.libs/libapr-1.so* 100.ENDIF 101OUT2BIN=build/apr_rules.mk 102OUT2BIN+=libtool 103OUT2BIN+=apr-1-config 104.ENDIF 105 106 107# --- Targets ------------------------------------------------------ 108 109.INCLUDE : set_ext.mk 110.INCLUDE : target.mk 111.INCLUDE : tg_ext.mk 112 113.ENDIF 114