From 43a963d30079e289cd8ca99e13441f17887f423a Mon Sep 17 00:00:00 2001 From: Benny Prijono Date: Fri, 15 Jan 2010 15:06:20 +0000 Subject: Ticket #694: work on 'make install': - adhere to --prefix - header and lib files installation - pkgconfig creation - also added version.mak to fill in with the correct version git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@3063 74dad513-b988-da41-8d7b-12977e46ad98 --- build.mak.in | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) (limited to 'build.mak.in') diff --git a/build.mak.in b/build.mak.in index c0c60805..bcba2013 100644 --- a/build.mak.in +++ b/build.mak.in @@ -7,17 +7,19 @@ export TARGET_NAME := @target@ export CROSS_COMPILE := @ac_cross_compile@ export LINUX_POLL := @ac_linux_poll@ +export ac_prefix := @prefix@ + LIB_SUFFIX = $(TARGET_NAME).a # Determine which party libraries to use export APP_THIRD_PARTY_LIBS := -lresample-$(TARGET_NAME) -lmilenage-$(TARGET_NAME) -lsrtp-$(TARGET_NAME) +export APP_THIRD_PARTY_EXT := export APP_THIRD_PARTY_LIB_FILES = $(PJ_DIR)/third_party/lib/libresample-$(LIB_SUFFIX) $(PJ_DIR)/third_party/lib/libmilenage-$(LIB_SUFFIX) $(PJ_DIR)/third_party/lib/libsrtp-$(LIB_SUFFIX) ifneq (@ac_no_gsm_codec@,1) ifeq (@ac_external_gsm@,1) # External GSM library -APP_THIRD_PARTY_LIBS += -lgsm -APP_THIRD_PARTY_LIB_FILES += +APP_THIRD_PARTY_EXT += -lgsm else APP_THIRD_PARTY_LIBS += -lgsmcodec-$(TARGET_NAME) APP_THIRD_PARTY_LIB_FILES += $(PJ_DIR)/third_party/lib/libgsmcodec-$(LIB_SUFFIX) @@ -26,8 +28,7 @@ endif ifneq (@ac_no_speex_codec@,1) ifeq (@ac_external_speex@,1) -APP_THIRD_PARTY_LIBS += -lspeex -lspeexdsp -APP_THIRD_PARTY_LIB_FILES += +APP_THIRD_PARTY_EXT += -lspeex -lspeexdsp else APP_THIRD_PARTY_LIBS += -lspeex-$(TARGET_NAME) APP_THIRD_PARTY_LIB_FILES += $(PJ_DIR)/third_party/lib/libspeex-$(LIB_SUFFIX) @@ -46,8 +47,8 @@ endif ifneq ($(findstring pa,@ac_pjmedia_snd@),) ifeq (@ac_external_pa@,1) -APP_THIRD_PARTY_LIBS += -lportaudio -APP_THIRD_PARTY_LIB_FILES += +# External PA +APP_THIRD_PARTY_EXT += -lportaudio else APP_THIRD_PARTY_LIBS += -lportaudio-$(TARGET_NAME) APP_THIRD_PARTY_LIB_FILES += $(PJ_DIR)/third_party/lib/libportaudio-$(LIB_SUFFIX) @@ -85,6 +86,7 @@ export APP_LDLIBS := -lpjsua-$(TARGET_NAME)\ -lpjnath-$(TARGET_NAME)\ -lpjlib-util-$(TARGET_NAME)\ $(APP_THIRD_PARTY_LIBS)\ + $(APP_THIRD_PARTY_EXT)\ -lpj-$(TARGET_NAME)\ @LIBS@ export APP_LIB_FILES = $(PJ_DIR)/pjsip/lib/libpjsua-$(LIB_SUFFIX) \ @@ -99,6 +101,8 @@ export APP_LIB_FILES = $(PJ_DIR)/pjsip/lib/libpjsua-$(LIB_SUFFIX) \ $(APP_THIRD_PARTY_LIB_FILES) \ $(PJ_DIR)/pjlib/lib/libpj-$(LIB_SUFFIX) +# Here are the variabels to use if application is using the library +# from within the source distribution export PJ_DIR := $(PJDIR) export PJ_CC := $(APP_CC) export PJ_CFLAGS := $(APP_CFLAGS) @@ -107,3 +111,11 @@ export PJ_LDFLAGS := $(APP_LDFLAGS) export PJ_LDLIBS := $(APP_LDLIBS) export PJ_LIB_FILES := $(APP_LIB_FILES) +# And here are the variables to use if application is using the +# library from the install location (i.e. --prefix) +export PJ_INSTALL_DIR := @prefix@ +export PJ_INSTALL_INC_DIR := $(PJ_INSTALL_DIR)/include +export PJ_INSTALL_LIB_DIR := $(PJ_INSTALL_DIR)/lib +export PJ_INSTALL_CFLAGS := -I$(PJ_INSTALL_INC_DIR) -DPJ_AUTOCONF=1 @CFLAGS@ +export PJ_INSTALL_CXXFLAGS := $(PJ_INSTALL_CFLAGS) +export PJ_INSTALL_LDFLAGS := -L$(PJ_INSTALL_LIB_DIR) $(APP_LDLIBS) -- cgit v1.2.3