mirror of
https://github.com/Rockbox/rockbox.git
synced 2026-01-22 01:30:35 -05:00
firmware: add build rules for RegGen-generated headers
Change-Id: I86ff1a39aec1ee428abd6464483ae3732fdf9196
This commit is contained in:
parent
a8d792c248
commit
44afcc8cbe
4 changed files with 35 additions and 0 deletions
|
|
@ -14,6 +14,9 @@ INCLUDES += -I$(FIRMDIR)/libc/include
|
||||||
endif
|
endif
|
||||||
|
|
||||||
include $(FIRMDIR)/asm/asm.make
|
include $(FIRMDIR)/asm/asm.make
|
||||||
|
ifneq ($(filter reggen,$(TOOLSET)),)
|
||||||
|
include $(FIRMDIR)/reggen/reggen.make
|
||||||
|
endif
|
||||||
|
|
||||||
FIRMLIB_SRC += $(call preprocess, $(FIRMDIR)/SOURCES)
|
FIRMLIB_SRC += $(call preprocess, $(FIRMDIR)/SOURCES)
|
||||||
FIRMLIB_OBJ := $(call c2obj, $(FIRMLIB_SRC))
|
FIRMLIB_OBJ := $(call c2obj, $(FIRMLIB_SRC))
|
||||||
|
|
|
||||||
1
firmware/reggen/SOURCES
Normal file
1
firmware/reggen/SOURCES
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
// Intentionally empty file.
|
||||||
27
firmware/reggen/reggen.make
Normal file
27
firmware/reggen/reggen.make
Normal file
|
|
@ -0,0 +1,27 @@
|
||||||
|
# __________ __ ___.
|
||||||
|
# Open \______ \ ____ ____ | | _\_ |__ _______ ___
|
||||||
|
# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
|
||||||
|
# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
||||||
|
# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
||||||
|
# \/ \/ \/ \/ \/
|
||||||
|
# $Id$
|
||||||
|
#
|
||||||
|
|
||||||
|
REGGEN_SRC := $(call preprocess, $(FIRMDIR)/reggen/SOURCES)
|
||||||
|
|
||||||
|
REGGEN_STAMP := $(foreach regs,$(REGGEN_SRC),$(notdir $(regs)))
|
||||||
|
REGGEN_STAMP := $(patsubst %.regs,$(BUILDDIR)/regs/%/_stamp,$(REGGEN_STAMP))
|
||||||
|
|
||||||
|
$(BUILDDIR)/regs/%/_stamp: $(FIRMDIR)/reggen/%.regs $(TOOLSDIR)/reggen
|
||||||
|
$(SILENT)rm -rf $(@D)
|
||||||
|
$(SILENT)mkdir -p $(@D)
|
||||||
|
$(call PRINTS,REGGEN $(subst $(ROOTDIR)/,,$<))$(TOOLSDIR)/reggen $< -rh reggen.h -ig $(subst -,_,$*) -o $(@D)
|
||||||
|
$(SILENT)touch $@
|
||||||
|
|
||||||
|
# 'touch' header to propagate dependency on reggen.h through to
|
||||||
|
# users of the generated headers. Might be a better way to do
|
||||||
|
# this, but this seems to be adequate.
|
||||||
|
$(BUILDDIR)/regs/%.h: $(REGGEN_STAMP) $(FIRMDIR)/export/reggen.h
|
||||||
|
$(SILENT)touch $@
|
||||||
|
|
||||||
|
CLEANOBJS += $(BUILDDIR)/regs
|
||||||
|
|
@ -41,6 +41,10 @@ $(TOOLSDIR)/convttf: $(TOOLSDIR)/convttf.c
|
||||||
$(SILENT)$(HOSTCC) $(TOOLSFLAGS) -lm -O2 -Wall -g $+ -o $@ \
|
$(SILENT)$(HOSTCC) $(TOOLSFLAGS) -lm -O2 -Wall -g $+ -o $@ \
|
||||||
`pkg-config --cflags --libs freetype2`
|
`pkg-config --cflags --libs freetype2`
|
||||||
|
|
||||||
|
$(TOOLSDIR)/reggen: $(wildcard $(TOOLSDIR)/reggen_src/*.c)
|
||||||
|
$(call PRINTS,CC $(@F))
|
||||||
|
$(SILENT)$(HOSTCC) $(TOOLSFLAGS) -Wall -Wextra -O2 -g -o $@ $+
|
||||||
|
|
||||||
# implicit rule for simple tools
|
# implicit rule for simple tools
|
||||||
$(TOOLSDIR)/%: $(TOOLSDIR)/%.c
|
$(TOOLSDIR)/%: $(TOOLSDIR)/%.c
|
||||||
$(call PRINTS,CC $(subst $(ROOTDIR)/,,$@))
|
$(call PRINTS,CC $(subst $(ROOTDIR)/,,$@))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue