mirror of
git://projects.qi-hardware.com/ben-wpan.git
synced 2024-11-22 19:20:41 +02:00
Generate port, bit, and output mode definitions from io.h
- fw/common/Makefile: generate related definitions from io.h (from IBDG) - fw/Makefile: build the various firmware elements (from IDBG, without the target parts)
This commit is contained in:
parent
57f34270fb
commit
f8cd15e84d
36
fw/Makefile
Normal file
36
fw/Makefile
Normal file
@ -0,0 +1,36 @@
|
||||
#
|
||||
# fw/Makefile - ATSPI firmware build
|
||||
#
|
||||
# Written 2008-2010 by Werner Almesberger
|
||||
# Copyright 2008-2010 Werner Almesberger
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
|
||||
|
||||
DIRS=common boot atspi
|
||||
|
||||
|
||||
.PHONY: all depend install uninstall clean spotless
|
||||
|
||||
all:
|
||||
for d in $(DIRS); do make -C $$d all || exit 1; done
|
||||
|
||||
depend:
|
||||
for d in $(DIRS); do make -C $$d depend || exit 1; done
|
||||
|
||||
# Top-level Makefile recurses for "install" and "uninstall", which have no use
|
||||
# here. Just ignore them.
|
||||
|
||||
install:
|
||||
|
||||
uninstall:
|
||||
|
||||
clean:
|
||||
for d in $(DIRS); do make -C $$d clean || exit 1; done
|
||||
|
||||
spotless:
|
||||
for d in $(DIRS); do make -C $$d spotless || exit 1; done
|
53
fw/common/Makefile
Normal file
53
fw/common/Makefile
Normal file
@ -0,0 +1,53 @@
|
||||
#
|
||||
# common/Makefile - Makefile for shared items
|
||||
#
|
||||
# Written 2008, 2010 by Werner Almesberger
|
||||
# Copyright 2008, 2010 Werner Almesberger
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
|
||||
|
||||
GEN_quiet = @echo " GENERATE " $@ &&
|
||||
|
||||
ifeq ($(V),1)
|
||||
GEN =
|
||||
else
|
||||
GEN = $(GEN_quiet)
|
||||
endif
|
||||
|
||||
|
||||
.PHONY: all depend clean spotless
|
||||
|
||||
all: io-parts.h
|
||||
|
||||
io-parts.h: io.h Makefile
|
||||
$(GEN) $(CPP) -dD $< | \
|
||||
sed '1,/IO_H/d' | \
|
||||
awk \
|
||||
'BEGIN { print "/* MACHINE-GENERATED. DO NOT EDIT ! */"; \
|
||||
print "#ifndef IO_PARTS_H"; \
|
||||
print "#define IO_PARTS_H"; } \
|
||||
/#define/ && $$3 != "" { \
|
||||
split($$3, a, "_"); \
|
||||
print $$1, $$2 "_PORT", a[1]; \
|
||||
print $$1, $$2 "_MODE", a[1] "MDOUT"; \
|
||||
print $$1, $$2 "_BIT", a[2]; } \
|
||||
END { print "#endif" }' >$@ || \
|
||||
{ rm -f $@; exit 1; }
|
||||
|
||||
|
||||
#
|
||||
# When we do a global "make depend", we'll come here first. So we create
|
||||
# io-parts.h so that "make depend" in the other directories can pick it up.
|
||||
#
|
||||
|
||||
depend: io-parts.h
|
||||
|
||||
clean:
|
||||
rm -f io-parts.h
|
||||
|
||||
spotless: clean
|
Loading…
Reference in New Issue
Block a user