diff --git a/reactos/include/asm/asm.inc b/reactos/include/asm/asm.inc index d81db8bc63e..07206cf78c5 100644 --- a/reactos/include/asm/asm.inc +++ b/reactos/include/asm/asm.inc @@ -1,7 +1,7 @@ /* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS Kernel - * FILE: ntoskrnl/include/amd64/asmmacro.S + * FILE: include/asm/asm.inc * PURPOSE: ASM macros for GAS and MASM/ML64 * PROGRAMMERS: Timo Kreuzer (timo.kreuzer@reactos.org) */ @@ -315,15 +315,14 @@ code = 1 .macro absolute address __absolute__address__ = \address -ENDM +.endm .macro resb name, size \name = __absolute__address__ __absolute__address__ = __absolute__address__ + \size -ENDM +.endm .macro UNIMPLEMENTED2 file, line, func - jmp 3f 1: .asciz "\func" 2: .asciz \file diff --git a/reactos/subsystems/mvdm/asm16.cmake b/reactos/subsystems/mvdm/asm16.cmake index 5c08a2a4fe4..b60bb4a60b1 100644 --- a/reactos/subsystems/mvdm/asm16.cmake +++ b/reactos/subsystems/mvdm/asm16.cmake @@ -38,6 +38,7 @@ function(add_asm16_bin _target _binary_file _base_address) # many ASM files is by concatenating them into a single one and # compile the resulting file. concatenate_files(${_concatenated_asm_file} ${_source_file_list}) + set_source_files_properties(${_concatenated_asm_file} PROPERTIES GENERATED TRUE) ## ## All this part is the same as CreateBootSectorTarget @@ -53,9 +54,11 @@ function(add_asm16_bin _target _binary_file _base_address) # COMMAND objcopy --output-target binary --image-base 0x${_base_address} ${_object_file} ${_binary_file} DEPENDS ${_object_file} native-obj2bin) - set_source_files_properties(${_object_file} ${_binary_file} PROPERTIES GENERATED TRUE) - add_custom_target(${_target} ALL DEPENDS ${_binary_file}) + # set_target_properties(${_target} PROPERTIES OUTPUT_NAME ${_target} SUFFIX ".bin") + set_target_properties(${_target} PROPERTIES LOCATION_${CMAKE_BUILD_TYPE} ${_binary_file}) ## Support of $ is limited to add_executable() or add_library() + set_target_properties(${_target} PROPERTIES LOCATION ${_binary_file}) ## Support of $ is limited to add_executable() or add_library() + add_clean_target(${_target}) endfunction() else() @@ -93,6 +96,7 @@ function(add_asm16_bin _target _binary_file _base_address) # many ASM files is by concatenating them into a single one and # compile the resulting file. concatenate_files(${_concatenated_asm_file} ${_source_file_list}) + set_source_files_properties(${_concatenated_asm_file} PROPERTIES GENERATED TRUE) ## ## All this part is the same as CreateBootSectorTarget @@ -113,9 +117,11 @@ function(add_asm16_bin _target _binary_file _base_address) COMMAND native-obj2bin ${_object_file} ${_binary_file} ${_base_address} DEPENDS ${_object_file} native-obj2bin) - set_source_files_properties(${_object_file} ${_preprocessed_asm_file} ${_binary_file} PROPERTIES GENERATED TRUE) - add_custom_target(${_target} ALL DEPENDS ${_binary_file}) + # set_target_properties(${_target} PROPERTIES OUTPUT_NAME ${_target} SUFFIX ".bin") + set_target_properties(${_target} PROPERTIES LOCATION_${CMAKE_BUILD_TYPE} ${_binary_file}) ## Support of $ is limited to add_executable() or add_library() + set_target_properties(${_target} PROPERTIES LOCATION ${_binary_file}) ## Support of $ is limited to add_executable() or add_library() + add_clean_target(${_target}) endfunction() endif() diff --git a/reactos/subsystems/mvdm/dos/CMakeLists.txt b/reactos/subsystems/mvdm/dos/CMakeLists.txt index bd81c47be0c..bf7f56383a7 100644 --- a/reactos/subsystems/mvdm/dos/CMakeLists.txt +++ b/reactos/subsystems/mvdm/dos/CMakeLists.txt @@ -1,3 +1,4 @@ include_directories(${REACTOS_SOURCE_DIR}/subsystems/mvdm/dos) add_asm16_bin(command ${CMAKE_CURRENT_BINARY_DIR}/command.com 0x0100 command.S) +add_cd_file(TARGET command DESTINATION reactos/system32 FOR all) diff --git a/reactos/subsystems/mvdm/ntvdm/CMakeLists.txt b/reactos/subsystems/mvdm/ntvdm/CMakeLists.txt index baa0327608a..e6e7cfe266a 100644 --- a/reactos/subsystems/mvdm/ntvdm/CMakeLists.txt +++ b/reactos/subsystems/mvdm/ntvdm/CMakeLists.txt @@ -4,10 +4,14 @@ PROJECT(NTVDM) ##################################### # Generate the integrated COMMAND.COM # + +# Retrieve the full path to the generated file of the 'command' target +get_target_property(_command_com_file command LOCATION) + add_custom_command( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/command_com.c ${CMAKE_CURRENT_BINARY_DIR}/command_com.h - COMMAND native-bin2c ${CMAKE_CURRENT_BINARY_DIR}/../dos/command.com ${CMAKE_CURRENT_BINARY_DIR}/command_com.c ${CMAKE_CURRENT_BINARY_DIR}/command_com.h BIN CommandCom - DEPENDS native-bin2c command) + COMMAND native-bin2c ${_command_com_file} ${CMAKE_CURRENT_BINARY_DIR}/command_com.c ${CMAKE_CURRENT_BINARY_DIR}/command_com.h BIN CommandCom + DEPENDS native-bin2c command ${_command_com_file}) ##################################### include_directories(${REACTOS_SOURCE_DIR}/include/reactos/libs/fast486)