1## 2## This file is part of the coreboot project. 3## 4## Copyright (C) 2006-2007 coresystems GmbH 5## (Written by Stefan Reinauer <stepan@coresystems.de> for coresystems GmbH) 6## 7## This program is free software; you can redistribute it and/or modify 8## it under the terms of the GNU General Public License as published by 9## the Free Software Foundation; either version 2 of the License, or 10## (at your option) any later version. 11## 12## This program is distributed in the hope that it will be useful, 13## but WITHOUT ANY WARRANTY; without even the implied warranty of 14## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15## GNU General Public License for more details. 16## 17## You should have received a copy of the GNU General Public License 18## along with this program; if not, write to the Free Software 19## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 20## 21 22# 23# Miscellaneous mainboard specific build targets! 24# 25 26$(obj)/mainboard/$(MAINBOARDDIR)/statictree.o: $(obj)/mainboard/$(MAINBOARDDIR)/statictree.c $(obj)/statictree.h 27 $(Q)printf " CC $(subst $(shell pwd)/,,$(@))\n" 28 $(Q)$(CC) $(INITCFLAGS) $(COREBOOTINCLUDE) -c -o $@ $< 29 30# Create a tmp file so that if the dtc fails we don't end up with a 31# half-correct statictree.[ch] 32$(obj)/mainboard/$(MAINBOARDDIR)/statictree.c: $(src)/mainboard/$(MAINBOARDDIR)/dts $(obj)/util/dtc/dtc 33 $(Q)printf " DTC $(subst $(shell pwd)/,,$(@))\n" 34 $(Q)$(obj)/util/dtc/dtc -O lb mainboard/$(MAINBOARDDIR)/dts > /tmp/statictree.c.$$ 35 $(Q)mv /tmp/statictree.c.$$ $@ 36 37$(obj)/statictree.h: $(src)/mainboard/$(MAINBOARDDIR)/dts $(obj)/util/dtc/dtc 38 $(Q)printf " DTC $(subst $(shell pwd)/,,$(@))\n" 39 $(Q)$(obj)/util/dtc/dtc -O lbh mainboard/$(MAINBOARDDIR)/dts > /tmp/statictree.h.$$ 40 $(Q)mv /tmp/statictree.h.$$ $@ 41 42$(obj)/mainboard/$(MAINBOARDDIR)/option_table.c: $(obj)/util/options/build_opt_tbl $(src)/mainboard/$(MAINBOARDDIR)/cmos.layout 43 $(Q)printf " OPTIONS $(subst $(shell pwd)/,,$(@))\n" 44 $(Q)mkdir -p $(obj)/mainboard/$(MAINBOARDDIR) 45 $(Q)$(obj)/util/options/build_opt_tbl -b \ 46 --config $(src)/mainboard/$(MAINBOARDDIR)/cmos.layout \ 47 --option $(obj)/mainboard/$(MAINBOARDDIR)/option_table.c 48 49$(obj)/mainboard/$(MAINBOARDDIR)/option_table.h: $(obj)/util/options/build_opt_tbl $(src)/mainboard/$(MAINBOARDDIR)/cmos.layout 50 $(Q)printf " OPTIONS $(subst $(shell pwd)/,,$(@))\n" 51 $(Q)mkdir -p $(obj)/mainboard/$(MAINBOARDDIR) 52 $(Q)$(obj)/util/options/build_opt_tbl -b \ 53 --config $(src)/mainboard/$(MAINBOARDDIR)/cmos.layout \ 54 --header $(obj)/mainboard/$(MAINBOARDDIR)/option_table.c 55 56$(obj)/option_table: $(obj)/mainboard/$(MAINBOARDDIR)/option_table.o 57 $(Q)printf " OBJCOPY $(subst $(shell pwd)/,,$(@))\n" 58 $(Q)$(OBJCOPY) -O binary $< $@ 59 60$(obj)/mainboard/$(MAINBOARDDIR)/%.o: $(src)/mainboard/$(MAINBOARDDIR)/%.c 61 $(Q)mkdir -p $(obj)/mainboard/$(MAINBOARDDIR) 62 $(Q)printf " CC $(subst $(shell pwd)/,,$(@))\n" 63 $(Q)$(CC) $(INITCFLAGS) -c $< -o $@ 64 65# 66# Miscellaneous superio specific build targets! 67# 68 69$(obj)/superio/%.o: $(src)/superio/%.c $(obj)/statictree.h 70 $(Q)mkdir -p $(dir $@) 71 $(Q)printf " CC $(subst $(shell pwd)/,,$(@))\n" 72 $(Q)$(CC) $(INITCFLAGS) -c $< -o $@ 73 74# 75# Miscellaneous northbridge specific build targets! 76# 77 78$(obj)/northbridge/%.o: $(src)/northbridge/%.c $(obj)/statictree.h 79 $(Q)mkdir -p $(dir $@) 80 $(Q)printf " CC $(subst $(shell pwd)/,,$(@))\n" 81 $(Q)$(CC) $(INITCFLAGS) -c $< -o $@ 82 83# 84# Miscellaneous southbridge specific build targets! 85# 86 87$(obj)/southbridge/%.o: $(src)/southbridge/%.c $(obj)/statictree.h 88 $(Q)mkdir -p $(dir $@) 89 $(Q)printf " CC $(subst $(shell pwd)/,,$(@))\n" 90 $(Q)$(CC) $(INITCFLAGS) -c $< -o $@ 91

