aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/lantiq/Makefile
blob: 67e3de6bdd690cc7741578b8fa179ccfc4f061da (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#
# Copyright (C) 2007-2011 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk

BOARD:=lantiq
BOARDNAME:=Lantiq
FEATURES:=squashfs
SUBTARGETS=xway xrx200
MAINTAINER:=John Crispin <blogic@openwrt.org>

KERNEL_PATCHVER:=3.18

CPU_TYPE:=mips32r2

define Target/Description
	Build firmware images for Lantiq SoC
endef

include $(INCLUDE_DIR)/target.mk

$(eval $(call BuildTarget))
">\ compat/grant_table.h \ compat/kexec.h \ compat/memory.h \ compat/nmi.h \ compat/physdev.h \ compat/platform.h \ compat/sched.h \ compat/trace.h \ compat/vcpu.h \ compat/version.h \ compat/xen.h \ compat/xencomm.h \ compat/xenoprof.h headers-$(CONFIG_X86) += compat/arch-x86/xen.h headers-$(CONFIG_X86) += compat/arch-x86/xen-$(compat-arch-y).h headers-y += compat/arch-$(compat-arch-y).h compat/xlat.h cppflags-y := -include public/xen-compat.h cppflags-$(CONFIG_X86) += -m32 # 8-byte types are 4-byte aligned on x86_32 ... prefix-$(CONFIG_X86) := \#pragma pack(4) suffix-$(CONFIG_X86) := \#pragma pack() endif .PHONY: all all: $(headers-y) compat/%.h: compat/%.i Makefile id=_$$(echo $@ | tr '[:lower:]-/.' '[:upper:]___'); \ echo "#ifndef $$id" >$@.new; \ echo "#define $$id" >>$@.new; \ echo "#include <xen/compat.h>" >>$@.new; \ $(if $(filter-out compat/arch-%.h,$@),echo "#include <$(patsubst compat/%,public/%,$@)>" >>$@.new;) \ $(if $(prefix-y),echo "$(prefix-y)" >>$@.new;) \ grep -v '^# [0-9]' $< | \ $(BASEDIR)/tools/compat-build-header.py | uniq >>$@.new; \ $(if $(suffix-y),echo "$(suffix-y)" >>$@.new;) \ echo "#endif /* $$id */" >>$@.new mv -f $@.new $@ compat/%.i: compat/%.c Makefile $(CPP) $(CFLAGS) $(cppflags-y) -o $@ $< compat/%.c: public/%.h xlat.lst Makefile mkdir -p $(@D) grep -v 'DEFINE_XEN_GUEST_HANDLE(long)' $< | \ $(BASEDIR)/tools/compat-build-source.py >$@.new mv -f $@.new $@ compat/xlat.h: xlat.lst $(filter-out compat/xlat.h,$(headers-y)) $(BASEDIR)/tools/get-fields.sh Makefile grep -v '^[ ]*#' xlat.lst | \ while read what name hdr; do \ /bin/bash $(BASEDIR)/tools/get-fields.sh "$$what" compat_$$name $$(echo compat/$$hdr | sed 's,@arch@,$(compat-arch-y),g') || exit $$?; \ done >$@.new mv -f $@.new $@ clean:: rm -rf compat