* Prefixed the variables NETWORK_LIBS, NETAPI_LIB, and

SELECT_UNAME_ETC_LIB with TARGET_ and introduced HAIKU_* and HOST_*
  counterparts.
* Use HOST_NETWORK_LIBS for building remote_disk_server.
* Also got rid of {R5,BONE,DANO,HAIKU}_COMPATIBLE.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21912 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold 2007-08-12 22:15:10 +00:00
parent ed8dc403a9
commit 7e8ac2903b
37 changed files with 70 additions and 64 deletions

View File

@ -282,6 +282,11 @@ if $(HAIKU_SHARED_LIBSUPC++) {
HAIKU_LIBSUPC++ = ;
}
# network libraries
HAIKU_NETWORK_LIBS = network ;
HAIKU_NETAPI_LIB = network ;
HAIKU_SELECT_UNAME_ETC_LIB = ; # libroot, against which we link anyway
# library and executable glue code
local commonGlueCode =
<src!system!glue>init_term_dyn.o
@ -534,6 +539,26 @@ if $(HOST_PLATFORM_BEOS_COMPATIBLE) {
}
}
# network libraries
if $(HOST_PLATFORM_HAIKU_COMPATIBLE) {
HOST_NETWORK_LIBS = network ;
HOST_NETAPI_LIB = network ;
HOST_SELECT_UNAME_ETC_LIB = ; # libroot
} else if $(HOST_PLATFORM_BONE_COMPATIBLE) {
HOST_NETWORK_LIBS = socket bind ;
HOST_NETAPI_LIB = bnetapi ;
HOST_SELECT_UNAME_ETC_LIB = ; # libroot
} else if $(HOST_PLATFORM_BEOS_COMPATIBLE) {
HOST_NETWORK_LIBS = net ;
HOST_NETAPI_LIB = netapi ;
HOST_SELECT_UNAME_ETC_LIB = net ;
} else {
# Linux,...
HOST_NETWORK_LIBS = ;
HOST_NETAPI_LIB = ;
HOST_SELECT_UNAME_ETC_LIB = ;
}
# define the executable MIME type
HOST_EXECUTABLE_MIME_TYPE = "application/x-vnd.Be-elfexecutable" ;
@ -583,27 +608,6 @@ if $(TARGET_PLATFORM) != haiku {
}
}
# TODO: Fix the naming!
if $(TARGET_PLATFORM_HAIKU_COMPATIBLE) {
NETWORK_LIBS = network ;
SELECT_UNAME_ETC_LIB = root ;
NETAPI_LIB = network ;
} else if $(TARGET_PLATFORM_BONE_COMPATIBLE) {
NETWORK_LIBS = socket bind ;
NETAPI_LIB = bnetapi ;
SELECT_UNAME_ETC_LIB = root ;
} else {
NETWORK_LIBS = net ;
NETAPI_LIB = netapi ;
SELECT_UNAME_ETC_LIB = net ;
}
# TODO: For compatibility only. Remove when no longer used.
R5_COMPATIBLE = $(TARGET_PLATFORM_BEOS_COMPATIBLE) ;
BONE_COMPATIBLE = $(TARGET_PLATFORM_BONE_COMPATIBLE) ;
DANO_COMPATIBLE = $(TARGET_PLATFORM_DANO_COMPATIBLE) ;
HAIKU_COMPATIBLE = $(TARGET_PLATFORM_HAIKU_COMPATIBLE) ;
# Set TARGET_* variables either from HAIKU_* or HOST_* depending on the
# specified TARGET_PLATFORM.
@ -634,6 +638,8 @@ local buildVars =
LIBSTDC++ LIBSUPC++
NETWORK_LIBS NETAPI_LIB SELECT_UNAME_ETC_LIB
ARCH_MACRO_DEFINE EXECUTABLE_MIME_TYPE
OBJECT_BASE_DIR COMMON_ARCH_OBJECT_DIR COMMON_DEBUG_OBJECT_DIR

View File

