1 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DVERSION=\\\"${HVF_VERSION}\\\"")
2 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -I ${PROJECT_SOURCE_DIR}/cp/include/")
3 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -include ${PROJECT_SOURCE_DIR}/cp/include/nucleus.h")
5 set(CMAKE_EXE_LINKER_FLAGS "-T ${PROJECT_SOURCE_DIR}/cp/scripts/linker-hvf.script")
8 OUTPUT nucleus/config.tab.h
10 COMMAND ${CMAKE_CURRENT_BINARY_DIR}/../build/byacc/yacc
11 -b config -d -P -p config_ config.y
12 WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/nucleus
13 DEPENDS nucleus/config.y
16 OUTPUT nucleus/config.lex.c
17 COMMAND ${CMAKE_CURRENT_BINARY_DIR}/../build/re2c/re2c
18 -o config.lex.c config.l
19 WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/nucleus
20 DEPENDS nucleus/config.l nucleus/config.tab.h
24 OUTPUT nucleus/direct.tab.h
26 COMMAND ${CMAKE_CURRENT_BINARY_DIR}/../build/byacc/yacc
27 -b direct -d -P -p direct_ direct.y
28 WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/nucleus
29 DEPENDS nucleus/direct.y
32 OUTPUT nucleus/direct.lex.c
33 COMMAND ${CMAKE_CURRENT_BINARY_DIR}/../build/re2c/re2c
34 -o direct.lex.c direct.l
35 WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/nucleus
36 DEPENDS nucleus/direct.l nucleus/direct.tab.h
39 set(SUBDIRS nucleus mm fs drivers shell guest)
42 foreach(SUBDIR ${SUBDIRS})
44 include(${SUBDIR}/objs.cmake)
45 foreach(FILE ${FILES})
46 set(SRCFILES ${SRCFILES} ${SUBDIR}/${FILE})
50 add_executable(hvf ${SRCFILES})
52 target_link_libraries(hvf clock)
53 target_link_libraries(hvf digest)
54 target_link_libraries(hvf string)
55 target_link_libraries(hvf ebcdic)
56 target_link_libraries(hvf errno)