[rendering] This simple trick didn't work...
[wikipediardware.git] / common / Makefile
blobbf8af831899eb3ab2f428b1aa233c79e7d544040
1 # Copyright (c) 2008, 2009 Daniel Mack <daniel@caiaq.de>
2 # Copyright (c) 2008 Holger Hans Peter Freyther <zecke@openmoko.org>
4 # This program is free software: you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation, either version 3 of the License, or
7 # (at your option) any later version.
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
14 # You should have received a copy of the GNU General Public License
15 # along with this program. If not, see <http://www.gnu.org/licenses/>.
17 CROSS=c33-epson-elf-
18 GCC=$(CROSS)gcc
19 AS=$(CROSS)as
20 LD=$(CROSS)ld
21 HOSTCC=gcc
22 CC=$(GCC)
23 OBJCOPY=$(CROSS)objcopy
24 OBJDUMP=$(CROSS)objdump
25 STRIP=$(CROSS)strip
27 CFLAGS+=-Wall -Werror -I. -gstabs -mlong-calls -fno-builtin -Os -mc33pe $(INCLUDES)
29 # protection in case some Makefile includes this too early
30 .PHONY: this-is-included-too-early
31 this-is-included-too-early:
32 @echo This is common/Makefile reporting an error
33 @echo move the '"include"' to the bottom of the Makefile.
34 @echo Otherwise the dependencies are not built in the correct order
35 @exit 1
37 .c.o: $<
38 $(GCC) -M $(CFLAGS) $< > $(notdir $(<:.c=.d))
39 $(GCC) $(CFLAGS) -c $< -o $(notdir $(<:.c=.o)) -Wa,-ahl=$(notdir $(<:.c=.asm33))
41 -include $(wildcard *.d) dummy