<commit_before># udev cmake file

# generate keyboard-keys-from-name.h and keyboard-keys-to-name.h
include(keyboard-keys.cmake)

include_directories(core)
include_directories(core/net)


# udev
configure_file(udev.pc.cmake udev.pc)

# udev core
set(libudev_core_src
	core/udev.h
	core/udev-event.c
	core/udev-watch.c
	core/udev-node.c
	core/udev-rules.c
	core/udev-ctrl.c
	core/builtin/udev-builtin.c
	core/builtin/udev-builtin-btrfs.c
	core/builtin/udev-builtin-hwdb.c
	core/builtin/udev-builtin-input_id.c
	core/builtin/udev-builtin-keyboard.c
	core/builtin/udev-builtin-net_id.c
	core/builtin/udev-builtin-net_setup_link.c
	core/builtin/udev-builtin-path_id.c
	core/builtin/udev-builtin-usb_id.c
	core/net/link-config.h
	core/net/link-config.c
	core/net/ethtool-util.h
	core/net/ethtool-util.c
)
if (${KMOD_ENABLE})
	list(APPEND libudev_core_src core/builtin/udev-builtin-kmod.c)
endif()
if (${BLKID_ENABLE})
	list(APPEND libudev_core_src core/builtin/udev-builtin-blkid.c)
endif()
add_library(udev_core_obj STATIC
	${libudev_core_src}
	${PROJECT_BINARY_DIR}/src/link-config-gperf.c
)
target_link_libraries(udev_core_obj ${KMOD_LIBRARIES} ${BLKID_LIBRARIES})
target_link_libraries(udev_core_obj udev_int_obj udev_label_obj udev_shared_obj)

add_custom_command(
	OUTPUT link-config-gperf.c
	COMMAND ${GPERF} < ${CMAKE_CURRENT_SOURCE_DIR}/core/net/link-config-gperf.gperf > link-config-gperf.c
	DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/core/net/link-config-gperf.gperf
)

#add_custom_target(
#	link-config-gperf.c ALL
#	COMMAND ${GPERF} < ${CMAKE_CURRENT_SOURCE_DIR}/core/net/link-config-gperf.gperf > link-config-gperf.c
#	DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/core/net/link-config-gperf.gperf
#	#WORKING_DIRECTORY ...
#)
#add_dependencies(udev_core_obj link-config-gperf.c)

# udebadm
add_library(udevadm_obj OBJECT
	udevadm/udevadm.c<commit_msg>* cmake: remove comment block for udev_core_obj;<commit_after># udev cmake file

# generate keyboard-keys-from-name.h and keyboard-keys-to-name.h
include(keyboard-keys.cmake)

include_directories(core)
include_directories(core/net)


# udev
configure_file(udev.pc.cmake udev.pc)

# udev core
set(libudev_core_src
	core/udev.h
	core/udev-event.c
	core/udev-watch.c
	core/udev-node.c
	core/udev-rules.c
	core/udev-ctrl.c
	core/builtin/udev-builtin.c
	core/builtin/udev-builtin-btrfs.c
	core/builtin/udev-builtin-hwdb.c
	core/builtin/udev-builtin-input_id.c
	core/builtin/udev-builtin-keyboard.c
	core/builtin/udev-builtin-net_id.c
	core/builtin/udev-builtin-net_setup_link.c
	core/builtin/udev-builtin-path_id.c
	core/builtin/udev-builtin-usb_id.c
	core/net/link-config.h
	core/net/link-config.c
	core/net/ethtool-util.h
	core/net/ethtool-util.c
)
if (${KMOD_ENABLE})
	list(APPEND libudev_core_src core/builtin/udev-builtin-kmod.c)
endif()
if (${BLKID_ENABLE})
	list(APPEND libudev_core_src core/builtin/udev-builtin-blkid.c)
endif()
add_library(udev_core_obj STATIC
	${libudev_core_src}
	${PROJECT_BINARY_DIR}/src/link-config-gperf.c
)
target_link_libraries(udev_core_obj ${KMOD_LIBRARIES} ${BLKID_LIBRARIES})
target_link_libraries(udev_core_obj udev_int_obj udev_label_obj udev_shared_obj)

add_custom_command(
	OUTPUT link-config-gperf.c
	COMMAND ${GPERF} < ${CMAKE_CURRENT_SOURCE_DIR}/core/net/link-config-gperf.gperf > link-config-gperf.c
	DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/core/net/link-config-gperf.gperf
)

# udebadm
add_library(udevadm_obj OBJECT
	udevadm/udevadm.c
{'fraction_non_alphanumeric': 0.12822014051522249, 'fraction_numerical': 0.0, 'mean_word_length': 5.422932330827067, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1633594', 'n_tokens_mistral': 1484, 'n_tokens_neox': 1510, 'n_words': 161}