diff --git a/LICENSE b/LICENSE index 005bb78..1358df1 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,7 @@ MIT License -Copyright (c) 2021 Thakee Nathees +Copyright (c) 2020-2022 Thakee Nathees +Copyright (c) 2021-2022 Pocketlang Contributors Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index 3dcdea9..349029c 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@

- +

**Pocketlang** is a small (~3000 semicolons) and [fast](https://github.com/ThakeeNathees/pocketlang#performance) @@ -79,10 +79,8 @@ cl /Fepocket cli/*.c src/*.c /Isrc/include && rm *.obj ``` make ``` -To run make file on windows with `mingw`, you require `make` and `find` unix tools in your path. -Which you can get from [msys2](https://www.msys2.org/) or [cygwin](https://www.cygwin.com/). Run -`set PATH=;%PATH% && make`, this will override the system `find` command with -unix `find` for the current session, and run the `make` script. +To run the make file on windows with `mingw`, you require the GNU `make` tool which you can get +from [msys2](https://www.msys2.org/) or [cygwin](https://www.cygwin.com/). #### Windows batch script ``` diff --git a/build.bat b/build.bat index d55854c..ec233e6 100644 --- a/build.bat +++ b/build.bat @@ -20,17 +20,21 @@ shift shift :PARSE_ARGS -if (%1)==(-clean) goto :CLEAN +if (%1)==(-h) goto :PRINT_USAGE +if (%1)==(-c) goto :CLEAN if (%1)==(-r) set debug_build=false&& goto :SHIFT_ARG_1 if (%1)==(-s) set shared_lib=true&& goto :SHIFT_ARG_1 if (%1)==() goto :CHECK_MSVC +echo Invalid argument "%1" + :PRINT_USAGE echo Usage: call build.bat [options ...] echo options: -echo -r Compile the release version of pocketlang (default = debug) -echo -s Link the pocket as shared library (default = static link). -echo -clean Clean all compiled/generated intermediate binary. +echo -h display this message +echo -r Compile the release version of pocketlang (default = debug) +echo -s Link the pocket as shared library (default = static link). +echo -c Clean all compiled/generated intermediate binary. goto :END :: ---------------------------------------------------------------------------- @@ -89,6 +93,12 @@ set addnl_cdefines=/D_CRT_SECURE_NO_WARNINGS set root_dir=..\..\..\ if "%debug_build%"=="false" ( + + :: Not sure why, but the release build are much slower with this script. + :: I might have to double check the compilation flags. + echo TODO: This Batch script doesn't support release builds for now + exit /b 1 + set cflags=%cflags% -O2 -MD set target_dir=build\release\ ) else ( @@ -152,8 +162,8 @@ goto :SUCCESS :CLEAN -if exist "debug" rmdir /S /Q "debug" -if exist "release" rmdir /S /Q "release" +if exist "build/debug" rmdir /S /Q "build/debug" +if exist "build/release" rmdir /S /Q "build/release" echo. echo Files were cleaned. diff --git a/cli/common.h b/cli/common.h index a8bfdf9..0ac1614 100644 --- a/cli/common.h +++ b/cli/common.h @@ -1,5 +1,6 @@ /* - * Copyright (c) 2020-2021 Thakee Nathees + * Copyright (c) 2020-2022 Thakee Nathees + * Copyright (c) 2021-2022 Pocketlang Contributors * Distributed Under The MIT License */ diff --git a/cli/internal.h b/cli/internal.h index ab57167..bb586c1 100644 --- a/cli/internal.h +++ b/cli/internal.h @@ -1,5 +1,6 @@ /* - * Copyright (c) 2020-2021 Thakee Nathees + * Copyright (c) 2020-2022 Thakee Nathees + * Copyright (c) 2021-2022 Pocketlang Contributors * Distributed Under The MIT License */ diff --git a/cli/main.c b/cli/main.c index 67e7a6b..827f368 100644 --- a/cli/main.c +++ b/cli/main.c @@ -1,5 +1,6 @@ /* - * Copyright (c) 2020-2021 Thakee Nathees + * Copyright (c) 2020-2022 Thakee Nathees + * Copyright (c) 2021-2022 Pocketlang Contributors * Distributed Under The MIT License */ diff --git a/cli/modules.c b/cli/modules.c index ed735a9..3159a77 100644 --- a/cli/modules.c +++ b/cli/modules.c @@ -1,5 +1,6 @@ /* - * Copyright (c) 2021 Thakee Nathees + * Copyright (c) 2020-2022 Thakee Nathees + * Copyright (c) 2021-2022 Pocketlang Contributors * Distributed Under The MIT License */ diff --git a/cli/modules.h b/cli/modules.h index 403208e..930dd63 100644 --- a/cli/modules.h +++ b/cli/modules.h @@ -1,5 +1,6 @@ /* - * Copyright (c) 2021 Thakee Nathees + * Copyright (c) 2020-2022 Thakee Nathees + * Copyright (c) 2021-2022 Pocketlang Contributors * Distributed Under The MIT License */ diff --git a/cli/repl.c b/cli/repl.c index 4efec16..09bdc60 100644 --- a/cli/repl.c +++ b/cli/repl.c @@ -1,5 +1,6 @@ /* - * Copyright (c) 2020-2021 Thakee Nathees + * Copyright (c) 2020-2022 Thakee Nathees + * Copyright (c) 2021-2022 Pocketlang Contributors * Distributed Under The MIT License */ diff --git a/cli/thirdparty.c b/cli/thirdparty.c index 36d87ea..2f32f99 100644 --- a/cli/thirdparty.c +++ b/cli/thirdparty.c @@ -1,5 +1,6 @@ /* - * Copyright (c) 2020-2021 Thakee Nathees + * Copyright (c) 2020-2022 Thakee Nathees + * Copyright (c) 2021-2022 Pocketlang Contributors * Distributed Under The MIT License */ diff --git a/cli/utils.c b/cli/utils.c index 1c9bd04..08be3fa 100644 --- a/cli/utils.c +++ b/cli/utils.c @@ -1,5 +1,6 @@ /* - * Copyright (c) 2020-2021 Thakee Nathees + * Copyright (c) 2020-2022 Thakee Nathees + * Copyright (c) 2021-2022 Pocketlang Contributors * Distributed Under The MIT License */ diff --git a/cli/utils.h b/cli/utils.h index ad81bf4..954bd71 100644 --- a/cli/utils.h +++ b/cli/utils.h @@ -1,5 +1,6 @@ /* - * Copyright (c) 2020-2021 Thakee Nathees + * Copyright (c) 2020-2022 Thakee Nathees + * Copyright (c) 2021-2022 Pocketlang Contributors * Distributed Under The MIT License */ diff --git a/src/include/pocketlang.h b/src/include/pocketlang.h index ae717bb..e4f0010 100644 --- a/src/include/pocketlang.h +++ b/src/include/pocketlang.h @@ -1,5 +1,6 @@ /* - * Copyright (c) 2020-2021 Thakee Nathees + * Copyright (c) 2020-2022 Thakee Nathees + * Copyright (c) 2021-2022 Pocketlang Contributors * Distributed Under The MIT License */ diff --git a/src/pk_buffers.h b/src/pk_buffers.h index dbde935..3967268 100644 --- a/src/pk_buffers.h +++ b/src/pk_buffers.h @@ -1,5 +1,6 @@ /* - * Copyright (c) 2020-2021 Thakee Nathees + * Copyright (c) 2020-2022 Thakee Nathees + * Copyright (c) 2021-2022 Pocketlang Contributors * Distributed Under The MIT License */ diff --git a/src/pk_common.h b/src/pk_common.h index a8bfdf9..0ac1614 100644 --- a/src/pk_common.h +++ b/src/pk_common.h @@ -1,5 +1,6 @@ /* - * Copyright (c) 2020-2021 Thakee Nathees + * Copyright (c) 2020-2022 Thakee Nathees + * Copyright (c) 2021-2022 Pocketlang Contributors * Distributed Under The MIT License */ diff --git a/src/pk_compiler.c b/src/pk_compiler.c index ceecb99..f60d8a5 100644 --- a/src/pk_compiler.c +++ b/src/pk_compiler.c @@ -1,5 +1,6 @@ /* - * Copyright (c) 2020-2021 Thakee Nathees + * Copyright (c) 2020-2022 Thakee Nathees + * Copyright (c) 2021-2022 Pocketlang Contributors * Distributed Under The MIT License */ diff --git a/src/pk_compiler.h b/src/pk_compiler.h index 9531e95..f64cfa2 100644 --- a/src/pk_compiler.h +++ b/src/pk_compiler.h @@ -1,5 +1,6 @@ /* - * Copyright (c) 2020-2021 Thakee Nathees + * Copyright (c) 2020-2022 Thakee Nathees + * Copyright (c) 2021-2022 Pocketlang Contributors * Distributed Under The MIT License */ diff --git a/src/pk_core.c b/src/pk_core.c index 6264ee3..9b4238b 100644 --- a/src/pk_core.c +++ b/src/pk_core.c @@ -1,5 +1,6 @@ /* - * Copyright (c) 2020-2021 Thakee Nathees + * Copyright (c) 2020-2022 Thakee Nathees + * Copyright (c) 2021-2022 Pocketlang Contributors * Distributed Under The MIT License */ diff --git a/src/pk_core.h b/src/pk_core.h index 0cebbeb..b70dead 100644 --- a/src/pk_core.h +++ b/src/pk_core.h @@ -1,5 +1,6 @@ /* - * Copyright (c) 2020-2021 Thakee Nathees + * Copyright (c) 2020-2022 Thakee Nathees + * Copyright (c) 2021-2022 Pocketlang Contributors * Distributed Under The MIT License */ diff --git a/src/pk_debug.c b/src/pk_debug.c index 816a8c7..f1877f5 100644 --- a/src/pk_debug.c +++ b/src/pk_debug.c @@ -1,5 +1,6 @@ /* - * Copyright (c) 2020-2021 Thakee Nathees + * Copyright (c) 2020-2022 Thakee Nathees + * Copyright (c) 2021-2022 Pocketlang Contributors * Distributed Under The MIT License */ diff --git a/src/pk_debug.h b/src/pk_debug.h index 9f39049..a7abf48 100644 --- a/src/pk_debug.h +++ b/src/pk_debug.h @@ -1,5 +1,6 @@ /* - * Copyright (c) 2020-2021 Thakee Nathees + * Copyright (c) 2020-2022 Thakee Nathees + * Copyright (c) 2021-2022 Pocketlang Contributors * Distributed Under The MIT License */ diff --git a/src/pk_internal.h b/src/pk_internal.h index dceafe9..0bd7ca2 100644 --- a/src/pk_internal.h +++ b/src/pk_internal.h @@ -1,5 +1,6 @@ /* - * Copyright (c) 2020-2021 Thakee Nathees + * Copyright (c) 2020-2022 Thakee Nathees + * Copyright (c) 2021-2022 Pocketlang Contributors * Distributed Under The MIT License */ diff --git a/src/pk_opcodes.h b/src/pk_opcodes.h index 6d95258..488e1e0 100644 --- a/src/pk_opcodes.h +++ b/src/pk_opcodes.h @@ -1,5 +1,6 @@ /* - * Copyright (c) 2020-2021 Thakee Nathees + * Copyright (c) 2020-2022 Thakee Nathees + * Copyright (c) 2021-2022 Pocketlang Contributors * Distributed Under The MIT License */ diff --git a/src/pk_utils.c b/src/pk_utils.c index 66d7a3a..1e08c18 100644 --- a/src/pk_utils.c +++ b/src/pk_utils.c @@ -1,5 +1,6 @@ /* - * Copyright (c) 2020-2021 Thakee Nathees + * Copyright (c) 2020-2022 Thakee Nathees + * Copyright (c) 2021-2022 Pocketlang Contributors * Distributed Under The MIT License */ diff --git a/src/pk_utils.h b/src/pk_utils.h index df091e8..0c2d73b 100644 --- a/src/pk_utils.h +++ b/src/pk_utils.h @@ -1,5 +1,6 @@ /* - * Copyright (c) 2020-2021 Thakee Nathees + * Copyright (c) 2020-2022 Thakee Nathees + * Copyright (c) 2021-2022 Pocketlang Contributors * Distributed Under The MIT License */ diff --git a/src/pk_var.c b/src/pk_var.c index 90d6705..634fdad 100644 --- a/src/pk_var.c +++ b/src/pk_var.c @@ -1,5 +1,6 @@ /* - * Copyright (c) 2020-2021 Thakee Nathees + * Copyright (c) 2020-2022 Thakee Nathees + * Copyright (c) 2021-2022 Pocketlang Contributors * Distributed Under The MIT License */ diff --git a/src/pk_var.h b/src/pk_var.h index 0ab1164..61dab54 100644 --- a/src/pk_var.h +++ b/src/pk_var.h @@ -1,5 +1,6 @@ /* - * Copyright (c) 2020-2021 Thakee Nathees + * Copyright (c) 2020-2022 Thakee Nathees + * Copyright (c) 2021-2022 Pocketlang Contributors * Distributed Under The MIT License */ diff --git a/src/pk_vm.c b/src/pk_vm.c index 381a97d..d33dabe 100644 --- a/src/pk_vm.c +++ b/src/pk_vm.c @@ -1,5 +1,6 @@ /* - * Copyright (c) 2020-2021 Thakee Nathees + * Copyright (c) 2020-2022 Thakee Nathees + * Copyright (c) 2021-2022 Pocketlang Contributors * Distributed Under The MIT License */ diff --git a/src/pk_vm.h b/src/pk_vm.h index 1214472..e002f70 100644 --- a/src/pk_vm.h +++ b/src/pk_vm.h @@ -1,5 +1,6 @@ /* - * Copyright (c) 2021 Thakee Nathees + * Copyright (c) 2020-2022 Thakee Nathees + * Copyright (c) 2021-2022 Pocketlang Contributors * Distributed Under The MIT License */