From 6f252ef1c9289ae31be030a35ad2bbc7a283f28c Mon Sep 17 00:00:00 2001 From: NishiOwO Date: Mon, 13 Oct 2025 15:30:52 +0000 Subject: [PATCH] done git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@314 b9cfdab3-6d41-4d17-bbe4-086880011989 --- GNUmakefile | 8 ++++--- README.txt | 61 ++++++++++++++++++++++++++++++++++++++++++++++++- tools/readme.pl | 58 +++++++++++++++++++++++++++++++++++++++++++++- 3 files changed, 122 insertions(+), 5 deletions(-) diff --git a/GNUmakefile b/GNUmakefile index 7162dd5..a98e4bc 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -4,6 +4,8 @@ ifeq ($(TARGET),) TARGET = $(shell uname -s) endif +USE_STB_IMAGE = 1 + CC = $(GCC)gcc CXX = $(GCC)g++ @@ -131,10 +133,10 @@ EXEC = SHARED = -dynamiclib endif -ifeq ($(NO_STB_IMAGE),1) -include external/deps.mk -else +ifeq ($(USE_STB_IMAGE),1) L_CFLAGS += -DUSE_STB_IMAGE +else +include external/deps.mk endif EXAMPLES = examples/example$(EXEC) examples/rotate$(EXEC) examples/image$(EXEC) examples/scrollbar$(EXEC) examples/checkbox$(EXEC) examples/messagebox$(EXEC) examples/viewport$(EXEC) diff --git a/README.txt b/README.txt index ed57128..721cb76 100644 --- a/README.txt +++ b/README.txt @@ -22,7 +22,7 @@ the Unix-like environment with X11 for runtime. Contents - At the top level of this hierarchy there are directories: + At the top level of this hierarchy there are seven directories: src - Contains the source for Milsko library @@ -41,5 +41,64 @@ the Unix-like environment with X11 for runtime. Building Milsko + Building Milsko depends on the platform you use, and the compiler you use. + +A. Visual C++ +------------- + +1) Run `nmake -f NTMakefile'. + +B. Borland C++ +-------------- + +1) Run `make -f BorMakefile'. + +C. Open Watcom +-------------- + +1) Run `wmake -f WatMakefile'. + +D. MinGW-w64/GCC/Clang +---------------------- + +1) Determine if you need Vulkan and/or OpenGL. + +2) Run `make'. + + + Makefile settings + + This section exists for people who chose D. + + TARGET - Target environment, chosen by Makefile in + default settings. + + GCC - Prefix for GCC toolchains. This does not + matter if you set CC/CXX manually. + + CC - C compiler. + + CXX - C++ compiler. + + DEBUG - Debug build or not, 0 in default settings. + + VULKAN - Build Vulkan widget or not. + + OPENGL - Build OpenGL widget or not. + + USE_STB_IMAGE - Use stb_image or not. + + + Makefile targets + + This section exists for people who chose D. + + lib - Builds Milsko library + + oolib - Builds OO binding + + examples - Builds examples + + all - Builds lib and examples -- Nishi (nishi@nishi.boats) diff --git a/tools/readme.pl b/tools/readme.pl index 48d221b..bc680ad 100755 --- a/tools/readme.pl +++ b/tools/readme.pl @@ -31,6 +31,14 @@ sub c { print(OUT (" " x (($WIDTH - $len) / 2)) . "$msg\n"); } +sub h { + my ($msg) = @_; + print(OUT "\n"); + print(OUT "$msg\n"); + print(OUT ("-" x length($msg)) . "\n"); + print(OUT "\n"); +} + open(OUT, ">", "README.txt"); l(""); @@ -77,7 +85,55 @@ l(""); l(""); c("Building Milsko"); l(""); -l("TODO: Write here"); +l(" Building Milsko depends on the platform you use, and the compiler you use."); +h("A. Visual C++"); +l("1) Run `nmake -f NTMakefile'."); +h("B. Borland C++"); +l("1) Run `make -f BorMakefile'."); +h("C. Open Watcom"); +l("1) Run `wmake -f WatMakefile'."); +h("D. MinGW-w64/GCC/Clang"); +l("1) Determine if you need Vulkan and/or OpenGL."); +l(""); +l("2) Run `make'."); +l(""); + +l(""); +c("Makefile settings"); +l(""); +c("This section exists for people who chose D.", 60); +l(""); +c("TARGET - Target environment, chosen by Makefile in", 60); +c(" default settings.", 60); +l(""); +c("GCC - Prefix for GCC toolchains. This does not", 60); +c(" matter if you set CC/CXX manually.", 60); +l(""); +c("CC - C compiler.", 60); +l(""); +c("CXX - C++ compiler.", 60); +l(""); +c("DEBUG - Debug build or not, 0 in default settings.", 60); +l(""); +c("VULKAN - Build Vulkan widget or not.", 60); +l(""); +c("OPENGL - Build OpenGL widget or not.", 60); +l(""); +c("USE_STB_IMAGE - Use stb_image or not.", 60); +l(""); + +l(""); +c("Makefile targets"); +l(""); +c("This section exists for people who chose D.", 60); +l(""); +c("lib - Builds Milsko library", 60); +l(""); +c("oolib - Builds OO binding", 60); +l(""); +c("examples - Builds examples", 60); +l(""); +c("all - Builds lib and examples", 60); l(""); l(" -- Nishi (nishi\@nishi.boats)");