1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

pkg: Initial introduction of ubasic package

This commit is contained in:
Martine Lenders 2019-04-01 09:00:55 +02:00 committed by Martine Lenders
parent b5aaa6186f
commit 8543129ba9
5 changed files with 51 additions and 0 deletions

21
pkg/ubasic/Makefile Normal file
View File

@ -0,0 +1,21 @@
PKG_NAME=ubasic
PKG_URL=https://github.com/adamdunkels/ubasic
PKG_VERSION=cc07193c231e21ecb418335aba5b199a08d4685c
PKG_LICENSE=BSD-3-Clause
UBASIC_MODULES = ubasic_tests
UBASIC_USEMODULE = $(filter $(UBASIC_MODULES),$(USEMODULE))
.PHONY: all ubasic ubasic%
all: git-download ubasic
make_module = "$(MAKE)" -f $(RIOTPKG)/ubasic/$(1).mk -C $(2)
ubasic: $(UBASIC_USEMODULE)
$(call make_module,$@,$(PKG_BUILDDIR))
ubasic%:
$(call make_module,$@,$(PKG_BUILDDIR))
include $(RIOTBASE)/pkg/pkg.mk

View File

@ -0,0 +1 @@
INCLUDES += -I$(PKGDIRBASE)/ubasic

6
pkg/ubasic/doc.txt Normal file
View File

@ -0,0 +1,6 @@
/**
* @defgroup pkg_ubasic uBASIC interpreter
* @ingroup pkg
* @brief A really tiny BASIC interpreter
* @see http://dunkels.com/adam/ubasic/
*/

10
pkg/ubasic/ubasic.mk Normal file
View File

@ -0,0 +1,10 @@
MODULE = ubasic
# some toolchains complain about the usage of isdigit with a pointer in the
# tokenizer
CFLAGS += -Wno-char-subscripts
SRC := tokenizer.c ubasic.c
NO_AUTO_SRC := 1
include $(RIOTBASE)/Makefile.base

View File

@ -0,0 +1,13 @@
MODULE = ubasic_tests
# tests.c has constants that may overflow on <32 bit platforms
CFLAGS += -Wno-overflow
# ubasic_init_peek_poke used in those tests is not exposed
CFLAGS += -Wno-implicit-function-declaration
# LLVM doesn't like ubasic_init_peek_poke due to strict prototyping either
CFLAGS += -Wno-strict-prototypes
SRC := tests.c
NO_AUTO_SRC := 1
include $(RIOTBASE)/Makefile.base