Subversion Repositories freemyipod

Rev

Rev 18 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 18 Rev 21
Line 1... Line 1...
1
NAME := embios
1
NAME := embios
2
TARGETS := ipodnano2g ipodnano4g
-
 
3
 
2
 
4
CROSS   := arm-none-eabi-
3
CROSS   := arm-none-eabi-
5
CC      := $(CROSS)gcc
4
CC      := $(CROSS)gcc
6
AS      := $(CROSS)as
5
AS      := $(CROSS)as
7
LD      := $(CROSS)ld
6
LD      := $(CROSS)ld
Line 9... Line 8...
9
UCLPACK := ucl2e10singleblk
8
UCLPACK := ucl2e10singleblk
10
 
9
 
11
CFLAGS  ?= -Os -fno-pie -fno-stack-protector -fomit-frame-pointer -I. -ffunction-sections -fdata-sections
10
CFLAGS  ?= -Os -fno-pie -fno-stack-protector -fomit-frame-pointer -I. -ffunction-sections -fdata-sections
12
LDFLAGS ?= "$(shell $(CC) -print-libgcc-file-name)" --gc-sections
11
LDFLAGS ?= "$(shell $(CC) -print-libgcc-file-name)" --gc-sections
13
 
12
 
-
 
13
preprocess = $(shell $(CC) $(PPCFLAGS) $(2) -E -P -x c $(1) | grep -v "^\#")
14
preprocess = $(shell $(CC) $(PPCFLAGS) $(2) -E -P -x c $(1) | grep -v "^\#" | sed -e "s:^..*:$(dir $(1))&:")
14
preprocesspaths = $(shell $(CC) $(PPCFLAGS) $(2) -E -P -x c $(1) | grep -v "^\#" | sed -e "s:^..*:$(dir $(1))&:")
-
 
15
 
-
 
16
TARGETS := $(call preprocess,TARGETS,-I.)
15
 
17
 
16
define TARGET_template
18
define TARGET_template
17
SRC_$(1) := $$(call preprocess,SOURCES,-DTARGET_$(1) -Itarget/$(1) -I.)
19
SRC_$(1) := $$(call preprocesspaths,SOURCES,-DTARGET_$(1) -Itarget/$(1) -I.)
18
OBJ_$(1) := $$(SRC_$(1):%.c=build/$(1)/%.o)
20
OBJ_$(1) := $$(SRC_$(1):%.c=build/$(1)/%.o)
19
OBJ_$(1) := $$(OBJ_$(1):%.S=build/$(1)/%.o)
21
OBJ_$(1) := $$(OBJ_$(1):%.S=build/$(1)/%.o)
20
 
22
 
21
-include $$(OBJ_$(1):%=%.dep)
23
-include $$(OBJ_$(1):%=%.dep)
22
 
24