diff options
author | Danny Holman <dholman@gymli.org> | 2025-08-28 08:36:42 -0500 |
---|---|---|
committer | Danny Holman <dholman@gymli.org> | 2025-08-28 08:36:42 -0500 |
commit | a3085f5b9309c659c58282b4e50d955dcb0c0b7f (patch) | |
tree | 0b41f921d7d4e40b96392149be291542648e1f68 /Makefile | |
parent | bootstrap: create build files (diff) | |
download | box-master.tar.gz box-master.tar.zst box-master.zip |
Update the build configuration files for the included bootloader to
match the formatting requirements of the main build configs.
Signed-off-by: Danny Holman <dholman@gymli.org>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 77 |
1 files changed, 22 insertions, 55 deletions
@@ -1,69 +1,36 @@ +# Copyright (C) 2025 Danny Holman <dholman@gymli.org> +# +# This file is part of BoxOS, a free and open-source Unix-like operating +# system. +# +# BoxOS is free software; you can redistribute it and/or modify under the +# terms of the GNU General Public License as published by the Free Software +# Foundation; either version 2 of the License, or (at your option) any later +# version. +# +# BoxOS is distributed in the hope 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 +# BoxOS; if not, see <https://www.gnu.org/licenses/>. + VERSION:=$(shell git describe --abbrev=4 --dirty --always --tags) ROOTDIR:=$(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))/ -SYS_INCLUDE:=-I$(ROOTDIR)include + include build.conf -export ARCH VERSION ROOTDIR DESTDIR SYS_INCLUDE CC LD +VERSION:=$(addsuffix $(LOCAL_VER), $(VERSION)) +export VERSION ROOTDIR DESTDIR SUBDIRS:=bootstrap \ - kernel \ -.PHONY: all clean modules install install-headers $(SUBDIRS) +.PHONY: all clean install $(SUBDIRS) all: $(SUBDIRS) -subdirs: $(SUBDIRS) - $(SUBDIRS): $(MAKE) -j $(JOBS) $(MAKECMDGOALS) -C $@ clean: $(SUBDIRS) - $(RM) -r $(DESTDIR) $(DESTDIR).tar.zst - -create-basedir: - install -d -m 0755 $(DESTDIR) - install -d -m 0755 $(DESTDIR)/bin - install -d -m 0755 $(DESTDIR)/boot - install -d -m 0755 $(DESTDIR)/etc - install -d -m 0755 $(DESTDIR)/home - install -d -m 0755 $(DESTDIR)/lib - install -d -m 0755 $(DESTDIR)/mnt - install -d -m 0755 $(DESTDIR)/opt - install -d -m 0755 $(DESTDIR)/proc - install -d -m 0755 $(DESTDIR)/root - install -d -m 0755 $(DESTDIR)/sbin - install -d -m 0755 $(DESTDIR)/tmp - install -d -m 0755 $(DESTDIR)/usr - install -d -m 0755 $(DESTDIR)/usr/bin - install -d -m 0755 $(DESTDIR)/usr/include - install -d -m 0755 $(DESTDIR)/usr/lib - install -d -m 0755 $(DESTDIR)/usr/local - install -d -m 0755 $(DESTDIR)/usr/local/bin - install -d -m 0755 $(DESTDIR)/usr/local/include - install -d -m 0755 $(DESTDIR)/usr/local/man - install -d -m 0755 $(DESTDIR)/usr/local/sbin - install -d -m 0755 $(DESTDIR)/usr/local/share - install -d -m 0755 $(DESTDIR)/usr/local/src - install -d -m 0755 $(DESTDIR)/usr/sbin - install -d -m 0755 $(DESTDIR)/usr/share - install -d -m 0755 $(DESTDIR)/usr/src - install -d -m 0755 $(DESTDIR)/var - install -d -m 0755 $(DESTDIR)/var/cache - install -d -m 0755 $(DESTDIR)/var/lib - install -d -m 0755 $(DESTDIR)/var/lock - install -d -m 0755 $(DESTDIR)/var/log - install -d -m 0755 $(DESTDIR)/var/run - install -d -m 0755 $(DESTDIR)/var/tmp - -install: create-basedir subdirs - cp -R etc/* $(DESTDIR)/etc - cp -R usr.share/* $(DESTDIR)/usr/share - tar -cvf $(DESTDIR).tar $(DESTDIR) - zstd $(DESTDIR).tar - $(RM) -r $(DESTDIR) $(DESTDIR).tar - -install-headers: subdirs - cp -R include/* $(DESTDIR)/usr/include - -install-kernel: subdirs -install-modules: subdirs +install: $(SUBDIRS) |