Skip to content

Commit

Permalink
Re #1630 (misc): Use the right compiler and flags to compile C++ (.cp…
Browse files Browse the repository at this point in the history
…p) files

 


git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@4637 74dad513-b988-da41-8d7b-12977e46ad98
  • Loading branch information
ming committed Oct 24, 2013
1 parent 18a592b commit 0f9407d
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 1 deletion.
2 changes: 1 addition & 1 deletion build/rules.mak
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ $(OBJDIR)/%$(OBJEXT): $(SRCDIR)/%.S
$(subst /,$(HOST_PSEP),$<)

$(OBJDIR)/%$(OBJEXT): $(SRCDIR)/%.cpp
$(CC) $($(APP)_CXXFLAGS) \
$(CXX) $($(APP)_CXXFLAGS) \
$(CC_OUT)$(subst /,$(HOST_PSEP),$@) \
$(subst /,$(HOST_PSEP),$<)

Expand Down
2 changes: 2 additions & 0 deletions pjlib-util/build/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ export PJLIB_UTIL_OBJS += $(OS_OBJS) $(M_OBJS) $(CC_OBJS) $(HOST_OBJS) \
srv_resolver.o string.o stun_simple.o \
stun_simple_client.o xml.o
export PJLIB_UTIL_CFLAGS += $(_CFLAGS)
export PJLIB_UTIL_CXXFLAGS += $(_CXXFLAGS)

###############################################################################
# Defines for building test application
Expand All @@ -42,6 +43,7 @@ export UTIL_TEST_SRCDIR = ../src/pjlib-util-test
export UTIL_TEST_OBJS += xml.o encryption.o stun.o resolver_test.o test.o \
http_client.o
export UTIL_TEST_CFLAGS += $(_CFLAGS)
export UTIL_TEST_CXXFLAGS += $(_CXXFLAGS)
export UTIL_TEST_LDFLAGS += $(_LDFLAGS)
export UTIL_TEST_EXE:=../bin/pjlib-util-test-$(TARGET_NAME)$(HOST_EXE)

Expand Down
2 changes: 2 additions & 0 deletions pjlib/build/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ export PJLIB_OBJS += $(OS_OBJS) $(M_OBJS) $(CC_OBJS) $(HOST_OBJS) \
ssl_sock_common.o ssl_sock_ossl.o ssl_sock_dump.o \
string.o timer.o types.o
export PJLIB_CFLAGS += $(_CFLAGS)
export PJLIB_CXXFLAGS += $(_CXXFLAGS)

###############################################################################
# Defines for building test application
Expand All @@ -44,6 +45,7 @@ export TEST_OBJS += activesock.o atomic.o echo_clt.o errno.o exception.o \
udp_echo_srv_sync.o udp_echo_srv_ioqueue.o \
util.o
export TEST_CFLAGS += $(_CFLAGS)
export TEST_CXXFLAGS += $(_CXXFLAGS)
export TEST_LDFLAGS += $(_LDFLAGS)
export TEST_EXE := ../bin/pjlib-test-$(TARGET_NAME)$(HOST_EXE)

Expand Down
7 changes: 7 additions & 0 deletions pjmedia/build/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ export PJMEDIA_OBJS += $(OS_OBJS) $(M_OBJS) $(CC_OBJS) $(HOST_OBJS) \
wsola.o

export PJMEDIA_CFLAGS += $(_CFLAGS)
export PJMEDIA_CXXFLAGS += $(_CXXFLAGS)


###############################################################################
Expand All @@ -84,6 +85,7 @@ export PJMEDIA_AUDIODEV_OBJS += audiodev.o audiotest.o errno.o \
alsa_dev.o bb10_dev.o bdimad_dev.o \
android_jni_dev.o opensl_dev.o
export PJMEDIA_AUDIODEV_CFLAGS += $(_CFLAGS)
export PJMEDIA_AUDIODEV_CXXFLAGS += $(_CXXFLAGS)


###############################################################################
Expand All @@ -93,6 +95,7 @@ export PJMEDIA_VIDEODEV_SRCDIR = ../src/pjmedia-videodev
export PJMEDIA_VIDEODEV_OBJS += errno.o videodev.o avi_dev.o ffmpeg_dev.o \
colorbar_dev.o v4l2_dev.o
export PJMEDIA_VIDEODEV_CFLAGS += $(_CFLAGS)
export PJMEDIA_VIDEODEV_CXXFLAGS += $(_CXXFLAGS)


