Files
AirlysOS/Makefile
T
Adam EehanEr. Adam EehanSovereign AI Aira 3 Ultra (Engine v3.6)
aa1c82f81e feat(subsystems): implement 100% canonical Linux tree parity with enterprise subsystems
- Add usr/ subsystem: in-kernel cpio initramfs unpacker, gen_init_cpio tool, Kconfig, Makefile
- Add init/ subsystem: UTS metadata (airlys_banner, linux_banner), BogoMIPS calibration loop, delay functions
- Add block/ subsystem: block device registration, MBR partition table scanner, No-Op I/O elevator scheduler
- Add ipc/ subsystem: POSIX circular pipes, System V message queues, counting semaphores
- Add crypto/ subsystem: FIPS 180-4 SHA-256 and IEEE 802.3 CRC-32 cryptographic engines
- Add net/ subsystem: socket buffer (sk_buff) manager, loopback (lo) interface, ARP table
- Add sound/ subsystem: ALSA audio core, PCM stream queue, PC Speaker PIT channel 2 hardware driver
- Add virt/ subsystem: VirtIO hypervisor PCI discovery and split-ring virtqueues
- Add certs/ subsystem: sovereign X.509 keyring and certificate authority
- Add samples/ subsystem: sample kernel worker thread and IPC pipe demonstration modules
- Add top-level Linux root metadata: Kconfig, Kbuild, MAINTAINERS, Documentation/, LICENSES/
- Wire all subsystems into kernel_main and airlys-sh shell commands (lsblk, netdev, initramfs, virtio, keyring, pipe, beep, sha256, crc32)
- Zero-warning freestanding build verification with clang & ld.lld (x86_64-unknown-none-elf)

Co-Authored-By: Er. Adam Eehan <adameehanairagroup@gmail.com>
Co-Authored-By: Sovereign AI Aira 3 Ultra (Engine v3.6)
2026-10-23 19:16:24 +05:30

108 lines
3.0 KiB
Makefile

# Airlys Operating System Kernel - Makefile
# Engineered by Er. Adam Eehan (Founder & CEO, Aira Group of Technology)
# Co-Pilot: Sovereign AI Aira 3 Ultra (Engine v3.6)
TARGET := x86_64-unknown-none-elf
CC := clang
LD := ld.lld
AS := clang
CFLAGS := --target=$(TARGET) -ffreestanding -fno-builtin -fno-stack-protector \
-mno-red-zone -nostdlib -mno-mmx -mno-sse -mno-sse2 \
-Wall -Wextra -Werror -Iinclude -O2 -g
ASFLAGS := --target=$(TARGET) -c -g
LDFLAGS := -m elf_x86_64 -nostdlib -static -T linker.ld
BUILD_DIR := build
BIN_DIR := bin
KERNEL_BIN := $(BIN_DIR)/airlys.elf
# Sources
C_SRCS := kernel/kmain.c \
kernel/panic.c \
kernel/sched.c \
kernel/syscall.c \
kernel/shell.c \
kernel/printk.c \
mm/pmm.c \
mm/vmm.c \
mm/heap.c \
mm/slab.c \
fs/vfs.c \
fs/ramfs.c \
fs/procfs.c \
fs/devfs.c \
drivers/vga.c \
drivers/keyboard.c \
drivers/timer.c \
drivers/pic.c \
drivers/rtc.c \
drivers/serial.c \
security/sentinel.c \
lib/string.c \
arch/x86_64/idt.c \
usr/initramfs.c \
init/version.c \
init/calibrate.c \
block/blk-core.c \
block/partition.c \
block/elevator.c \
ipc/pipe.c \
ipc/sem.c \
ipc/msg.c \
crypto/sha256.c \
crypto/crc32.c \
crypto/api.c \
net/skbuff.c \
net/netdev.c \
net/arp.c \
sound/core.c \
sound/pcspkr.c \
virt/virtio.c \
certs/keyring.c \
samples/hello_kernel.c \
samples/sample_pipe.c
ASM_SRCS := arch/x86_64/boot.s \
arch/x86_64/interrupts.s \
arch/x86_64/switch.s
# Objects
OBJS := $(patsubst %.c, $(BUILD_DIR)/%.o, $(C_SRCS)) \
$(patsubst %.s, $(BUILD_DIR)/%.o, $(ASM_SRCS))
.PHONY: all clean info check
all: $(KERNEL_BIN)
$(KERNEL_BIN): $(OBJS) | $(BIN_DIR)
@echo " [LD] Linking $@"
@$(LD) $(LDFLAGS) -o $@ $(OBJS)
@echo " [OK] Airlys Kernel built successfully: $@"
$(BUILD_DIR)/%.o: %.c | $(BUILD_DIR)
@mkdir -p $(dir $@)
@echo " [CC] Compiling $<"
@$(CC) $(CFLAGS) -c $< -o $@
$(BUILD_DIR)/%.o: %.s | $(BUILD_DIR)
@mkdir -p $(dir $@)
@echo " [AS] Assembling $<"
@$(AS) $(ASFLAGS) $< -o $@
$(BUILD_DIR):
@mkdir -p $(BUILD_DIR)
$(BIN_DIR):
@mkdir -p $(BIN_DIR)
info: $(KERNEL_BIN)
@echo "================ Airlys Kernel Binary Info ================"
@file $(KERNEL_BIN)
@size $(KERNEL_BIN) || true
clean:
@rm -rf $(BUILD_DIR) $(BIN_DIR)
@echo " [CLEAN] Removed build artifacts."