freemyipod r91 - Code Review

Jump to: navigation, search
Repository:freemyipod
Revision:r90‎ | r91 | r92 >
Date:03:49, 11 August 2010
Author:theseven
Status:new
Tags:
Comment:
Remove unused main.c file and add target-specific CFLAGS/LDFLAGS
Modified paths:
  • /embios/trunk/Makefile (modified) (history)
  • /embios/trunk/SOURCES (modified) (history)
  • /embios/trunk/main.c (deleted) (history)
  • /embios/trunk/target/ipodnano2g/target.mk (added) (history)
  • /embios/trunk/target/ipodnano4g/target.mk (added) (history)

Diff [purge]

Index: embios/trunk/main.c
@@ -1,30 +0,0 @@
2 -//
3 -//
4 -// Copyright 2010 TheSeven
5 -//
6 -//
7 -// This file is part of emBIOS.
8 -//
9 -// emBIOS is free software: you can redistribute it and/or
10 -// modify it under the terms of the GNU General Public License as
11 -// published by the Free Software Foundation, either version 2 of the
12 -// License, or (at your option) any later version.
13 -//
14 -// emBIOS is distributed in the hope that it will be useful,
15 -// but WITHOUT ANY WARRANTY; without even the implied warranty of
16 -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
17 -// See the GNU General Public License for more details.
18 -//
19 -// You should have received a copy of the GNU General Public License along
20 -// with emBIOS. If not, see <http://www.gnu.org/licenses/>.
21 -//
22 -//
23 -
24 -
25 -#include "global.h"
26 -#include "panic.h"
27 -
28 -void main()
29 -{
30 - panic(PANIC_FATAL, "main() doesn't know what to do!");
31 -}
\ No newline at end of file
Index: embios/trunk/Makefile
@@ -19,6 +19,8 @@
2020 TARGETS := $(call preprocess,TARGETS,-I.)
2121
2222 define TARGET_template
 23+-include target/$(1)/target.mk
 24+
2325 SRC_$(1) := $$(call preprocesspaths,SOURCES,-DTARGET_$(1) -Itarget/$(1) -I.)
2426 OBJ_$(1) := $$(SRC_$(1):%.c=build/$(1)/%.o)
2527 OBJ_$(1) := $$(OBJ_$(1):%.S=build/$(1)/%.o)
@@ -34,7 +36,7 @@
3537 $(OBJCOPY) -O binary $$^ $$@
3638
3739 build/$(1)/$(NAME).elf: target/$(1)/ls.x build/$(1)/target/$(1)/crt0.o $$(OBJ_$(1))
38 - $(LD) $(LDFLAGS) -o $$@ -T target/$(1)/ls.x $$(OBJ_$(1))
 40+ $(LD) $(LDFLAGS) $$(LDFLAGS_$(1)) -o $$@ -T target/$(1)/ls.x $$(OBJ_$(1))
3941
4042 build/$(1)/%.o: %.c build/version.h
4143 ifeq ($(shell uname),WindowsNT)
@@ -42,8 +44,8 @@
4345 else
4446 @-mkdir -p $$(dir $$@)
4547 endif
46 - $(CC) -c $(CFLAGS) -Itarget/$(1) -DTARGET_$(1) -o $$@ $$<
47 - @$(CC) -MM $(CFLAGS) -Itarget/$(1) -DTARGET_$(1) $$< > $$@.dep.tmp
 48+ $(CC) -c $(CFLAGS) $$(CFLAGS_$(1)) -Itarget/$(1) -DTARGET_$(1) -o $$@ $$<
 49+ @$(CC) -MM $(CFLAGS) $$(CFLAGS_$(1)) -Itarget/$(1) -DTARGET_$(1) $$< > $$@.dep.tmp
4850 @sed -e "s|.*:|$$@:|" < $$@.dep.tmp > $$@.dep
4951 ifeq ($(shell uname),WindowsNT)
5052 @sed -e "s/.*://" -e "s/\\$$$$//" < $$@.dep.tmp | fmt -1 | sed -e "s/^ *//" -e "s/$$$$/:/" >> $$@.dep
@@ -58,8 +60,8 @@
5961 else
6062 @-mkdir -p $$(dir $$@)
6163 endif
62 - $(CC) -c $(CFLAGS) -Itarget/$(1) -DTARGET_$(1) -o $$@ $$<
63 - @$(CC) -MM $(CFLAGS) -Itarget/$(1) -DTARGET_$(1) $$< > $$@.dep.tmp
 64+ $(CC) -c $(CFLAGS) $$(CFLAGS_$(1)) -Itarget/$(1) -DTARGET_$(1) -o $$@ $$<
 65+ @$(CC) -MM $(CFLAGS) $$(CFLAGS_$(1)) -Itarget/$(1) -DTARGET_$(1) $$< > $$@.dep.tmp
6466 @sed -e "s|.*:|$$@:|" < $$@.dep.tmp > $$@.dep
6567 ifeq ($(shell uname),WindowsNT)
6668 @sed -e "s/.*://" -e "s/\\$$$$//" < $$@.dep.tmp | fmt -1 | sed -e "s/^ *//" -e "s/$$$$/:/" >> $$@.dep
Index: embios/trunk/SOURCES
@@ -34,7 +34,6 @@
3535 #endif
3636
3737 init.c
38 -main.c
3938 util.c
4039 #ifdef HAVE_LCD
4140 drawing.S
Index: embios/trunk/target/ipodnano2g/target.mk
@@ -0,0 +1 @@
 2+CFLAGS_ipodnano2g += -mcpu=arm940t
Index: embios/trunk/target/ipodnano4g/target.mk
@@ -0,0 +1 @@
 2+CFLAGS_ipodnano4g += -mcpu=arm1136j-s