###############################################################################
Expand All @@ -105,6 +108,7 @@ export PJSDP_SRCDIR = ../src/pjmedia
export PJSDP_OBJS += $(OS_OBJS) $(M_OBJS) $(CC_OBJS) $(HOST_OBJS) \
errno.o sdp.o sdp_cmp.o sdp_neg.o
export PJSDP_CFLAGS += $(_CFLAGS)
export PJSDP_CXXFLAGS += $(_CXXFLAGS)


###############################################################################
Expand All @@ -118,6 +122,8 @@ export PJMEDIA_CODEC_OBJS += audio_codecs.o ffmpeg_vid_codecs.o \
g7221_sdp_match.o amr_sdp_match.o
export PJMEDIA_CODEC_CFLAGS += $(_CFLAGS) $(GSM_CFLAGS) $(SPEEX_CFLAGS) \
$(ILBC_CFLAGS) $(IPP_CFLAGS) $(G7221_CFLAGS)
export PJMEDIA_CODEC_CXXFLAGS += $(_CXXFLAGS) $(GSM_CFLAGS) $(SPEEX_CFLAGS) \
$(ILBC_CFLAGS) $(IPP_CFLAGS) $(G7221_CFLAGS)


###############################################################################
Expand All @@ -129,6 +135,7 @@ export PJMEDIA_TEST_OBJS += codec_vectors.o jbuf_test.o main.o mips_test.o \
rtp_test.o test.o
export PJMEDIA_TEST_OBJS += sdp_neg_test.o
export PJMEDIA_TEST_CFLAGS += $(_CFLAGS)
export PJMEDIA_TEST_CXXFLAGS += $(_CXXFLAGS)
export PJMEDIA_TEST_LDFLAGS += $(_LDFLAGS)
export PJMEDIA_TEST_EXE:=../bin/pjmedia-test-$(TARGET_NAME)$(HOST_EXE)

Expand Down
4 changes: 4 additions & 0 deletions pjnath/build/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ export PJNATH_OBJS += $(OS_OBJS) $(M_OBJS) $(CC_OBJS) $(HOST_OBJS) \
stun_msg.o stun_msg_dump.o stun_session.o stun_sock.o \
stun_transaction.o turn_session.o turn_sock.o
export PJNATH_CFLAGS += $(_CFLAGS)
export PJNATH_CXXFLAGS += $(_CXXFLAGS)

###############################################################################
# Defines for building test application
Expand All @@ -43,6 +44,7 @@ export PJNATH_TEST_SRCDIR = ../src/pjnath-test
export PJNATH_TEST_OBJS += ice_test.o stun.o sess_auth.o server.o concur_test.o \
stun_sock_test.o turn_sock_test.o test.o
export PJNATH_TEST_CFLAGS += $(_CFLAGS)
export PJNATH_TEST_CXXFLAGS += $(_CXXFLAGS)
export PJNATH_TEST_LDFLAGS += $(_LDFLAGS)
export PJNATH_TEST_EXE:=../bin/pjnath-test-$(TARGET_NAME)$(HOST_EXE)

Expand All @@ -53,6 +55,7 @@ export PJNATH_TEST_EXE:=../bin/pjnath-test-$(TARGET_NAME)$(HOST_EXE)
export PJTURN_CLIENT_SRCDIR = ../src/pjturn-client
export PJTURN_CLIENT_OBJS += client_main.o
export PJTURN_CLIENT_CFLAGS += $(_CFLAGS)
export PJTURN_CLIENT_CXXFLAGS += $(_CXXFLAGS)
export PJTURN_CLIENT_LDFLAGS += $(_LDFLAGS)
export PJTURN_CLIENT_EXE:=../bin/pjturn-client-$(TARGET_NAME)$(HOST_EXE)

Expand All @@ -63,6 +66,7 @@ export PJTURN_SRV_SRCDIR = ../src/pjturn-srv
export PJTURN_SRV_OBJS += allocation.o auth.o listener_udp.o \
listener_tcp.o server.o main.o
export PJTURN_SRV_CFLAGS += $(_CFLAGS)
export PJTURN_SRV_CXXFLAGS += $(_CXXFLAGS)
export PJTURN_SRV_LDFLAGS += $(_LDFLAGS)
export PJTURN_SRV_EXE:=../bin/pjturn-srv-$(TARGET_NAME)$(HOST_EXE)

