- Introduce the kerneldll module type (like kernelmodedriver, but ending with .dll) and use it in various places
 - vfatx.dll whould in fact be a native DLL

svn path=/trunk/; revision=64526
This commit is contained in:
Jérôme Gardou 2014-10-04 20:25:57 +00:00
parent 960c80a31b
commit 4e9593f906
10 changed files with 25 additions and 40 deletions

View file

@ -518,7 +518,8 @@ function(set_module_type MODULE TYPE)
# Set subsystem. Also take this as an occasion
# to error out if someone gave a non existing type
if((${TYPE} STREQUAL nativecui) OR (${TYPE} STREQUAL nativedll) OR (${TYPE} STREQUAL kernelmodedriver) OR (${TYPE} STREQUAL wdmdriver))
if((${TYPE} STREQUAL nativecui) OR (${TYPE} STREQUAL nativedll)
OR (${TYPE} STREQUAL kernelmodedriver) OR (${TYPE} STREQUAL wdmdriver) OR (${TYPE} STREQUAL kerneldll))
set(__subsystem native)
elseif(${TYPE} STREQUAL win32cui)
set(__subsystem console)
@ -617,14 +618,16 @@ function(set_module_type MODULE TYPE)
else()
message(STATUS "${MODULE} has no base address")
endif()
elseif((${TYPE} STREQUAL kernelmodedriver) OR (${TYPE} STREQUAL wdmdriver))
elseif((${TYPE} STREQUAL kernelmodedriver) OR (${TYPE} STREQUAL wdmdriver) OR (${TYPE} STREQUAL kernelmodedll))
set_image_base(${MODULE} 0x00010000)
endif()
# Now do some stuff which is specific to each type
if((${TYPE} STREQUAL kernelmodedriver) OR (${TYPE} STREQUAL wdmdriver))
if((${TYPE} STREQUAL kernelmodedriver) OR (${TYPE} STREQUAL wdmdriver) OR (${TYPE} STREQUAL kernelmodedll))
add_dependencies(${MODULE} bugcodes)
set_target_properties(${MODULE} PROPERTIES SUFFIX ".sys")
if((${TYPE} STREQUAL kernelmodedriver) OR (${TYPE} STREQUAL wdmdriver))
set_target_properties(${MODULE} PROPERTIES SUFFIX ".sys")
endif()
endif()
if(${TYPE} STREQUAL win32ocx)

View file

