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. 47417a3a5eSAriel Constenla-HaileTARFILE_MD5=f65fbbd72926c8e7cf0dbd4ada03b0d226f461fd 483e9d7d56SAndre Fischer 495661f8d9SDon LewisPATCH_FILES=NULbytes.patch 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 7964a494d0SAriel Constenla-Haile# Export ENABLE_SERF_LOGGING=YES to enable serf logging 8064a494d0SAriel Constenla-Haile.IF "$(ENABLE_SERF_LOGGING)" == "YES" 8164a494d0SAriel Constenla-HailePATCH_FILES+=$(TARFILE_NAME).logging.patch 8264a494d0SAriel Constenla-HaileCDEFS+=-DENABLE_SERF_VERBOSE -DSERF_VERBOSE 8364a494d0SAriel Constenla-Haile.ENDIF 8464a494d0SAriel Constenla-Haile 853e9d7d56SAndre FischerCONFIGURE_DIR= 863e9d7d56SAndre FischerCONFIGURE_ACTION=autoconf && .$/configure 871fa2825bSAriel Constenla-Haile 88*0986a24cSArrigo Marchiori.IF "$(OS)"=="MACOSX" || "$(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# On Linux/Mac we need the content of CDEFS in CFLAGS so that the ssl headers are searched for 963e9d7d56SAndre Fischer# in a directory that corresponds to the directory that is searched for the ssl library. 973e9d7d56SAndre FischerCONFIGURE_FLAGS='CFLAGS=$(CDEFS)' 983e9d7d56SAndre Fischer.ENDIF 993e9d7d56SAndre Fischer 1003e9d7d56SAndre FischerBUILD_DIR=$(CONFIGURE_DIR) 1013e9d7d56SAndre FischerBUILD_ACTION=$(GNUMAKE) 1023e9d7d56SAndre FischerBUILD_FLAGS+= -j$(EXTMAXPROCESS) 1033e9d7d56SAndre Fischer 10410e20387SAndre Fischer.IF "$(OS)"=="MACOSX" 10510e20387SAndre Fischer# Serf names its library only with the major number. 10610e20387SAndre Fischer# We are using minor and micro as well. Fix that here 10710e20387SAndre Fischer# by creating a copy with the right name. 108a46ef990SJim JagielskiSERF_ORIGINAL_LIB=.libs/libserf-$(SERF_MAJOR).0.dylib 10910e20387SAndre FischerSERF_FIXED_LIB=.libs/libserf-$(LIBSERFVERSION).0.dylib 11094a8b355SJürgen SchmidtINSTALL_ACTION=if [ -f "$(SERF_ORIGINAL_LIB)" -a ! -f "$(SERF_FIXED_LIB)" ]; then cp $(SERF_ORIGINAL_LIB) $(SERF_FIXED_LIB); fi 11110e20387SAndre Fischer.ENDIF 11210e20387SAndre Fischer 1133e9d7d56SAndre FischerOUT2INC+=serf*.h 1143e9d7d56SAndre FischerOUT2INC_SUBDIR=serf 1153e9d7d56SAndre Fischer 1163e9d7d56SAndre Fischer.IF "$(OS)"=="MACOSX" 11710e20387SAndre FischerOUT2LIB+=$(SERF_FIXED_LIB) 118127ef3e2SJürgen SchmidtOUT2LIB+=.libs/libserf-1.*dylib 1193e9d7d56SAndre Fischer.ELSE 1203e9d7d56SAndre FischerOUT2LIB=.libs/libserf-1.so* 1213e9d7d56SAndre Fischer.ENDIF 1223e9d7d56SAndre Fischer 1233e9d7d56SAndre Fischer.ENDIF 1243e9d7d56SAndre Fischer 1253e9d7d56SAndre Fischer# --- Targets ------------------------------------------------------ 1263e9d7d56SAndre Fischer 1273e9d7d56SAndre Fischer.INCLUDE : set_ext.mk 1283e9d7d56SAndre Fischer.INCLUDE : target.mk 1293e9d7d56SAndre Fischer.INCLUDE : tg_ext.mk 130fdf35928SAndre Fischer 131fdf35928SAndre Fischer.ENDIF 132