Expand Down
2 changes: 2 additions & 0 deletions pjsip-apps/build/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ export PJSUA_OBJS += $(OS_OBJS) $(M_OBJS) $(CC_OBJS) $(HOST_OBJS) \
main.o pjsua_app.o pjsua_app_cli.o pjsua_app_common.o \
pjsua_app_config.o pjsua_app_legacy.o
export PJSUA_CFLAGS += $(_CFLAGS)
export PJSUA_CXXFLAGS += $(_CXXFLAGS)
export PJSUA_LDFLAGS += $(APP_LDFLAGS) $(APP_LDLIBS) $(LDFLAGS)
export PJSUA_EXE:=../bin/pjsua-$(TARGET_NAME)$(HOST_EXE)

Expand All @@ -47,6 +48,7 @@ export PJSYSTEST_SRCDIR = ../src/pjsystest
export PJSYSTEST_OBJS += $(OS_OBJS) $(M_OBJS) $(CC_OBJS) $(HOST_OBJS) \
systest.o main_console.o
export PJSYSTEST_CFLAGS += $(_CFLAGS)
export PJSYSTEST_CXXFLAGS += $(_CXXFLAGS)
export PJSYSTEST_LDFLAGS += $(APP_LDFLAGS) $(APP_LDLIBS) $(LDFLAGS)
export PJSYSTEST_EXE:=../bin/pjsystest-$(TARGET_NAME)$(HOST_EXE)

Expand Down
5 changes: 5 additions & 0 deletions pjsip/build/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ export PJSIP_OBJS += $(OS_OBJS) $(M_OBJS) $(CC_OBJS) $(HOST_OBJS) \
sip_transaction.o sip_util_statefull.o \
sip_dialog.o sip_ua_layer.o
export PJSIP_CFLAGS += $(_CFLAGS)
export PJSIP_CXXFLAGS += $(_CXXFLAGS)

###############################################################################
# Defines for building PJSIP UA library
Expand All @@ -57,6 +58,7 @@ export PJSIP_UA_OBJS += $(OS_OBJS) $(M_OBJS) $(CC_OBJS) $(HOST_OBJS) \
sip_inv.o sip_reg.o sip_replaces.o sip_xfer.o \
sip_100rel.o sip_timer.o
export PJSIP_UA_CFLAGS += $(_CFLAGS)
export PJSIP_UA_CXXFLAGS += $(_CXXFLAGS)


###############################################################################
Expand All @@ -68,6 +70,7 @@ export PJSIP_SIMPLE_OBJS += $(OS_OBJS) $(M_OBJS) $(CC_OBJS) $(HOST_OBJS) \
mwi.o pidf.o presence.o presence_body.o publishc.o \
rpid.o xpidf.o
export PJSIP_SIMPLE_CFLAGS += $(_CFLAGS)
export PJSIP_SIMPLE_CXXFLAGS += $(_CXXFLAGS)


###############################################################################
Expand All @@ -79,6 +82,7 @@ export PJSUA_LIB_OBJS += $(OS_OBJS) $(M_OBJS) $(CC_OBJS) $(HOST_OBJS) \
pjsua_im.o pjsua_media.o pjsua_pres.o \
pjsua_dump.o pjsua_aud.o pjsua_vid.o
export PJSUA_LIB_CFLAGS += $(_CFLAGS) $(PJ_VIDEO_CFLAGS)
export PJSUA_LIB_CXXFLAGS += $(_CXXFLAGS) $(PJ_VIDEO_CFLAGS)


export CC_OUT CC AR RANLIB HOST_MV HOST_RM HOST_RMDIR HOST_MKDIR OBJEXT LD LDOUT
Expand All @@ -95,6 +99,7 @@ export TEST_OBJS += dlg_core_test.o dns_test.o msg_err_test.o \
tsx_uas_test.o txdata_test.o uri_test.o \
inv_offer_answer_test.o
export TEST_CFLAGS += $(_CFLAGS)
export TEST_CXXFLAGS += $(_CXXFLAGS)
export TEST_LDFLAGS += $(PJ_LDFLAGS) $(PJ_LDLIBS) $(LDFLAGS)
export TEST_EXE := ../bin/pjsip-test-$(TARGET_NAME)$(HOST_EXE)

Expand Down

0 comments on commit 0f9407d

Please sign in to comment.