Changeset 3063


Ignore:
Timestamp:
Jan 15, 2010 3:06:20 PM (15 years ago)
Author:
bennylp
Message:

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
Location:
pjproject/trunk
Files:
2 added
4 edited
1 moved

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/Makefile

    r3024 r3063  
    3636        pjmedia/lib/libpjmedia-audiodev-$(TARGET_NAME).a \ 
    3737        pjmedia/lib/libpjmedia-codec-$(TARGET_NAME).a \ 
    38         pjsip/lib/libpjsip-$(TARGET_NAME).a \ 
     38        pjsip/lib/libpjsip-$(TARGET_NAME).a \ 
    3939        pjsip/lib/libpjsip-ua-$(TARGET_NAME).a \ 
    4040        pjsip/lib/libpjsip-simple-$(TARGET_NAME).a \ 
     
    9191        cd tests/pjsua && python runall.py 
    9292 
    93 prefix = /usr/local 
     93prefix = $(ac_prefix) 
     94include version.mak 
     95 
    9496install: 
    9597        mkdir -p $(DESTDIR)$(prefix)/lib 
    96         cp -L $$(find . -name '*.a') $(DESTDIR)$(prefix)/lib 
     98        cp -f $(APP_LIB_FILES) $(DESTDIR)$(prefix)/lib/ 
    9799        mkdir -p $(DESTDIR)$(prefix)/include 
    98         cp -RL $$(find  . -name include) $(DESTDIR)$(prefix) 
    99         cd $(DESTDIR)$(prefix)/lib && for i in $$(find . -name 'libpj*a'); do\ 
    100                 ln -s $$i $$(echo $$i | sed -e "s/-$(TARGET_NAME)//");\ 
     100        for d in pjlib pjlib-util pjnath pjmedia pjsip; do \ 
     101                cp -RLf $$d/include/* $(DESTDIR)$(prefix)/include/; \ 
    101102        done 
    102103        mkdir -p $(DESTDIR)$(prefix)/lib/pkgconfig 
    103         sed -e "s!@PREFIX@!$(DESTDIR)$(prefix)!" libpj.pc.in > $(DESTDIR)/$(prefix)/lib/pkgconfig/libpj.pc 
     104        sed -e "s!@PREFIX@!$(DESTDIR)$(prefix)!" libpjproject.pc.in | \ 
     105                sed -e "s/@PJ_VERSION@/$(PJ_VERSION)/" | \ 
     106                sed -e "s!@PJ_LDLIBS@!$(PJ_LDLIBS)!" | \ 
     107                sed -e "s!@PJ_INSTALL_CFLAGS@!$(PJ_INSTALL_CFLAGS)!" > $(DESTDIR)/$(prefix)/lib/pkgconfig/libpjproject.pc 
  • pjproject/trunk/build.mak.in

    r3062 r3063  
    88export LINUX_POLL := @ac_linux_poll@  
    99 
     10export ac_prefix := @prefix@ 
     11 
    1012LIB_SUFFIX = $(TARGET_NAME).a 
    1113 
    1214# Determine which party libraries to use 
    1315export APP_THIRD_PARTY_LIBS := -lresample-$(TARGET_NAME) -lmilenage-$(TARGET_NAME) -lsrtp-$(TARGET_NAME) 
     16export APP_THIRD_PARTY_EXT := 
    1417export 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) 
    1518 
     
    1720ifeq (@ac_external_gsm@,1) 
    1821# External GSM library 
    19 APP_THIRD_PARTY_LIBS += -lgsm 
    20 APP_THIRD_PARTY_LIB_FILES += 
     22APP_THIRD_PARTY_EXT += -lgsm 
    2123else 
    2224APP_THIRD_PARTY_LIBS += -lgsmcodec-$(TARGET_NAME) 
     
    2729ifneq (@ac_no_speex_codec@,1) 
    2830ifeq (@ac_external_speex@,1) 
    29 APP_THIRD_PARTY_LIBS += -lspeex -lspeexdsp 
    30 APP_THIRD_PARTY_LIB_FILES += 
     31APP_THIRD_PARTY_EXT += -lspeex -lspeexdsp 
    3132else 
    3233APP_THIRD_PARTY_LIBS += -lspeex-$(TARGET_NAME) 
     
    4748ifneq ($(findstring pa,@ac_pjmedia_snd@),) 
    4849ifeq (@ac_external_pa@,1) 
    49 APP_THIRD_PARTY_LIBS += -lportaudio 
    50 APP_THIRD_PARTY_LIB_FILES +=  
     50# External PA 
     51APP_THIRD_PARTY_EXT += -lportaudio 
    5152else 
    5253APP_THIRD_PARTY_LIBS += -lportaudio-$(TARGET_NAME) 
     
    8687        -lpjlib-util-$(TARGET_NAME)\ 
    8788        $(APP_THIRD_PARTY_LIBS)\ 
     89        $(APP_THIRD_PARTY_EXT)\ 
    8890        -lpj-$(TARGET_NAME)\ 
    8991        @LIBS@ 
     
    100102        $(PJ_DIR)/pjlib/lib/libpj-$(LIB_SUFFIX) 
    101103 
     104# Here are the variabels to use if application is using the library 
     105# from within the source distribution 
    102106export PJ_DIR := $(PJDIR) 
    103107export PJ_CC := $(APP_CC) 
     
    108112export PJ_LIB_FILES := $(APP_LIB_FILES) 
    109113 
     114# And here are the variables to use if application is using the 
     115# library from the install location (i.e. --prefix) 
     116export PJ_INSTALL_DIR := @prefix@ 
     117export PJ_INSTALL_INC_DIR := $(PJ_INSTALL_DIR)/include 
     118export PJ_INSTALL_LIB_DIR := $(PJ_INSTALL_DIR)/lib 
     119export PJ_INSTALL_CFLAGS := -I$(PJ_INSTALL_INC_DIR) -DPJ_AUTOCONF=1     @CFLAGS@ 
     120export PJ_INSTALL_CXXFLAGS := $(PJ_INSTALL_CFLAGS) 
     121export PJ_INSTALL_LDFLAGS := -L$(PJ_INSTALL_LIB_DIR) $(APP_LDLIBS) 
  • pjproject/trunk/configure-legacy

    r1202 r3063  
    125125export APP_LDFLAGS = -L\$(PJDIR)/pjlib/lib -L\$(PJDIR)/pjlib-util/lib -L\$(PJDIR)/pjnath/lib -L\$(PJDIR)/pjmedia/lib -L\$(PJDIR)/pjsip/lib -L\$(PJDIR)/third_party/lib  
    126126 
    127 export APP_LDLIBS = -lpjsua-\$(TARGET_NAME) -lpjsip-ua-\$(TARGET_NAME) -lpjsip-simple-\$(TARGET_NAME) -lpjsip-\$(TARGET_NAME) -lpjmedia-codec-\$(TARGET_NAME) -lpjmedia-\$(TARGET_NAME) -lpjnath-\$(TARGET_NAME) -lpjlib-util-\$(TARGET_NAME) \$(APP_THIRD_PARTY_LIBS) -lpj-\$(TARGET_NAME) \$(CC_LDFLAGS) \$(OS_LDFLAGS) \$(M_LDFLAGS) \$(HOST_LDFLAGS) \$(LDFLAGS) 
     127export APP_LDLIBS = -lpjsua-\$(TARGET_NAME) -lpjsip-ua-\$(TARGET_NAME) -lpjsip-simple-\$(TARGET_NAME) -lpjsip-\$(TARGET_NAME) -lpjmedia-codec-\$(TARGET_NAME) -lpjmedia-\$(TARGET_NAME) -lpjnath-\$(TARGET_NAME) -lpjlib-util-\$(TARGET_NAME) \$(APP_THIRD_PARTY_LIBS) \$(APP_THIRD_PARTY_EXT) -lpj-\$(TARGET_NAME) \$(CC_LDFLAGS) \$(OS_LDFLAGS) \$(M_LDFLAGS) \$(HOST_LDFLAGS) \$(LDFLAGS) 
    128128 
    129129export PJ_DIR = \$(PJDIR) 
  • pjproject/trunk/libpjproject.pc.in

    r3062 r3063  
    66includedir=${prefix}/include 
    77 
    8 Name: libpj 
     8Name: libpjproject 
    99Description: Multimedia communication library 
    10 Version: 0.5.10.3 
    11 Libs: -L${libdir} -lpjsua -lpjsip -lpjmedia -lpjsip-ua -lpjsip-simple -lpjsip-ua -lpjmedia-codec -lpjlib-util -lpj 
    12 Cflags: -I${includedir} 
     10URL: http://www.pjsip.org 
     11Version: @PJ_VERSION@ 
     12Libs: -L${libdir} @PJ_LDLIBS@ 
     13Cflags: -I${includedir} @PJ_INSTALL_CFLAGS@ 
  • pjproject/trunk/pjmedia/build/Makefile

    r3058 r3063  
    4141                   -L$(PJDIR)/third_party/lib \ 
    4242                   $(APP_THIRD_PARTY_LIBS) \ 
     43                   $(APP_THIRD_PARTY_EXT) \ 
    4344                   $(CC_LDFLAGS) $(OS_LDFLAGS) $(M_LDFLAGS) $(HOST_LDFLAGS) \ 
    4445                   $(LDFLAGS)  
Note: See TracChangeset for help on using the changeset viewer.