aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRaghuram Subramani <raghus2247@gmail.com>2024-12-30 05:47:04 -0500
committerRaghuram Subramani <raghus2247@gmail.com>2024-12-30 05:47:04 -0500
commit3cd9b0168a01651a7353ea1b04f90b902fbdd9e7 (patch)
treefbef34ee1313f482dae723def5029af5cec024fd
parent04f57de6357aa5ce4b8e2a7eee6c3882df0715ba (diff)
global: update licenses
-rw-r--r--env.sh18
-rw-r--r--kernel/boot/init/boot.s18
-rw-r--r--kernel/boot/init/crti.s18
-rw-r--r--kernel/boot/init/crtn.s18
-rw-r--r--kernel/boot/link.ld18
-rw-r--r--kernel/drivers/vga_text_buffer/vga_text_buffer.c18
-rw-r--r--kernel/include/driver/vga_text_buffer.h18
-rw-r--r--kernel/include/libk/io.h18
-rw-r--r--kernel/include/libk/string.h18
-rw-r--r--kernel/kernel/kernel.c18
-rw-r--r--kernel/libk/printk.c18
-rw-r--r--kernel/libk/strlen.c18
-rwxr-xr-xscripts/build-toolchain.sh18
-rwxr-xr-xscripts/fetch-toolchain.sh18
-rw-r--r--toolchain/Makefile26
-rw-r--r--toolchain/cross_binutils.mk48
-rw-r--r--toolchain/cross_gcc.mk64
-rw-r--r--toolchain/host_binutils.mk44
-rw-r--r--toolchain/host_gcc.mk50
-rw-r--r--toolchain/utils.mk18
20 files changed, 431 insertions, 71 deletions
diff --git a/env.sh b/env.sh
index 4341157..4c7ae0b 100644
--- a/env.sh
+++ b/env.sh
@@ -1,5 +1,23 @@
#!/usr/bin/env bash
+#
+# CMOS
+# Copyright (C) 2024 Raghuram Subramani <raghus2247@gmail.com>
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+
dir="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"
export PATH="$dir/toolchain/cross/bin:$dir/toolchain/host/bin:$PATH"
diff --git a/kernel/boot/init/boot.s b/kernel/boot/init/boot.s
index 6b40c1c..363f98e 100644
--- a/kernel/boot/init/boot.s
+++ b/kernel/boot/init/boot.s
@@ -1,3 +1,21 @@
+/*
+* CMOS
+* Copyright (C) 2024 Raghuram Subramani <raghus2247@gmail.com>
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
/* Adapted from https://wiki.osdev.org/Bare_Bones */
/* Declare constants for the multiboot header. */
diff --git a/kernel/boot/init/crti.s b/kernel/boot/init/crti.s
index 4e221ab..8ea5c60 100644
--- a/kernel/boot/init/crti.s
+++ b/kernel/boot/init/crti.s
@@ -1,3 +1,21 @@
+/*
+* CMOS
+* Copyright (C) 2024 Raghuram Subramani <raghus2247@gmail.com>
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
.section .init
.global _init
.type _init, @function
diff --git a/kernel/boot/init/crtn.s b/kernel/boot/init/crtn.s
index 0d58006..7109b57 100644
--- a/kernel/boot/init/crtn.s
+++ b/kernel/boot/init/crtn.s
@@ -1,3 +1,21 @@
+/*
+* CMOS
+* Copyright (C) 2024 Raghuram Subramani <raghus2247@gmail.com>
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
.section .init
/* gcc will nicely put the contents of crtend.o's .init section here. */
popl %ebp
diff --git a/kernel/boot/link.ld b/kernel/boot/link.ld
index e6498d5..75239d2 100644
--- a/kernel/boot/link.ld
+++ b/kernel/boot/link.ld
@@ -1,3 +1,21 @@
+/*
+* CMOS
+* Copyright (C) 2024 Raghuram Subramani <raghus2247@gmail.com>
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
/* The bootloader will look at this image and start execution at the symbol
designated as the entry point. */
ENTRY(_start)
diff --git a/kernel/drivers/vga_text_buffer/vga_text_buffer.c b/kernel/drivers/vga_text_buffer/vga_text_buffer.c
index d8013ae..d400f2d 100644
--- a/kernel/drivers/vga_text_buffer/vga_text_buffer.c
+++ b/kernel/drivers/vga_text_buffer/vga_text_buffer.c
@@ -1,3 +1,21 @@
+/*
+* CMOS
+* Copyright (C) 2024 Raghuram Subramani <raghus2247@gmail.com>
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
#include <stddef.h>
#include <stdint.h>
#include <stdbool.h>
diff --git a/kernel/include/driver/vga_text_buffer.h b/kernel/include/driver/vga_text_buffer.h
index d292419..7d46b54 100644
--- a/kernel/include/driver/vga_text_buffer.h
+++ b/kernel/include/driver/vga_text_buffer.h
@@ -1,3 +1,21 @@
+/*
+* CMOS
+* Copyright (C) 2024 Raghuram Subramani <raghus2247@gmail.com>
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
#ifndef __drivers_vga_text_buffer_h
#define __drivers_vga_text_buffer_h
diff --git a/kernel/include/libk/io.h b/kernel/include/libk/io.h
index 4de1af9..ac31038 100644
--- a/kernel/include/libk/io.h
+++ b/kernel/include/libk/io.h
@@ -1,3 +1,21 @@
+/*
+* CMOS
+* Copyright (C) 2024 Raghuram Subramani <raghus2247@gmail.com>
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
#ifndef __libk_io_h
#define __libk_io_h
diff --git a/kernel/include/libk/string.h b/kernel/include/libk/string.h
index 7ec7adc..7a92dfa 100644
--- a/kernel/include/libk/string.h
+++ b/kernel/include/libk/string.h
@@ -1,3 +1,21 @@
+/*
+* CMOS
+* Copyright (C) 2024 Raghuram Subramani <raghus2247@gmail.com>
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
#ifndef __libk_string_h
#define __libk_string_h
diff --git a/kernel/kernel/kernel.c b/kernel/kernel/kernel.c
index f5dcf08..a650a31 100644
--- a/kernel/kernel/kernel.c
+++ b/kernel/kernel/kernel.c
@@ -1,3 +1,21 @@
+/*
+* CMOS
+* Copyright (C) 2024 Raghuram Subramani <raghus2247@gmail.com>
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
#include <libk/io.h>
#include <driver/vga_text_buffer.h>
diff --git a/kernel/libk/printk.c b/kernel/libk/printk.c
index b255dbe..4326d01 100644
--- a/kernel/libk/printk.c
+++ b/kernel/libk/printk.c
@@ -1,3 +1,21 @@
+/*
+* CMOS
+* Copyright (C) 2024 Raghuram Subramani <raghus2247@gmail.com>
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
#include <libk/io.h>
#include <driver/vga_text_buffer.h>
diff --git a/kernel/libk/strlen.c b/kernel/libk/strlen.c
index 9fdcec9..656b06f 100644
--- a/kernel/libk/strlen.c
+++ b/kernel/libk/strlen.c
@@ -1,3 +1,21 @@
+/*
+* CMOS
+* Copyright (C) 2024 Raghuram Subramani <raghus2247@gmail.com>
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
#include <stddef.h>
#include <libk/string.h>
diff --git a/scripts/build-toolchain.sh b/scripts/build-toolchain.sh
index 4a7efce..a59c79c 100755
--- a/scripts/build-toolchain.sh
+++ b/scripts/build-toolchain.sh
@@ -1,5 +1,23 @@
#!/usr/bin/env bash
+#
+# CMOS
+# Copyright (C) 2024 Raghuram Subramani <raghus2247@gmail.com>
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+
set -xe
tar cf - toolchain/host toolchain/cross | pigz > toolchain.tar.gz
diff --git a/scripts/fetch-toolchain.sh b/scripts/fetch-toolchain.sh
index f933131..19b8cdc 100755
--- a/scripts/fetch-toolchain.sh
+++ b/scripts/fetch-toolchain.sh
@@ -1,5 +1,23 @@
#!/usr/bin/env bash
+#
+# CMOS
+# Copyright (C) 2024 Raghuram Subramani <raghus2247@gmail.com>
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+
set -xe
rm -rf toolchain.tar.gz toolchain/host toolchain/cross
diff --git a/toolchain/Makefile b/toolchain/Makefile
index 9a9b70f..142132b 100644
--- a/toolchain/Makefile
+++ b/toolchain/Makefile
@@ -1,10 +1,28 @@
+#
+# CMOS
+# Copyright (C) 2024 Raghuram Subramani <raghus2247@gmail.com>
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+
export ROOT_DIR := $(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))
export BUILD_DIR := $(ROOT_DIR)/build
export OUT_DIR := $(ROOT_DIR)
export PARALLEL_CORES := 16
all:
- # $(MAKE) -f host_binutils.mk
- # $(MAKE) -f host_gcc.mk
- $(MAKE) -f cross_binutils.mk
- $(MAKE) -f cross_gcc.mk
+ # $(MAKE) -f host_binutils.mk
+ # $(MAKE) -f host_gcc.mk
+ $(MAKE) -f cross_binutils.mk
+ $(MAKE) -f cross_gcc.mk
diff --git a/toolchain/cross_binutils.mk b/toolchain/cross_binutils.mk
index 721ec85..71ed0d5 100644
--- a/toolchain/cross_binutils.mk
+++ b/toolchain/cross_binutils.mk
@@ -1,3 +1,21 @@
+#
+# CMOS
+# Copyright (C) 2024 Raghuram Subramani <raghus2247@gmail.com>
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+
include utils.mk
VERSION := 2.42
@@ -18,28 +36,28 @@ all: install
$(call add-to-path,$(shell pwd)/host/bin)
$(FILE):
- mkdir -p $(DIR)
- wget $(URL) -O $(FILE)
+ mkdir -p $(DIR)
+ wget $(URL) -O $(FILE)
unpack: $(FILE)
- tar xf $(FILE) -C $(DIR)
+ tar xf $(FILE) -C $(DIR)
configure: unpack
- mkdir -p $(BUILD)
- cd $(BUILD)
- $(SRC)/configure \
- --prefix=$(OUT) \
- --target=$(TOOLCHAIN_TARGET) \
- --disable-nls \
- --with-sysroot
+ mkdir -p $(BUILD)
+ cd $(BUILD)
+ $(SRC)/configure \
+ --prefix=$(OUT) \
+ --target=$(TOOLCHAIN_TARGET) \
+ --disable-nls \
+ --with-sysroot
build: configure
- cd $(BUILD)
- $(MAKE) -j$(PARALLEL_CORES)
+ cd $(BUILD)
+ $(MAKE) -j$(PARALLEL_CORES)
install: build
- cd $(BUILD)
- $(MAKE) install
+ cd $(BUILD)
+ $(MAKE) install
clean:
- rm -rf $(DIR) $(FILE) $(OUT)
+ rm -rf $(DIR) $(FILE) $(OUT)
diff --git a/toolchain/cross_gcc.mk b/toolchain/cross_gcc.mk
index 35fa8de..f82a6d6 100644
--- a/toolchain/cross_gcc.mk
+++ b/toolchain/cross_gcc.mk
@@ -1,3 +1,21 @@
+#
+# CMOS
+# Copyright (C) 2024 Raghuram Subramani <raghus2247@gmail.com>
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+
include utils.mk
VERSION := 14.2.0
@@ -19,36 +37,36 @@ $(call add-to-path,$(shell pwd)/cross/bin)
$(call add-to-path,$(shell pwd)/host/bin)
$(FILE):
- mkdir -p $(DIR)
- wget $(URL) -O $(FILE)
+ mkdir -p $(DIR)
+ wget $(URL) -O $(FILE)
unpack: $(FILE)
- tar xf $(FILE) -C $(DIR)
+ tar xf $(FILE) -C $(DIR)
configure: unpack
- cd $(SRC)
- ./contrib/download_prerequisites
- mkdir -p $(BUILD)
- cd $(BUILD)
- $(SRC)/configure \
- --prefix=$(OUT) \
- --target=$(TOOLCHAIN_TARGET) \
- --disable-nls \
- --enable-languages=c,c++ \
- --without-headers \
- --disable-hosted-libstdcxx
+ cd $(SRC)
+ ./contrib/download_prerequisites
+ mkdir -p $(BUILD)
+ cd $(BUILD)
+ $(SRC)/configure \
+ --prefix=$(OUT) \
+ --target=$(TOOLCHAIN_TARGET) \
+ --disable-nls \
+ --enable-languages=c,c++ \
+ --without-headers \
+ --disable-hosted-libstdcxx
build: configure
- cd $(BUILD)
- $(MAKE) -j$(PARALLEL_CORES) all-gcc
- $(MAKE) -j$(PARALLEL_CORES) all-target-libgcc
- $(MAKE) -j$(PARALLEL_CORES) all-target-libstdc++-v3
+ cd $(BUILD)
+ $(MAKE) -j$(PARALLEL_CORES) all-gcc
+ $(MAKE) -j$(PARALLEL_CORES) all-target-libgcc
+ $(MAKE) -j$(PARALLEL_CORES) all-target-libstdc++-v3
install: build
- cd $(BUILD)
- $(MAKE) install-gcc
- $(MAKE) install-target-libgcc
- $(MAKE) install-target-libstdc++-v3
+ cd $(BUILD)
+ $(MAKE) install-gcc
+ $(MAKE) install-target-libgcc
+ $(MAKE) install-target-libstdc++-v3
clean:
- rm -rf $(DIR) $(FILE) $(OUT)
+ rm -rf $(DIR) $(FILE) $(OUT)
diff --git a/toolchain/host_binutils.mk b/toolchain/host_binutils.mk
index f906238..6d24f88 100644
--- a/toolchain/host_binutils.mk
+++ b/toolchain/host_binutils.mk
@@ -1,3 +1,21 @@
+#
+# CMOS
+# Copyright (C) 2024 Raghuram Subramani <raghus2247@gmail.com>
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+
VERSION := 2.42
URL := https://ftp.gnu.org/gnu/binutils/binutils-$(VERSION).tar.gz
@@ -12,26 +30,26 @@ all: install
.ONESHELL:
$(FILE):
- mkdir -p $(DIR)
- wget $(URL) -O $(FILE)
+ mkdir -p $(DIR)
+ wget $(URL) -O $(FILE)
unpack: $(FILE)
- tar xf $(FILE) -C $(DIR)
+ tar xf $(FILE) -C $(DIR)
configure: unpack
- mkdir -p $(BUILD)
- cd $(BUILD)
- $(SRC)/configure \
- --prefix=$(OUT) \
- --disable-nls
+ mkdir -p $(BUILD)
+ cd $(BUILD)
+ $(SRC)/configure \
+ --prefix=$(OUT) \
+ --disable-nls
build: configure
- cd $(BUILD)
- $(MAKE) -j$(PARALLEL_CORES)
+ cd $(BUILD)
+ $(MAKE) -j$(PARALLEL_CORES)
install: build
- cd $(BUILD)
- $(MAKE) install
+ cd $(BUILD)
+ $(MAKE) install
clean:
- rm -rf $(DIR) $(FILE) $(OUT)
+ rm -rf $(DIR) $(FILE) $(OUT)
diff --git a/toolchain/host_gcc.mk b/toolchain/host_gcc.mk
index c30758c..422a96b 100644
--- a/toolchain/host_gcc.mk
+++ b/toolchain/host_gcc.mk
@@ -1,3 +1,21 @@
+#
+# CMOS
+# Copyright (C) 2024 Raghuram Subramani <raghus2247@gmail.com>
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+
VERSION := 14.2.0
URL := https://ftp.gnu.org/gnu/gcc/gcc-$(VERSION)/gcc-$(VERSION).tar.gz
@@ -12,29 +30,29 @@ all: install
.ONESHELL:
$(FILE):
- mkdir -p $(DIR)
- wget $(URL) -O $(FILE)
+ mkdir -p $(DIR)
+ wget $(URL) -O $(FILE)
unpack: $(FILE)
- tar xf $(FILE) -C $(DIR)
+ tar xf $(FILE) -C $(DIR)
configure: unpack
- cd $(SRC)
- ./contrib/download_prerequisites
- mkdir -p $(BUILD)
- cd $(BUILD)
- $(SRC)/configure \
- --prefix=$(OUT) \
- --disable-nls \
- --enable-languages=c,c++
+ cd $(SRC)
+ ./contrib/download_prerequisites
+ mkdir -p $(BUILD)
+ cd $(BUILD)
+ $(SRC)/configure \
+ --prefix=$(OUT) \
+ --disable-nls \
+ --enable-languages=c,c++
build: configure
- cd $(BUILD)
- $(MAKE) -j$(PARALLEL_CORES)
+ cd $(BUILD)
+ $(MAKE) -j$(PARALLEL_CORES)
install: build
- cd $(BUILD)
- $(MAKE) install
+ cd $(BUILD)
+ $(MAKE) install
clean:
- rm -rf $(DIR) $(FILE) $(OUT)
+ rm -rf $(DIR) $(FILE) $(OUT)
diff --git a/toolchain/utils.mk b/toolchain/utils.mk
index db9d0a3..53724e4 100644
--- a/toolchain/utils.mk
+++ b/toolchain/utils.mk
@@ -1,3 +1,21 @@
+#
+# CMOS
+# Copyright (C) 2024 Raghuram Subramani <raghus2247@gmail.com>
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+
add_to_path = $(eval PATH := $1:$(PATH))
current-dir = $(dir $(lastword $(MAKEFILE_LIST)))
all-makefiles-under = $(wildcard $(1)/*/module.mk)