VirtualBox

Changeset 534 in vbox for trunk/Config.kmk


Ignore:
Timestamp:
Feb 2, 2007 5:03:03 AM (18 years ago)
Author:
vboxsync
Message:

Did a rough config of FreeBSD, NetBSD, OpenBSD and Solaris.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Config.kmk

    r376 r534  
    201201
    202202# Most stuff doesn't build yet on the two new targets.
    203 ifneq ($(filter darwin os2,$(BUILD_TARGET)),)
     203ifneq ($(filter darwin os2 freebsd,$(BUILD_TARGET)),)
    204204 #VBOX_WITH_VBOXBFE=
    205205 VBOX_WITH_MAIN=
     
    276276# Image and object format config.
    277277#
    278 ifeq ($(BUILD_TARGET),linux)
    279  VBOX_LDR_FMT = elf
    280 endif
    281 ifeq ($(BUILD_TARGET),l4)
     278ifeq ($(filter-out linux l4 freebsd netbsd openbsd solaris,$(BUILD_TARGET)),)
    282279 VBOX_LDR_FMT = elf
    283280endif
     
    491488DEFS.debug := DEBUG DEBUG_$(subst $(subst _, ,_),_,$(USERNAME)) DEBUG_USERNAME=$(subst $(subst _, ,_),_,$(USERNAME))
    492489DEFS.profile = VBOX_WITH_STATISTICS
    493 DEFS.x86   = __X86__
    494 DEFS.amd64 = __AMD64__
    495 DEFS.darwin= __DARWIN__
    496 DEFS.l4    = __L4__ __L4ENV__ L4API_l4v2 __NO_CTYPE _FILE_OFFSET_BITS=64
     490DEFS.x86     = __X86__
     491DEFS.amd64   = __AMD64__
     492DEFS.darwin  = __DARWIN__
     493DEFS.freebsd = __FREEBSD__
     494DEFS.l4      = __L4__ __L4ENV__ L4API_l4v2 __NO_CTYPE _FILE_OFFSET_BITS=64
    497495ifeq ($(L4_API),l4v2onv4)
    498  DEFS.l4  += L4API_l4v2onv4 STATIC_L4_INLINE
    499 endif
    500 DEFS.linux = __LINUX__ _FILE_OFFSET_BITS=64
    501 DEFS.os2   = __OS2__
    502 DEFS.win   = __WIN__
     496 DEFS.l4    += L4API_l4v2onv4 STATIC_L4_INLINE
     497endif
     498DEFS.linux   = __LINUX__ _FILE_OFFSET_BITS=64
     499DEFS.netbsd  = __NETBSD__
     500DEFS.openbsd = __OPENBSD__
     501DEFS.os2     = __OS2__
     502DEFS.solaris = __SOLARIS__
     503DEFS.win     = __WIN__
    503504DEFS.win.x86 = __WIN32__
    504505DEFS.win.amd64 = __WIN64__
     
    573574# Add the output dir(s) to the dynamic loader search path.
    574575#
     576ifeq ($(filter-out linux l4 freebsd netbsd openbsd solaris,$(BUILD_TARGET)),)
     577 export LD_LIBRARY_PATH:=$(PATH_BIN):$(PATH_LIB):$(LD_LIBRARY_PATH)
     578endif
     579ifeq ($(BUILD_TARGET),os2)
     580 #fixme! export BEGINLIBPATH:=$(PATH_BIN);$(PATH_LIB);$(BEGINLIBPATH)
     581endif
    575582ifeq ($(BUILD_TARGET),win)
    576583 export PATH:=$(PATH_BIN);$(PATH_LIB);$(PATH)
    577 endif
    578 ifeq ($(BUILD_TARGET),linux)
    579  export LD_LIBRARY_PATH:=$(PATH_BIN):$(PATH_LIB):$(LD_LIBRARY_PATH)
    580 endif
    581 ifeq ($(BUILD_TARGET),l4)
    582  export LD_LIBRARY_PATH:=$(PATH_BIN):$(PATH_LIB):$(LD_LIBRARY_PATH)
    583 endif
    584 ifeq ($(BUILD_TARGET),os2)
    585  #fixme! export BEGINLIBPATH:=$(PATH_BIN);$(PATH_LIB);$(BEGINLIBPATH)
    586584endif
    587585
     
    605603 LIB_REM         = $(PATH_BIN)/VBoxREMImp.s.so
    606604endif
    607 ifeq ($(BUILD_TARGET),linux)
     605ifeq ($(filter-out linux freebsd netbsd openbsd solaris,$(BUILD_TARGET)),)
    608606 LIB_RUNTIME     = $(PATH_BIN)/VBoxRT.so
    609607 LIB_RUNTIME_EF  = $(PATH_LIB)/RuntimeEFCPP.a
     
    11341132endif
    11351133
     1134ifeq ($(filter-out freebsd netbsd openbsd,$(BUILD_TARGET)),)  # pure guess work just to avoid the warning below
     1135TEMPLATE_VBOXR0DRV_TOOL                = $(VBOX_GCC_TOOL)
     1136TEMPLATE_VBOXR0DRV_DEFS                = __KERNEL__ IN_RING0 IN_RT_R0
     1137TEMPLATE_VBOXR0DRV_CFLAGS              = \
     1138        -Wall -Wstrict-prototypes -Wno-trigraphs $(VBOX_GCC_Wno-pointer-sign) \
     1139        $(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_OPT) $(VBOX_GCC_FP) -fno-strict-aliasing -fno-common
     1140TEMPLATE_VBOXR0DRV_CFLAGS.x86          = -msoft-float
     1141TEMPLATE_VBOXR0DRV_CFLAGS.amd64        = -m64 -mno-red-zone -mcmodel=kernel -mno-sse -mno-mmx -mno-sse2 -mno-3dnow \
     1142        -fno-reorder-blocks -ffreestanding -fno-asynchronous-unwind-tables -funit-at-a-time \
     1143        -Wno-sign-compare -Wdeclaration-after-statement
     1144TEMPLATE_VBOXR0DRV_CXXFLAGS            = $(filter-out -Wstrict-prototypes -Wno-pointer-sign,$(TEMPLATE_VBOXR0DRV_CFLAGS)) -fno-exceptions -fno-rtti
     1145TEMPLATE_VBOXR0DRV_SYSSUFF             = .ko
     1146TEMPLATE_VBOXR0DRV_LDFLAGS.x86         = -m elf_i386 -r
     1147TEMPLATE_VBOXR0DRV_LDFLAGS.amd64       = -m elf_x86_64 -r
     1148endif
     1149
    11361150ifdef VBOX_WITH_VBOXDRV
    11371151 ifndef TEMPLATE_VBOXR0DRV_TOOL
     
    12051219 ifeq ($(BUILD_TARGET),linux)
    12061220TEMPLATE_VBOXR3EXE_LIBS                = pthread m $(LIB_UUID) rt dl
    1207  else
    1208   ifeq ($(BUILD_TARGET),l4)
     1221 else ifeq ($(BUILD_TARGET),l4)
    12091222TEMPLATE_VBOXR3EXE_LIBS                = \
    12101223        $(L4_LIBDIR)/libvboxserver.s.so \
     
    12131226        $(L4_LIBDIR)/libdl.s.so \
    12141227        $(L4_LIBDIR)/libuc.0.s.so
    1215   else
    1216    ifeq ($(BUILD_TARGET),os2)
     1228 else ifeq ($(BUILD_TARGET),os2)
    12171229TEMPLATE_VBOXR3EXE_TOOL                = GCC3OMF
    12181230TEMPLATE_VBOXR3EXE_LIBS                = socket iconv
    1219    else
    1220     ifeq ($(BUILD_TARGET),darwin)
     1231 else ifeq ($(BUILD_TARGET),darwin)
    12211232TEMPLATE_VBOXR3EXE_TOOL                = GCC4MACHO
    12221233TEMPLATE_VBOXR3EXE_LIBS                =
    12231234TEMPLATE_VBOXR3EXE_LDFLAGS             = -read_only_relocs suppress
    1224     else
     1235 else ifeq ($(filter-out freebsd netbsd openbsd,$(BUILD_TARGET)),)
     1236TEMPLATE_VBOXR3EXE_TOOL                = GCC3
     1237TEMPLATE_VBOXR3EXE_LIBS                =
     1238 else ifeq ($(BUILD_TARGET),solaris)
     1239$(warning Warning: VBOX Build: Target $(BUILD_TARGET) is not officially supported!)
     1240TEMPLATE_VBOXR3EXE_TOOL                = GCC3PLAIN
     1241TEMPLATE_VBOXR3EXE_LIBS                = rt
     1242 else
    12251243$(warning Warning: VBOX Build: Target $(BUILD_TARGET) is not officially supported!)
    12261244TEMPLATE_VBOXR3EXE_CXXFLAGS.profile    = $(TEMPLATE_VBOXR3EXE_CXXFLAGS.release)
    12271245TEMPLATE_VBOXR3EXE_CXXFLAGS.kprofile   = $(TEMPLATE_VBOXR3EXE_CXXFLAGS.krelease)
    1228     endif
    1229    endif
    1230   endif
    12311246 endif
    12321247endif
     
    12341249#
    12351250# Template for building R3 shared objects / DLLs.
    1236 # This is mostly identical to the VBOXR3EXE template.
     1251# This is mostly identical to the VBOXR3EXE template. (Avoid PIC if possible!)
    12371252#
    12381253TEMPLATE_VBOXR3  = VBox Ring 3 SO/DLLs
     
    13351350 TEMPLATE_VBOXNOCRTGCC_ASFLAGS          = $(VBOX_ASFLAGS)
    13361351 TEMPLATE_VBOXNOCRTGCC_LDFLAGS          = -nostdlib
    1337  ifneq ($(filter-out os2 darwin,$(BUILD_TARGET)),)
     1352 ifneq ($(filter-out os2 darwin solaris,$(BUILD_TARGET)),)
    13381353  ifneq ($(BUILD_TARGET_ARCH),amd64)
    13391354   TEMPLATE_VBOXNOCRTGCC_LDFLAGS        += -Wl,--no-undefined
     
    14081423 ifeq ($(BUILD_TARGET),linux)
    14091424TEMPLATE_VBOXMAINEXE_LIBS                = pthread m $(LIB_UUID) rt
    1410  else
    1411   ifeq ($(BUILD_TARGET),l4)
     1425 else ifeq ($(BUILD_TARGET),l4)
    14121426TEMPLATE_VBOXMAINEXE_LIBS                =
    14131427# no libs as yet in l4 target - must be added later
    1414   else
    1415    ifeq ($(BUILD_TARGET),os2)
     1428 else ifeq ($(BUILD_TARGET),os2)
    14161429TEMPLATE_VBOXMAINEXE_TOOL                = GCC3OMF
    14171430TEMPLATE_VBOXMAINEXE_LIBS                =
    1418    else
    1419     ifeq ($(BUILD_TARGET),darwin)
     1431 else ifeq ($(BUILD_TARGET),darwin)
    14201432TEMPLATE_VBOXMAINEXE_TOOL                = GCC4MACHO
    14211433TEMPLATE_VBOXMAINEXE_LIBS                =
    1422     else
     1434 else ifeq ($(filter-out freebsd netbsd openbsd,$(BUILD_TARGET)),)
     1435TEMPLATE_VBOXMAINEXE_TOOL                = GCC3
     1436TEMPLATE_VBOXMAINEXE_LIBS                =
     1437 else ifeq ($(BUILD_TARGET),solaris)
     1438$(warning Warning: VBOX Build: Target $(BUILD_TARGET) is not officially supported!)
     1439TEMPLATE_VBOXMAINEXE_TOOL                = GCC3PLAIN
     1440TEMPLATE_VBOXMAINEXE_LIBS                = rt
     1441 else
    14231442$(warning Warning: VBOX Build: Target $(BUILD_TARGET) is not officially supported!)
    14241443TEMPLATE_VBOXMAINEXE_LIBS                =
    1425     endif # !darwin
    1426    endif # !os2
    1427   endif # !l4
    1428  endif # !linux
     1444 endif
    14291445
    14301446endif # !win
     
    16311647 ifeq ($(BUILD_PLATFORM),linux)
    16321648TEMPLATE_VBOXBLDPROG_LIBS                = pthread m $(LIB_UUID) rt dl
    1633  else
    1634   ifeq ($(BUILD_PLATFORM),os2)
     1649 else ifeq ($(BUILD_PLATFORM),os2)
    16351650TEMPLATE_VBOXBLDPROG_TOOL                = GCC3OMF
    16361651TEMPLATE_VBOXBLDPROG_LIBS                = socket iconv
    1637   else
    1638    ifeq ($(BUILD_PLATFORM),darwin)
     1652 else ifeq ($(BUILD_PLATFORM),darwin)
    16391653TEMPLATE_VBOXBLDPROG_TOOL                = GCC4MACHO
    16401654TEMPLATE_VBOXBLDPROG_LIBS                =
    1641    else
     1655 else ifeq ($(filter-out freebsd netbsd openbsd,$(BUILD_PLATFORM)),)
     1656TEMPLATE_VBOXBLDPROG_TOOL                = GCC3
     1657TEMPLATE_VBOXBLDPROG_LIBS                =
     1658 else ifeq ($(BUILD_PLATFORM),solaris)
    16421659$(warning Warning: VBOX Build: Target $(BUILD_PLATFORM) is not officially supported!)
    1643    endif # !darwin
    1644   endif # !os2
    1645  endif # !linux
     1660TEMPLATE_VBOXBLDPROG_TOOL                = GCC3PLAIN
     1661TEMPLATE_VBOXBLDPROG_LIBS                = rt
     1662 else
     1663$(warning Warning: VBOX Build: Target $(BUILD_PLATFORM) is not officially supported!)
     1664 endif
     1665
    16461666endif # !win
    16471667
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette