mirror of
https://github.com/reactos/reactos.git
synced 2025-02-24 01:15:09 +00:00
[ASM]
Fix the file header description. Consistently use .endm for closing a macro started with .macro. [NTVDM] - Add "_clean" targets to generated asm16 targets. - Fix CMake dependency generation in a somewhat hackish way: I don't know how to cleanly specify the location of generated files for custom targets. And it is also hackish because in a CMake custom command which depends on the COMMAND.COM target, I also need to explicitely say that the command depends on the output file created by the COMMAND.COM target... - Add COMMAND.COM to the CD files, even if NTVDM doesn't use an external command.com for now. CORE-5221 svn path=/trunk/; revision=69234
This commit is contained in:
parent
3b7e00591f
commit
0a920bbf3b
4 changed files with 20 additions and 10 deletions
|
@ -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
|
||||
|
|
|
@ -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 $<TARGET_FILE:xxx> is limited to add_executable() or add_library()
|
||||
set_target_properties(${_target} PROPERTIES LOCATION ${_binary_file}) ## Support of $<TARGET_FILE:xxx> 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 $<TARGET_FILE:xxx> is limited to add_executable() or add_library()
|
||||
set_target_properties(${_target} PROPERTIES LOCATION ${_binary_file}) ## Support of $<TARGET_FILE:xxx> is limited to add_executable() or add_library()
|
||||
add_clean_target(${_target})
|
||||
endfunction()
|
||||
|
||||
endif()
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue