menios icon indicating copy to clipboard operation
menios copied to clipboard

Extract kernel build logic to mk/kernel/build.mk

Open pbalduino opened this issue 3 months ago • 0 comments

Parent Issue

Part of #352 - Makefile refactoring

Objective

Hold kernel object discovery, build flags, and the heavy build recipe with Limine/image creation in a dedicated kernel build file.

Scope

Extract from root Makefile:

  • Lines ~61: Kernel source/object discovery
  • Lines ~576: Kernel build flags
  • Lines ~635: Limine/image creation recipe
  • Kernel-specific compilation rules

Target Location

mk/kernel/build.mk

Implementation Steps

  1. Create mk/kernel/ directory structure
  2. Extract kernel object patterns and discovery logic
  3. Move kernel-specific build flags
  4. Extract Limine integration and image creation
  5. Update root Makefile to include mk/kernel/build.mk
  6. Test make kernel or equivalent target
  7. Verify bootable image is created correctly

Dependencies

  • #353 (core config)
  • #354 (core docker)

Acceptance Criteria

  • [ ] All kernel build logic in mk/kernel/build.mk
  • [ ] Kernel builds successfully
  • [ ] Bootable image created correctly
  • [ ] Limine integration works
  • [ ] No behavioral changes

pbalduino avatar Oct 22 '25 19:10 pbalduino