From 77cf804ed2d20f24ae2718f1f5e4d27c972e03e2 Mon Sep 17 00:00:00 2001 From: Jonas 'Sortie' Termansen Date: Sat, 4 Oct 2014 17:34:51 +0200 Subject: [PATCH] Move init to its own directory. --- Makefile | 1 + init/.gitignore | 2 ++ init/Makefile | 32 ++++++++++++++++++++++++++++++++ utils/init.cpp => init/init.c++ | 4 ++-- utils/.gitignore | 1 - utils/Makefile | 1 - 6 files changed, 37 insertions(+), 4 deletions(-) create mode 100644 init/.gitignore create mode 100644 init/Makefile rename utils/init.cpp => init/init.c++ (99%) diff --git a/Makefile b/Makefile index 9195e3da..98dba7db 100644 --- a/Makefile +++ b/Makefile @@ -14,6 +14,7 @@ carray \ editor \ ext \ games \ +init \ mbr \ mkinitrd \ regress \ diff --git a/init/.gitignore b/init/.gitignore new file mode 100644 index 00000000..be9f2b05 --- /dev/null +++ b/init/.gitignore @@ -0,0 +1,2 @@ +init +*.o diff --git a/init/Makefile b/init/Makefile new file mode 100644 index 00000000..d0ace7c3 --- /dev/null +++ b/init/Makefile @@ -0,0 +1,32 @@ +include ../build-aux/platform.mak +include ../build-aux/compiler.mak +include ../build-aux/version.mak +include ../build-aux/dirs.mak + +OPTLEVEL?=$(DEFAULT_OPTLEVEL) +CXXFLAGS?=$(OPTLEVEL) + +CPPFLAGS:=$(CPPFLAGS) -DVERSIONSTR=\"$(VERSION)\" +CXXFLAGS:=$(CXXFLAGS) -Wall -Wextra -fno-exceptions -fno-rtti + +BINARY=init + +OBJS=\ +init.o \ + +all: $(BINARY) + +.PHONY: all install clean + +$(BINARY): $(OBJS) + $(CXX) $(OBJS) -o $(BINARY) $(CXXFLAGS) $(LIBS) + +%.o: %.c++ + $(CXX) -std=gnu++11 $(CPPFLAGS) $(CXXFLAGS) -c $< -o $@ + +install: all + mkdir -p $(DESTDIR)$(BINDIR) + install $(BINARY) $(DESTDIR)$(BINDIR) + +clean: + rm -f $(BINARY) $(OBJS) *.o diff --git a/utils/init.cpp b/init/init.c++ similarity index 99% rename from utils/init.cpp rename to init/init.c++ index 3fc01e68..33cdd175 100644 --- a/utils/init.cpp +++ b/init/init.c++ @@ -1,6 +1,6 @@ /******************************************************************************* - Copyright(C) Jonas 'Sortie' Termansen 2011, 2012, 2013. + Copyright(C) Jonas 'Sortie' Termansen 2011, 2012, 2013, 2014. 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 @@ -15,7 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . - init.cpp + init.c++ Initializes the system by setting up the terminal and starting the shell. *******************************************************************************/ diff --git a/utils/.gitignore b/utils/.gitignore index 3517a8ac..c9c60db9 100644 --- a/utils/.gitignore +++ b/utils/.gitignore @@ -19,7 +19,6 @@ false find head help -init kernelinfo kill ln diff --git a/utils/Makefile b/utils/Makefile index 8c3c2920..0bb4e102 100644 --- a/utils/Makefile +++ b/utils/Makefile @@ -31,7 +31,6 @@ false \ find \ head \ help \ -init \ kernelinfo \ kill \ ln \