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 \