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

pkg/ucglib: clean build system integration

And leave the original repository untouched (except for patches)
This commit is contained in:
Alexandre Abadie 2020-06-12 09:01:59 +02:00
parent ac8e27aab6
commit 0fc0ad7207
No known key found for this signature in database
GPG Key ID: 1C919A403CAE1405
10 changed files with 43 additions and 31 deletions

View File

@ -5,9 +5,11 @@ PKG_LICENSE=BSD-2-Clause
include $(RIOTBASE)/pkg/pkg.mk
all:
cp -u src/Makefile $(PKG_BUILDDIR)/Makefile
cp -u src/csrc/Makefile $(PKG_BUILDDIR)/csrc/Makefile
cp -u src/csrc/ucg_riotos.c $(PKG_BUILDDIR)/csrc/ucg_riotos.c
cp -u src/sys/sdl/dev/Makefile $(PKG_BUILDDIR)/sys/sdl/dev/Makefile
"$(MAKE)" -C $(PKG_BUILDDIR)
.PHONY: ucglib_sdl
all: $(filter ucglib_sdl,$(USEMODULE))
"$(MAKE)" -C $(PKG_BUILDDIR) -f $(CURDIR)/Makefile.ucglib
"$(MAKE)" -C $(PKG_BUILDDIR)/csrc -f $(CURDIR)/Makefile.ucglib_csrc
ucglib_sdl:
"$(MAKE)" -C $(PKG_BUILDDIR)/sys/sdl/dev -f $(CURDIR)/Makefile.ucglib_sdl

2
pkg/ucglib/Makefile.dep Normal file
View File

@ -0,0 +1,2 @@
USEMODULE += ucglib_riot
USEMODULE += ucglib_csrc

View File

@ -2,5 +2,7 @@ INCLUDES += -I$(PKGDIRBASE)/ucglib/csrc
# Link SDL if enabled.
ifneq (,$(filter ucglib_sdl,$(USEMODULE)))
LINKFLAGS += `sdl2-config --libs`
LINKFLAGS += $(shell sdl2-config --libs)
endif
DIRS += $(RIOTBASE)/pkg/ucglib/contrib

View File

@ -0,0 +1,11 @@
MODULE = ucglib_csrc
CFLAGS += -Wno-unused
ifeq (llvm,$(TOOLCHAIN))
CFLAGS += -Wno-misleading-indentation
CFLAGS += -Wno-unused-parameter
CFLAGS += -Wno-newline-eof
endif
include $(RIOTBASE)/Makefile.base

View File

@ -0,0 +1,14 @@
MODULE = ucglib_sdl
# Ignore warnings generated when compiling this module.
CFLAGS += -Wno-empty-translation-unit \
-Wno-newline-eof \
-Wno-unused-parameter \
-Wno-unused \
-Wno-overlength-strings \
-Wno-pointer-arith
# Configure SDL2 CFLAGS
CFLAGS += $(shell sdl2-config --cflags)
include $(RIOTBASE)/Makefile.base

View File

@ -0,0 +1,5 @@
MODULE = ucglib_riot
CFLAGS += -Wno-unused-function
include $(RIOTBASE)/Makefile.base

View File

@ -1,19 +0,0 @@
MODULE = pkg-ucglib
DIRS += csrc
# SDL can be used as a virtual display, but is for native target only.
ifneq (,$(filter ucglib_sdl,$(USEMODULE)))
DIRS += sys/sdl/dev
endif
# Compiling Ucglib will generate a lot of compiler warnings, which are treated
# as errors. For the sake of simplicity, ignore them.
CFLAGS += -Wno-empty-translation-unit \
-Wno-newline-eof \
-Wno-unused-parameter \
-Wno-unused \
-Wno-overlength-strings \
-Wno-pointer-arith
include $(RIOTBASE)/Makefile.base

View File

@ -1,5 +0,0 @@
MODULE = ucglib_sdl
CFLAGS += `sdl2-config --cflags`
include $(RIOTBASE)/Makefile.base