Annotation of solidite/kernel/Makefile, revision 1.1
1.1 ! user 1: # Copyright (c) 2026 The Solidite Developers
! 2: #
! 3: # This program is free software: you can redistribute it and/or modify it under
! 4: # the terms of the GNU Affero General Public License as published by the Free
! 5: # Software Foundation, either version 3 of the License, or (at your option) any
! 6: # later version.
! 7: #
! 8: # This program is distributed in the hope that it will be useful, but WITHOUT
! 9: # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
! 10: # FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
! 11: # details.
! 12: #
! 13: # You should have received a copy of the GNU Affero General Public License along
! 14: # with this program. If not, see <https://www.gnu.org/licenses/>.
! 15:
! 16: .POSIX:
! 17:
! 18: ARCH != uname -m
! 19:
! 20: ifndef AS
! 21: AS=as
! 22: endif
! 23:
! 24: CFLAGS_x86_64=-ffreestanding -fno-PIC -fno-stack-protector -mcmodel=kernel \
! 25: -mno-red-zone
! 26:
! 27: LDFLAGS_riscv64=-T riscv64.ld --no-warn-rwx-segments
! 28: LDFLAGS_x86_64=-T x86_64.ld --no-warn-rwx-segments
! 29:
! 30: TARGET=../output/boot/kernel
! 31:
! 32: all: $(TARGET)
! 33:
! 34: $(TARGET): ../obj/main.o
! 35: $(CROSS_COMPILE)$(LD) $(LDFLAGS) $(LDFLAGS_$(ARCH)) ../obj/main.o \
! 36: ../obj/arch.o ../output/lib/libc.a -o ../output/boot/kernel
! 37:
! 38: ../obj/arch.o:
! 39: $(CROSS_COMPILE)$(AS) $(ASFLAGS) libkernel/$(ARCH).s -o $@
! 40:
! 41: ../obj/main.o: ../obj/arch.o
! 42: $(CROSS_COMPILE)$(CC) $(CFLAGS) $(CFLAGS_$(ARCH)) -c main/main.c -o \
! 43: ../obj/main.o
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>