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:
parent
ac8e27aab6
commit
0fc0ad7207
@ -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
2
pkg/ucglib/Makefile.dep
Normal file
@ -0,0 +1,2 @@
|
||||
USEMODULE += ucglib_riot
|
||||
USEMODULE += ucglib_csrc
|
@ -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
|
||||
|
11
pkg/ucglib/Makefile.ucglib_csrc
Normal file
11
pkg/ucglib/Makefile.ucglib_csrc
Normal 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
|
14
pkg/ucglib/Makefile.ucglib_sdl
Normal file
14
pkg/ucglib/Makefile.ucglib_sdl
Normal 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
|
5
pkg/ucglib/contrib/Makefile
Normal file
5
pkg/ucglib/contrib/Makefile
Normal file
@ -0,0 +1,5 @@
|
||||
MODULE = ucglib_riot
|
||||
|
||||
CFLAGS += -Wno-unused-function
|
||||
|
||||
include $(RIOTBASE)/Makefile.base
|
@ -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
|
@ -1,5 +0,0 @@
|
||||
MODULE = ucglib_sdl
|
||||
|
||||
CFLAGS += `sdl2-config --cflags`
|
||||
|
||||
include $(RIOTBASE)/Makefile.base
|
Loading…
Reference in New Issue
Block a user