Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pkg/ucglib: improve build system integration #14273

Merged
merged 1 commit into from
Jun 16, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions pkg/ucglib/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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 changes: 2 additions & 0 deletions pkg/ucglib/Makefile.dep
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
USEMODULE += ucglib_riot
USEMODULE += ucglib_csrc
4 changes: 3 additions & 1 deletion pkg/ucglib/Makefile.include
Original file line number Diff line number Diff line change
Expand Up @@ -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
File renamed without changes.
11 changes: 11 additions & 0 deletions pkg/ucglib/Makefile.ucglib_csrc
Original file line number Diff line number Diff line change
@@ -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
14 changes: 14 additions & 0 deletions pkg/ucglib/Makefile.ucglib_sdl
Original file line number Diff line number Diff line change
@@ -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
5 changes: 5 additions & 0 deletions pkg/ucglib/contrib/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
MODULE = ucglib_riot

CFLAGS += -Wno-unused-function

include $(RIOTBASE)/Makefile.base
File renamed without changes.
19 changes: 0 additions & 19 deletions pkg/ucglib/src/Makefile

This file was deleted.

5 changes: 0 additions & 5 deletions pkg/ucglib/src/sys/sdl/dev/Makefile

This file was deleted.