1c9f2ebcaSAriel Constenla-Haile#************************************************************** 2c9f2ebcaSAriel Constenla-Haile# 3c9f2ebcaSAriel Constenla-Haile# Licensed to the Apache Software Foundation (ASF) under one 4c9f2ebcaSAriel Constenla-Haile# or more contributor license agreements. See the NOTICE file 5c9f2ebcaSAriel Constenla-Haile# distributed with this work for additional information 6c9f2ebcaSAriel Constenla-Haile# regarding copyright ownership. The ASF licenses this file 7c9f2ebcaSAriel Constenla-Haile# to you under the Apache License, Version 2.0 (the 8c9f2ebcaSAriel Constenla-Haile# "License"); you may not use this file except in compliance 9c9f2ebcaSAriel Constenla-Haile# with the License. You may obtain a copy of the License at 10c9f2ebcaSAriel Constenla-Haile# 11c9f2ebcaSAriel Constenla-Haile# http://www.apache.org/licenses/LICENSE-2.0 12c9f2ebcaSAriel Constenla-Haile# 13c9f2ebcaSAriel Constenla-Haile# Unless required by applicable law or agreed to in writing, 14c9f2ebcaSAriel Constenla-Haile# software distributed under the License is distributed on an 15c9f2ebcaSAriel Constenla-Haile# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16c9f2ebcaSAriel Constenla-Haile# KIND, either express or implied. See the License for the 17c9f2ebcaSAriel Constenla-Haile# specific language governing permissions and limitations 18c9f2ebcaSAriel Constenla-Haile# under the License. 19c9f2ebcaSAriel Constenla-Haile# 20c9f2ebcaSAriel Constenla-Haile#************************************************************** 213e9d7d56SAndre Fischer 223e9d7d56SAndre FischerPRJ=. 233e9d7d56SAndre Fischer 243e9d7d56SAndre FischerPRJNAME=serf 253e9d7d56SAndre FischerTARGET=so_serf 263e9d7d56SAndre Fischer 273e9d7d56SAndre Fischer# --- Settings ----------------------------------------------------- 283e9d7d56SAndre Fischer 293e9d7d56SAndre Fischer.INCLUDE : settings.mk 3059ddfc10SAndre Fischer.INCLUDE : serf_version.mk 313e9d7d56SAndre Fischer 323e9d7d56SAndre Fischer# --- Files -------------------------------------------------------- 333e9d7d56SAndre Fischer 34fdf35928SAndre Fischer.IF "$(SYSTEM_SERF)"=="YES" 35fdf35928SAndre Fischer 36fdf35928SAndre Fischerall: 37fdf35928SAndre Fischer @echo "Using system serf. Does not have to be built." 38fdf35928SAndre Fischer 39fdf35928SAndre Fischer.ELSE 40fdf35928SAndre Fischer 4159ddfc10SAndre Fischer# Assemble the full version number from the parts defined in serf_version.mk 4259ddfc10SAndre FischerLIBSERFVERSION=$(SERF_MAJOR).$(SERF_MINOR).$(SERF_MICRO) 433e9d7d56SAndre Fischer 443e9d7d56SAndre FischerTARFILE_NAME=$(PRJNAME)-$(LIBSERFVERSION) 4510e20387SAndre Fischer# This is the SHA1 checksum, not MD5 but tg_ext.mk does not now about this and, 4610e20387SAndre Fischer# thankfully, does not care. 47*64a494d0SAriel Constenla-HaileTARFILE_MD5=30b29bd9214d50887abcc20cf82096aaaf5d1d61 483e9d7d56SAndre Fischer 4910e20387SAndre FischerPATCH_FILES= 50f4d5be35SOliver-Rainer Wittmann 513e9d7d56SAndre Fischer.IF "$(OS)"=="WNT" 523e9d7d56SAndre Fischer 533e9d7d56SAndre FischerCONFIGURE_DIR= 543e9d7d56SAndre FischerCONFIGURE_ACTION= 553e9d7d56SAndre FischerCONFIGURE_FLAGS= 563e9d7d56SAndre Fischer 5710e20387SAndre FischerBUILD_DIR= 583e9d7d56SAndre FischerBUILD_ACTION=$(GNUMAKE) 5910e20387SAndre FischerBUILD_FLAGS+= -f ../../../../win/Makefile -j$(EXTMAXPROCESS) 603e9d7d56SAndre Fischer 614023fbb7SYuri Dario.ELIF "$(GUI)" == "OS2" 624023fbb7SYuri Dario 634023fbb7SYuri Dario@all: 644023fbb7SYuri Dario @echo "using system serf. nothing do do." 654023fbb7SYuri Dario 663e9d7d56SAndre Fischer.ELSE 673e9d7d56SAndre Fischer 68d0556839SAriel Constenla-Haile.IF "$(OS)"=="MACOSX" || "$(OS)"=="FREEBSD" || "$(OS)"=="LINUX" 693e9d7d56SAndre Fischer# Do not link against expat. It is not necessary (apr-util is already linked against it) 703e9d7d56SAndre Fischer# and does not work (we use a different expat library schema.) 71305d5283SAndre FischerPATCH_FILES+=$(TARFILE_NAME).libs.patch 72d0556839SAriel Constenla-Haile.ENDIF 73d0556839SAriel Constenla-Haile 74d0556839SAriel Constenla-Haile.IF "$(OS)"=="LINUX" 753e9d7d56SAndre Fischer# Add -ldl as last library so that the linker has no trouble resolving dependencies. 76305d5283SAndre FischerPATCH_FILES+=$(TARFILE_NAME).ldl.patch 773e9d7d56SAndre Fischer.ENDIF 783e9d7d56SAndre Fischer 79*64a494d0SAriel Constenla-Haile# Export ENABLE_SERF_LOGGING=YES to enable serf logging 80*64a494d0SAriel Constenla-Haile.IF "$(ENABLE_SERF_LOGGING)" == "YES" 81*64a494d0SAriel Constenla-HailePATCH_FILES+=$(TARFILE_NAME).logging.patch 82*64a494d0SAriel Constenla-HaileCDEFS+=-DENABLE_SERF_VERBOSE -DSERF_VERBOSE 83*64a494d0SAriel Constenla-Haile.ENDIF 84*64a494d0SAriel Constenla-Haile 853e9d7d56SAndre FischerCONFIGURE_DIR= 863e9d7d56SAndre FischerCONFIGURE_ACTION=autoconf && .$/configure 871fa2825bSAriel Constenla-Haile 881fa2825bSAriel Constenla-Haile.IF "$(OS)"=="LINUX" 891fa2825bSAriel Constenla-Haile.IF "$(SYSTEM_OPENSSL)"=="YES" 901fa2825bSAriel Constenla-HaileCDEFS+=$(OPENSSL_CFLAGS) 911fa2825bSAriel Constenla-Haile.ELSE 921fa2825bSAriel Constenla-HaileOPENSSLINCDIR=external 931fa2825bSAriel Constenla-HaileCDEFS+=-I$(SOLARINCDIR)$/$(OPENSSLINCDIR) 941fa2825bSAriel Constenla-Haile.ENDIF 951fa2825bSAriel Constenla-Haile.ENDIF 9610e20387SAndre Fischer 971fa2825bSAriel Constenla-Haile# On Linux/Mac we need the content of CDEFS in CFLAGS so that the ssl headers are searched for 9810e20387SAndre Fischer.IF "$(OS)"=="MACOSX" || "$(OS)"=="LINUX" 993e9d7d56SAndre Fischer# in a directory that corresponds to the directory that is searched for the ssl library. 1003e9d7d56SAndre FischerCONFIGURE_FLAGS='CFLAGS=$(CDEFS)' 1013e9d7d56SAndre Fischer.ENDIF 1023e9d7d56SAndre Fischer 1033e9d7d56SAndre FischerBUILD_DIR=$(CONFIGURE_DIR) 1043e9d7d56SAndre FischerBUILD_ACTION=$(GNUMAKE) 1053e9d7d56SAndre FischerBUILD_FLAGS+= -j$(EXTMAXPROCESS) 1063e9d7d56SAndre Fischer 10710e20387SAndre Fischer.IF "$(OS)"=="MACOSX" 10810e20387SAndre Fischer# Serf names its library only with the major number. 10910e20387SAndre Fischer# We are using minor and micro as well. Fix that here 11010e20387SAndre Fischer# by creating a copy with the right name. 11110e20387SAndre FischerSERF_ORIGINAL_LIB=.libs/libserf-$(SERF_MAJOR).0.0.0.dylib 11210e20387SAndre FischerSERF_FIXED_LIB=.libs/libserf-$(LIBSERFVERSION).0.dylib 11394a8b355SJürgen SchmidtINSTALL_ACTION=if [ -f "$(SERF_ORIGINAL_LIB)" -a ! -f "$(SERF_FIXED_LIB)" ]; then cp $(SERF_ORIGINAL_LIB) $(SERF_FIXED_LIB); fi 11410e20387SAndre Fischer.ENDIF 11510e20387SAndre Fischer 1163e9d7d56SAndre FischerOUT2INC+=serf*.h 1173e9d7d56SAndre FischerOUT2INC_SUBDIR=serf 1183e9d7d56SAndre Fischer 1193e9d7d56SAndre Fischer.IF "$(OS)"=="MACOSX" 12010e20387SAndre FischerOUT2LIB+=$(SERF_FIXED_LIB) 121127ef3e2SJürgen SchmidtOUT2LIB+=.libs/libserf-1.*dylib 1223e9d7d56SAndre Fischer.ELSE 1233e9d7d56SAndre FischerOUT2LIB=.libs/libserf-1.so* 1243e9d7d56SAndre Fischer.ENDIF 1253e9d7d56SAndre Fischer 1263e9d7d56SAndre Fischer.ENDIF 1273e9d7d56SAndre Fischer 1283e9d7d56SAndre Fischer# --- Targets ------------------------------------------------------ 1293e9d7d56SAndre Fischer 1303e9d7d56SAndre Fischer.INCLUDE : set_ext.mk 1313e9d7d56SAndre Fischer.INCLUDE : target.mk 1323e9d7d56SAndre Fischer.INCLUDE : tg_ext.mk 133fdf35928SAndre Fischer 134fdf35928SAndre Fischer.ENDIF 135