freemyipod r21 - Code Review

Jump to: navigation, search
Repository:freemyipod
Revision:r20‎ | r21 | r22 >
Date:23:19, 4 August 2010
Author:theseven
Status:new
Tags:
Comment:
Move the list of targets from the Makefile to a TARGETS file, that can also be used by the build server
Modified paths:
  • /embios/trunk/Makefile (modified) (history)
  • /embios/trunk/TARGETS (added) (history)

Diff [purge]

Index: embios/trunk/TARGETS
@@ -0,0 +1,2 @@
 2+ipodnano2g
 3+ipodnano4g
Index: embios/trunk/Makefile
@@ -1,5 +1,4 @@
22 NAME := embios
3 -TARGETS := ipodnano2g ipodnano4g
43
54 CROSS := arm-none-eabi-
65 CC := $(CROSS)gcc
@@ -11,10 +10,13 @@
1211 CFLAGS ?= -Os -fno-pie -fno-stack-protector -fomit-frame-pointer -I. -ffunction-sections -fdata-sections
1312 LDFLAGS ?= "$(shell $(CC) -print-libgcc-file-name)" --gc-sections
1413
15 -preprocess = $(shell $(CC) $(PPCFLAGS) $(2) -E -P -x c $(1) | grep -v "^\#" | sed -e "s:^..*:$(dir $(1))&:")
 14+preprocess = $(shell $(CC) $(PPCFLAGS) $(2) -E -P -x c $(1) | grep -v "^\#")
 15+preprocesspaths = $(shell $(CC) $(PPCFLAGS) $(2) -E -P -x c $(1) | grep -v "^\#" | sed -e "s:^..*:$(dir $(1))&:")
1616
 17+TARGETS := $(call preprocess,TARGETS,-I.)
 18+
1719 define TARGET_template
18 -SRC_$(1) := $$(call preprocess,SOURCES,-DTARGET_$(1) -Itarget/$(1) -I.)
 20+SRC_$(1) := $$(call preprocesspaths,SOURCES,-DTARGET_$(1) -Itarget/$(1) -I.)
1921 OBJ_$(1) := $$(SRC_$(1):%.c=build/$(1)/%.o)
2022 OBJ_$(1) := $$(OBJ_$(1):%.S=build/$(1)/%.o)
2123