@ -21,7 +21,7 @@ Addon IMAP :
imap_config.cpp
NestedString.cpp ;
LinkAgainst IMAP : be libmail.so $(NETWORK_LIBS) ;
LinkAgainst IMAP : be libmail.so $(TARGET_NETWORK_LIBS) ;
if $(USESSL) {
LinkAgainst IMAP : ssl crypto ;

View File

@ -22,7 +22,7 @@ Addon POP3 :
SimpleMailProtocol.cpp
md5c.c ;
LinkAgainst POP3 : be libmail.so $(NETWORK_LIBS) ;
LinkAgainst POP3 : be libmail.so $(TARGET_NETWORK_LIBS) ;
if $(USESSL) {
LinkAgainst POP3 : ssl crypto ;

View File

@ -20,7 +20,7 @@ Addon SMTP :
smtp.cpp
md5c.c ;
LinkAgainst SMTP : be libmail.so $(NETWORK_LIBS) ;
LinkAgainst SMTP : be libmail.so $(TARGET_NETWORK_LIBS) ;
if $(USESSL) {
LinkAgainst SMTP : ssl crypto ;

View File

@ -8,7 +8,7 @@ Addon HP\ JetDirect :
print_transport.cpp
HPJetDirectTransport.cpp
SetupWindow.cpp
: be $(NETAPI_LIB)
: be $(TARGET_NETAPI_LIB)
;
Package haiku-printingkit-cvs :

View File

@ -15,7 +15,7 @@ Addon IPP :
Socket.o
SocketStream.o
DbgMsg.o
: be $(NETWORK_LIBS) $(TARGET_LIBSTDC++)
: be $(TARGET_NETWORK_LIBS) $(TARGET_LIBSTDC++)
;
ObjectReferences

View File

@ -13,7 +13,7 @@ Addon LPR :
Socket.o
SocketStream.o
DbgMsg.o
: be $(NETWORK_LIBS) $(TARGET_LIBSTDC++)
: be $(TARGET_NETWORK_LIBS) $(TARGET_LIBSTDC++)
;
ObjectReferences

View File

@ -2,7 +2,7 @@ SubDir HAIKU_TOP src add-ons print transports shared ;
SetSubDirSupportedPlatformsBeOSCompatible ;
if $(BONE_COMPATIBLE) {
if $(TARGET_PLATFORM_BONE_COMPATIBLE) {
ObjectC++Flags Socket.cpp : -DHAVE_ARPA_INET -Dclosesocket=close ;
} else {
ObjectC++Flags Socket.cpp : -DHAVE_ARPA_INET -DBUILDING_R5_LIBNET ;

View File

@ -13,6 +13,6 @@ Application CDPlayer :
TwoStateDrawButton.cpp
VolumeSlider.cpp
: be $(SELECT_UNAME_ETC_LIB) $(NETAPI_LIB) translation textencoding
: be $(TARGET_SELECT_UNAME_ETC_LIB) $(TARGET_NETAPI_LIB) translation textencoding
: CDPlayer.rdef
;

View File

@ -8,7 +8,7 @@ Application CodyCam :
Settings.cpp
SettingsHandler.cpp
VideoConsumer.cpp
: be media translation $(NETAPI_LIB) $(TARGET_LIBSTDC++)
: be media translation $(TARGET_NETAPI_LIB) $(TARGET_LIBSTDC++)
: CodyCam.rdef
;

View File

@ -14,6 +14,6 @@ Application NetworkStatus :
NetworkStatusWindow.cpp
NetworkStatusView.cpp
NetworkStatus.cpp
: be $(icon_libs) $(NETWORK_LIBS)
: be $(icon_libs) $(TARGET_NETWORK_LIBS)
: NetworkStatus.rdef NetworkStatusIcons.rdef
;

View File

@ -64,7 +64,7 @@ BinCommand sh :
list.c stringlib.c locale.c findcmd.c redir.c
pcomplete.c pcomplib.c syntax.c xmalloc.c test.c sig.c
: libreadline.a <bash>libglob.a libbuiltins.a libtilde.a libsh.a
libtermcap.a $(SELECT_UNAME_ETC_LIB)
libtermcap.a $(TARGET_SELECT_UNAME_ETC_LIB)
: bash.rdef ;
# trap.c includes signames.h

View File

@ -82,7 +82,7 @@ StdBinCommands
hostname.c
tail.c
uname.c
: libfetish.a $(SELECT_UNAME_ETC_LIB) : $(coreutils_rsrc) ;
: libfetish.a $(TARGET_SELECT_UNAME_ETC_LIB) : $(coreutils_rsrc) ;
#commands requiring something in libroot.so (getrlimit, fchdir...)

View File

@ -13,7 +13,7 @@ UseHeaders $(TARGET_PRIVATE_KERNEL_HEADERS) : true ;
BinCommand arp :
arp.cpp
: $(NETWORK_LIBS) $(SELECT_UNAME_ETC_LIB) ;
: $(TARGET_NETWORK_LIBS) $(TARGET_SELECT_UNAME_ETC_LIB) ;
# Installation -- in the test directory for the time being
HaikuInstall install-networking

View File

@ -21,7 +21,7 @@ BinCommand ftp :
progressbar.c
ruserpass.c
util.c
: libedit.a libncurses.a libutil.a libbsd.so $(NETWORK_LIBS)
: libedit.a libncurses.a libutil.a libbsd.so $(TARGET_NETWORK_LIBS)
;
# Installation -- in the test directory for the time being

View File

@ -10,7 +10,7 @@ if ! $(TARGET_PLATFORM_HAIKU_COMPATIBLE) {
BinCommand nc :
netcat.c
: $(NETWORK_LIBS)
: $(TARGET_NETWORK_LIBS)
;
HaikuInstall install-networking

View File

@ -10,7 +10,7 @@ if ! $(TARGET_PLATFORM_HAIKU_COMPATIBLE) {
BinCommand ping :
ping.c
: $(NETWORK_LIBS) $(SELECT_UNAME_ETC_LIB) ;
: $(TARGET_NETWORK_LIBS) $(TARGET_SELECT_UNAME_ETC_LIB) ;
# Installation -- in the test directory for the time being
HaikuInstall install-networking

View File

@ -124,7 +124,7 @@ BinCommand tcpdump :
tcpdump.c
util.c
version.c
: libpcap.a $(NETWORK_LIBS)
: libpcap.a $(TARGET_NETWORK_LIBS)
;
SubInclude HAIKU_TOP src bin network tcpdump libpcap ;

View File

@ -20,5 +20,5 @@ BinCommand telnet :
telnet.c
terminal.c
utilities.c
: libtermcap.a libncurses.a libtelnet.a libutil.a libbsd.so $(NETWORK_LIBS)
: libtermcap.a libncurses.a libtelnet.a libutil.a libbsd.so $(TARGET_NETWORK_LIBS)
;

View File

@ -18,5 +18,5 @@ BinCommand telnetd :
telnetd.c
termstat.c
utility.c
: libtermcap.a libtelnet.a libutil.a libbsd.so $(NETWORK_LIBS)
: libtermcap.a libtelnet.a libutil.a libbsd.so $(TARGET_NETWORK_LIBS)
;

View File

@ -21,7 +21,7 @@ BinCommand traceroute :
ifaddrlist.c
traceroute.c
version.c
: $(NETWORK_LIBS) $(SELECT_UNAME_ETC_LIB) ;
: $(TARGET_NETWORK_LIBS) $(TARGET_SELECT_UNAME_ETC_LIB) ;
# Installation -- in the test directory for the time being
HaikuInstall install-networking

View File

@ -39,5 +39,5 @@ BinCommand wget :
utils.c
version.c
xmalloc.c
: $(NETWORK_LIBS)
: $(TARGET_NETWORK_LIBS)
;

View File

@ -9,7 +9,7 @@ ResComp $(sharutils_rsrc) : [ FGristFiles sharutils.rdef ] ;
BinCommand shar :
shar.c encode.c
: libsharutils.a $(SELECT_UNAME_ETC_LIB)
: libsharutils.a $(TARGET_SELECT_UNAME_ETC_LIB)
: sharutils.rsrc ;
BinCommand unshar :

View File

@ -34,5 +34,5 @@ BinCommand tar :
BinCommand rmt :
rmt.c
: libtar.a $(NETWORK_LIBS)
: libtar.a $(TARGET_NETWORK_LIBS)
: tar.rsrc ;

View File

@ -60,7 +60,7 @@ BinCommand vim :
os_beos.c
version.c
pathdef.c
: be libtermcap.a $(SELECT_UNAME_ETC_LIB)
: be libtermcap.a $(TARGET_SELECT_UNAME_ETC_LIB)
: vim.rdef ;
SEARCH on [ FGristFiles pathdef.c ] = [ FDirName $(SUBDIR) auto ] ;

View File

@ -74,7 +74,7 @@ SharedLibrary libbe_haiku.so :
libagg.a
libbeadapter.so
$(NETWORK_LIBS)
$(TARGET_NETWORK_LIBS)
$(TARGET_LIBSTDC++)
;

View File

@ -17,7 +17,7 @@ if $(RUN_WITHOUT_APP_SERVER) != 0 {
SubDirC++Flags $(defines) ;
}
if ! $(HAIKU_COMPATIBLE) {
if ! $(TARGET_PLATFORM_HAIKU_COMPATIBLE) {
local defines = [ FDefines COMPILE_FOR_R5 ] ;
SubDirCcFlags $(defines) ;
SubDirC++Flags $(defines) ;

View File

@ -47,8 +47,8 @@ SharedLibrary libmail.so :
libtextencoding.so
tracker
$(TARGET_LIBSTDC++)
$(NETWORK_LIBS)
$(SELECT_UNAME_ETC_LIB)
$(TARGET_NETWORK_LIBS)
$(TARGET_SELECT_UNAME_ETC_LIB)
;
Package haiku-maildaemon-cvs :

View File

@ -24,7 +24,7 @@ if $(TARGET_PLATFORM) != haiku {
SharedLibrary libnetapi.so :
$(netapi_sources)
: be $(NETWORK_LIBS)
: be $(TARGET_NETWORK_LIBS)
;
# Installation -- in the test directory for the time being

View File

@ -8,7 +8,7 @@ Preference Network :
EthernetSettingsWindow.cpp
EthernetSettingsView.cpp
EthernetSettings.cpp
: be root $(NETWORK_LIBS)
: be root $(TARGET_NETWORK_LIBS)
;
Package haiku-networksettings :

View File

@ -19,7 +19,7 @@ Server mail_daemon :
main.cpp
;
LinkAgainst mail_daemon : be libmail.so tracker $(TARGET_LIBSTDC++) $(NETWORK_LIBS) ;
LinkAgainst mail_daemon : be libmail.so tracker $(TARGET_LIBSTDC++) $(TARGET_NETWORK_LIBS) ;
Package haiku-maildaemon-cvs :
mail_daemon :

View File

@ -87,5 +87,5 @@ Addon <test>netfs
VolumeManager.cpp
: <test>UserlandFSServer
$(NETWORK_LIBS)
$(TARGET_NETWORK_LIBS)
;

View File

@ -28,5 +28,5 @@ Application <test>netfs_config
# Blocker.cpp
netfs_config.cpp
: be # $(NETWORK_LIBS)
: be # $(TARGET_NETWORK_LIBS)
;

View File

@ -84,5 +84,5 @@ Application <test>NetFSServer
UserSecurityContext.cpp
Volume.cpp
VolumeManager.cpp
: be $(NETWORK_LIBS)
: be $(TARGET_NETWORK_LIBS)
;

View File

@ -18,12 +18,12 @@ UsePrivateHeaders net ;
#UsePrivateHeaders kernel ;
#UseArchHeaders $(TARGET_ARCH) ;
SimpleTest udp_client : udp_client.c : $(NETWORK_LIBS) ;
SimpleTest udp_echo : udp_echo.c : $(NETWORK_LIBS) ;
SimpleTest udp_server : udp_server.c : $(NETWORK_LIBS) ;
SimpleTest udp_client : udp_client.c : $(TARGET_NETWORK_LIBS) ;
SimpleTest udp_echo : udp_echo.c : $(TARGET_NETWORK_LIBS) ;
SimpleTest udp_server : udp_server.c : $(TARGET_NETWORK_LIBS) ;
SimpleTest tcp_server : tcp_server.c : $(NETWORK_LIBS) ;
SimpleTest tcp_client : tcp_client.c : $(NETWORK_LIBS) ;
SimpleTest tcp_server : tcp_server.c : $(TARGET_NETWORK_LIBS) ;
SimpleTest tcp_client : tcp_client.c : $(TARGET_NETWORK_LIBS) ;
SimpleTest tcp_tester :
tcp_tester.cpp

View File

@ -2,7 +2,7 @@ SubDir HAIKU_TOP src tests kits net netperf ;
Depends netperf : install_netperf_scripts ;
if ! $(BONE_COMPATIBLE) {
if ! $(TARGET_PLATFORM_BONE_COMPATIBLE) {
SubDirCcFlags -DBUILDING_R5_LIBNET -Dclose=closesocket ;
}
@ -24,13 +24,13 @@ Objects $(net_files) ;
SimpleTest netperf :
netperf.c
[ FGristFiles $(net_files:S=$(SUFOBJ)) ]
: $(NETWORK_LIBS)
: $(TARGET_NETWORK_LIBS)
;
SimpleTest netserver :
netserver.c
[ FGristFiles $(net_files:S=$(SUFOBJ)) ]
: $(NETWORK_LIBS)
: $(TARGET_NETWORK_LIBS)
;
HaikuInstall install_netperf_scripts : [ FDirName $(HAIKU_TEST_DIR) kits net netperf ] :

View File

@ -4,5 +4,5 @@ UsePrivateHeaders kernel ;
BuildPlatformMain remote_disk_server
: remote_disk_server.cpp
: $(HOST_LIBSUPC++) $(NETWORK_LIBS)
: $(HOST_LIBSUPC++) $(HOST_NETWORK_LIBS)
;