Makefile.kmk revision 25243d71b6af72e7876698e0617b4d6977bd74d6
51a909d272137afafb6e48492caa2ed38c4c9f77vboxsync# Makefile for the innotek Portable Runtime (IPRT).
51a909d272137afafb6e48492caa2ed38c4c9f77vboxsync# Copyright (C) 2006-2007 innotek GmbH
51a909d272137afafb6e48492caa2ed38c4c9f77vboxsync# This file is part of VirtualBox Open Source Edition (OSE), as
51a909d272137afafb6e48492caa2ed38c4c9f77vboxsync# available from http://www.virtualbox.org. This file is free software;
# you can redistribute it and/or modify it under the terms of the GNU
# (CDDL) only, as it comes in the "COPYING.CDDL" file of the
include $(PATH_KBUILD)/header.kmk
#LIBRARIES.os2 = RuntimeOS2Warp3GuestR0
#LIBRARIES.win = RuntimeW32NT4GuestR0
#LIBRARIES.os2 = RuntimeOS2Warp3GuestR0
LIBRARIES.l4 = RuntimeR3L4
$(PATH_TARGET)/errmsgdata.h \
$(PATH_TARGET)/errmsgcomdata.h \
$(PATH_TARGET)/Doxyfile.dep \
$(PATH_TARGET)/docs.iprt
# Unicode Specification reader used to regenerate unidata.cpp.
uniread_SOURCES = common/string/uniread.cpp
RuntimeR3_SDKS.win = WINPSDK W2K3DDK
ifdef VBOX_MAIN_RELEASE_LOG ## @todo (dmik): temporary, until RTThreadSelf/RTThreadAdopt are properly updated
$(PATH_ROOT)/src/libs/liblzf-1.51
$(PATH_ROOT)/src/libs/kStuff/kStuff/include
# for iconv.h
# RuntimeR3_INCS.solaris = \
# RuntimeR3_SOURCES += common/time/timesupA.asm
RuntimeR3_SOURCES += common/time/timesupref.cpp
RuntimeR3_SOURCES.win.amd64 = $(RuntimeWin64ASM_SOURCES)
RuntimeR3_SOURCES.win.x86 = $(RuntimeWin32ASM_SOURCES)
RuntimeGuestR3_SOURCES.$(BUILD_TARGET).$(BUILD_TARGET_ARCH) := $(RuntimeR3_SOURCES.$(BUILD_TARGET).$(BUILD_TARGET_ARCH))
ifeq ($(BUILD_TARGET),linux) ## @todo elimiate this by fixing VBOXGUESTR3LIB/DLL/EXE. What about NOCPP like the x11 bits?
RuntimeW32GuestR3_SOURCES = $(RuntimeR3_SOURCES.win) $(RuntimeR3_SOURCES)
RuntimeW32GuestR3_INCS = $(RuntimeR3_INCS.win) $(RuntimeR3_INCS)
RuntimeLnx32GuestR3_DEFS = IN_RT_R3 IN_SUP_R3 LDR_WITH_NATIVE LDR_WITH_ELF32 LDR_WITH_PE RT_WITH_VBOX
RuntimeLnx32GuestR3_SOURCES = $(RuntimeR3_SOURCES.linux) $(RuntimeR3_SOURCES)
RuntimeLnx32GuestR3_SOURCES += VBox/logbackdoor.cpp
RuntimeLnx32GuestR3_INCS = $(RuntimeR3_INCS.linux) $(RuntimeR3_INCS)
RuntimeOS2GuestR3_SOURCES = $(RuntimeR3_SOURCES.os2) $(RuntimeR3_SOURCES)
RuntimeOS2GuestR3_INCS = $(RuntimeR3_INCS.os2) $(RuntimeR3_INCS)
VBoxRT_SDKS.win = WINPSDK W2K3DDK VBOX_NTDLL
VBoxRT_SOURCES.$(BUILD_TARGET).$(BUILD_TARGET_ARCH) = $(RuntimeR3_SOURCES.$(BUILD_TARGET).$(BUILD_TARGET_ARCH))
VBoxRT_INCS.$(BUILD_TARGET).$(BUILD_TARGET_ARCH) = $(RuntimeR3_INCS.$(BUILD_TARGET).$(BUILD_TARGET_ARCH))
VBoxRT_LDFLAGS.win = /MANIFEST
$(L4_LIBDIR)/libl4sys.a \
$(L4_LIBDIR)/libl4sys.p.a
VBoxRT_LIBS.l4 = \
# RuntimeR0_SOURCES += common/time/timesupA.asm
RuntimeR0_SOURCES += common/time/timesupref.cpp
RuntimeR0_SOURCES.win.amd64 = $(RuntimeWin64ASM_SOURCES)
RuntimeR0_SOURCES.win.x86 = $(RuntimeWin32ASM_SOURCES)
RuntimeR0Drv_SDKS.win = W2K3DDK WINPSDKINCS
RuntimeR0Drv_DEFS.win = IN_SUP_R0
RuntimeR0Drv_DEFS.linux = MODULE KBUILD_MODNAME=KBUILD_STR\(vboxdrv\) KBUILD_BASENAME=KBUILD_STR\(vboxdrv\) IN_SUP_R0 # why is IN_SUP_R0 here? because!
RuntimeR0Drv_SOURCES.win.amd64 = $(RuntimeWin64ASM_SOURCES)
RuntimeR0Drv_SOURCES.win.x86 = $(RuntimeWin32ASM_SOURCES)
RuntimeR0Drv_DEFS.os2 += RT_WITHOUT_NOCRT_WRAPPERS
# is in the backdoor logging and the lack of sup.h (which should be
RuntimeGuestR0_SDKS.win := W2K3DDKX86 WINPSDKINCS
RuntimeGuestR0_SOURCES := $(filter-out generic/RTLogWriteUser-generic.cpp, $(RuntimeR0Drv_SOURCES))
RuntimeGuestR0_SOURCES += VBox/logbackdoor.cpp
RuntimeGuestR0_SOURCES.$(BUILD_TARGET).$(BUILD_TARGET_ARCH) := $(RuntimeR0Drv_SOURCES.$(BUILD_TARGET).$(BUILD_TARGET_ARCH))
$(filter-out generic/RTLogWriteUser-generic.cpp,$(RuntimeR0Drv_SOURCES)) \
RuntimeLnx32GuestR0_INCS = $(RuntimeR0Drv_INCS.linux) $(RuntimeR0Drv_INCS)
# RuntimeGC_SOURCES += common/time/timesupA.asm
RuntimeGC_SOURCES += common/time/timesupref.cpp
RuntimeGC_SOURCES.win.x86 = $(RuntimeWin32ASM_SOURCES)
RuntimeGC_SOURCES += os2/sys0.asm
RuntimeEFCPP_SOURCES = r3/alloc-ef-cpp.cpp
# errmsg.cpp depends on a generated header.
common/err/errmsg.cpp_INCS = $(PATH_TARGET)
win/errmsgwin.cpp_INCS = $(PATH_TARGET)
include $(PATH_KBUILD)/footer.kmk
ifneq ($(wildcard /usr/bin/chcon),)
$(PATH_BIN)/VBoxRT.so:
$(PATH_TARGET)/errmsgdata.h: common/err/errmsg.sed $(DEPTH)/include/iprt/err.h $(DEPTH)/include/VBox/err.h
$(PATH_TARGET)/errmsgxpcomdata.h: common/err/errmsgxpcom.sed $(DEPTH)/src/libs/xpcom18a4/xpcom/base/nsError.h
# Aliases for .cpp.h files so we can more easily do syntax checking from the editor.
$(PATH_ROOT)/include/iprt \
$(PATH_ROOT)/include/iprt/nocrt \
$(PATH_ROOT)/include/iprt/nocrt/x86 \
$(PATH_ROOT)/include/iprt/nocrt/amd64 \
$(PATH_ROOT)/include/iprt/cdefs.h \
$(PATH_ROOT)/include/iprt/types.h \
$(PATH_ROOT)/include/iprt/runtime.h \
$(PATH_ROOT)/include/iprt/param.h \
$(PATH_ROOT)/include/iprt/assert.h \
$(PATH_ROOT)/include/iprt/asm.h \
$(filter-out %.cpp.h, $(sort $(wildcard $(addsuffix /*.h, $(DOXYGEN_INPUT_DIRS)))) ) \
DOXYGEN_OUTPUT = $(PATH_OUT)/docs/iprt
-include $(PATH_TARGET)/Doxyfile.dep
$(RM) -f $@ $@.tmp $(PATH_TARGET)/Doxyfile.dep
$(APPEND) $@.tmp "INCLUDE_PATH = $(PATH_ROOT)/include include . common/table"
$(APPEND) $@.tmp "INCLUDE_FILE_PATTERNS = *.cpp.h"
@$(APPEND) $(PATH_TARGET)/Doxyfile.dep "DOXYGEN_OUTPUT_PREV = $(DOXYGEN_OUTPUT)"
@$(APPEND) $(PATH_TARGET)/Doxyfile.dep "DOXYGEN_INPUT_PREV = $(DOXYGEN_INPUT)"
$(PATH_TARGET)/docs.iprt: $(PATH_TARGET)/Doxyfile $(DOXYGEN_INPUT) | $(call DIRDEP, $(DOXYGEN_OUTPUT))
$(RM) -f $(wildcard $(DOXYGEN_OUTPUT)/html/*) $(PATH_TARGET)/docs.iprt
$(APPEND) $(PATH_TARGET)/docs.iprt
docs: $(PATH_TARGET)/docs.iprt