@ -7,9 +7,9 @@ list(APPEND SOURCE
add_library(ufatx SHARED ${SOURCE})
set_module_type(ufatx win32dll ENTRYPOINT 0 )
target_link_libraries(ufatx vfatxlib)
set_module_type(ufatx nativedll ENTRYPOINT 0 )
add_importlibs(ufatx ntdll)
add_dependencies(ufatx psdk)

View file

@ -19,12 +19,10 @@ add_library(bootvid SHARED
bootvid.rc
${CMAKE_CURRENT_BINARY_DIR}/bootvid.def)
set_entrypoint(bootvid 0)
set_subsystem(bootvid native)
set_image_base(bootvid 0x00010000)
set_module_type(bootvid kerneldll ENTRYPOINT 0)
add_importlibs(bootvid ntoskrnl hal)
add_pch(bootvid precomp.h SOURCE)
add_dependencies(bootvid psdk bugcodes)
add_dependencies(bootvid psdk)
add_cd_file(TARGET bootvid DESTINATION reactos/system32 NO_CAB FOR all)

View file

@ -8,12 +8,10 @@ list(APPEND SOURCE
add_library(kdcom SHARED ${SOURCE})
set_entrypoint(kdcom 0)
set_subsystem(kdcom native)
set_image_base(kdcom 0x00010000)
set_module_type(kdcom kerneldll ENTRYPOINT 0)
add_importlibs(kdcom ntoskrnl hal)
target_link_libraries(kdcom cportlib)
add_dependencies(kdcom psdk bugcodes)
add_dependencies(kdcom psdk)
add_cd_file(TARGET kdcom DESTINATION reactos/system32 NO_CAB FOR all)

View file

@ -13,12 +13,8 @@ add_library(hidclass SHARED
hidclass.rc
${CMAKE_CURRENT_BINARY_DIR}/hidclass.def)
set_entrypoint(hidclass 0)
set_subsystem(hidclass native)
set_target_properties(hidclass PROPERTIES SUFFIX ".sys")
set_module_type(hidclass kernelmodedriver ENTRYPOINT 0)
add_importlibs(hidclass ntoskrnl hidparse hal)
add_dependencies(hidclass bugcodes)
add_pch(hidclass precomp.h SOURCE)
add_cd_file(TARGET hidclass DESTINATION reactos/system32/drivers NO_CAB FOR all)

View file

@ -40,15 +40,11 @@ add_library(ks SHARED
ks.rc
${CMAKE_CURRENT_BINARY_DIR}/ks.def)
set_target_properties(ks PROPERTIES SUFFIX ".sys")
set_entrypoint(ks 0)
set_subsystem(ks native)
set_image_base(ks 0x00010000)
set_module_type(ks kernelmodedriver ENTRYPOINT 0)
target_link_libraries(ks ${PSEH_LIB})
add_pch(ks precomp.h SOURCE)
add_importlibs(ks ntoskrnl hal)
add_dependencies(ks psdk bugcodes)
add_dependencies(ks psdk)
add_cd_file(TARGET ks DESTINATION reactos/system32/drivers FOR all)

View file

@ -34,10 +34,8 @@ function(add_hal _halname)
target_link_libraries(${_halname} libcntpr)
add_importlibs(${_halname} ntoskrnl)
#add_pch(${_halname} include/hal.h)
add_dependencies(${_halname} psdk bugcodes asm)
set_entrypoint(${_halname} HalInitSystem 8)
set_subsystem(${_halname} native)
set_image_base(${_halname} 0x00010000)
add_dependencies(${_halname} psdk asm)
set_module_type(${_halname} kerneldll ENTRYPOINT HalInitSystem 8)
add_cd_file(TARGET ${_halname} DESTINATION reactos/system32 NO_CAB FOR all)
if(MSVC)
add_target_link_flags(${_halname} "/ignore:4216 /ignore:4078")

View file

@ -14,11 +14,10 @@ add_library(framebuf SHARED
framebuf.rc
${CMAKE_CURRENT_BINARY_DIR}/framebuf.def)
set_module_type(framebuf kerneldll ENTRYPOINT DrvEnableDriver 12)
add_pch(framebuf framebuf.h SOURCE)
set_entrypoint(framebuf DrvEnableDriver 12)
set_subsystem(framebuf native)
set_image_base(framebuf 0x00010000)
target_link_libraries(framebuf libcntpr)
add_importlibs(framebuf win32k)
add_dependencies(framebuf psdk bugcodes)
add_dependencies(framebuf psdk)
add_cd_file(TARGET framebuf DESTINATION reactos/system32 FOR all)

View file

@ -19,11 +19,10 @@ add_library(vgaddi SHARED
vgaddi.rc
${CMAKE_CURRENT_BINARY_DIR}/vgaddi.def)
set_entrypoint(vgaddi DrvEnableDriver 12)
set_subsystem(vgaddi native)
set_image_base(vgaddi 0x00010000)
set_module_type(vgaddi kerneldll ENTRYPOINT DrvEnableDriver 12)
add_pch(vgaddi vgaddi.h SOURCE)
add_importlibs(vgaddi win32k)
target_link_libraries(vgaddi libcntpr)
add_dependencies(vgaddi psdk bugcodes)
add_dependencies(vgaddi psdk)
add_cd_file(TARGET vgaddi DESTINATION reactos/system32 FOR all)

View file

@ -16,9 +16,7 @@ add_library(ftfd SHARED
freetype.rc
${CMAKE_CURRENT_BINARY_DIR}/ftfd.def)
set_entrypoint(ftfd FtfdEnableDriver 12)
set_subsystem(ftfd native)
set_image_base(ftfd 0x00010000)
set_module_type(ftfd kerneldll ENTRYPOINT FtfdEnableDriver 12)
target_link_libraries(ftfd
freetype