From 744d1873856f55920aac96d207f8c170610de500 Mon Sep 17 00:00:00 2001 From: Alexey Gavrilov Date: Sun, 31 Mar 2024 15:37:18 +0700 Subject: Makefile updates --- README.md | 15 ++++++++++----- makefile | 2 +- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index f2b6536..c46e5fc 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -## Object Operating System +## Objective Operating System ## Install dependencies @@ -20,8 +20,8 @@ These variables may pass through *make* command `make *variables* *rule*`, or us #### Variables -1. DEBUG. Takes a boolean value (true or false). Responsible for the debug version of the project to test it via GDB. -2. LIBS_PATH. Takes the path to the required (gcc and stdc++) libraries. +1. DEBUG. Not takes value. If defineв, the debug version of the project will be build, otherwise the release version. Responsible for the debug version of the project to test OS via GDB. +2. LIBS_PATH. Takes the path to the required libraries. Now gcc library is required, supplied with the compiled. #### Ubuntu @@ -32,7 +32,12 @@ make all Build and run debug version ```sh -make DEBUG=true all +make DEBUG=* all +``` +or +```sh +export DEBUG=* +make all ``` ## Docs @@ -41,7 +46,7 @@ make DEBUG=true all - [The GNU GRUB manual][2] - [Executable and linkable format ELF][3] - [NASM documentation][4] -- [Article where creating a simple OS][5] +- [Article about creatiing a simple OS][5] - [Multiboot specification][6] - [GCC compiler documentation][7] - [Using NASM in a Hello World kernel][8] diff --git a/makefile b/makefile index ef46637..439c42e 100644 --- a/makefile +++ b/makefile @@ -14,7 +14,7 @@ SOURCE_FILES = $(CFILES) $(AFILES) OBJ_FILES = $(addprefix $(BDIR)/, $(addsuffix .o, $(basename $(SOURCE_FILES)))) INCLUDE = ./include -ifeq ($(DEBUG), true) +ifdef DEBUG CFLAGS := -g3 $(CFLAGS) AFLAGS := -g $(AFLAGS) QEMUFLAGS := -s -S $(QEMUFLAGS) -- cgit v1.2.3