Subversion Repositories freemyipod

Rev

Rev 462 | Rev 491 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 462 Rev 489
Line 1... Line 1...
1
NAME := helloworld
1
NAME := helloworld
2
STACKSIZE := 4096
2
STACKSIZE := 4096
3
COMPRESS := false
3
COMPRESS := true
4
 
4
 
5
EMCOREDIR ?= ../../emcore/trunk/
5
EMCOREDIR ?= ../../emcore/trunk/
-
 
6
LIBUIDIR ?= ../../libs/ui/
6
 
7
 
7
ifeq ($(shell uname),WindowsNT)
8
ifeq ($(shell uname),WindowsNT)
8
CCACHE :=
9
CCACHE :=
9
else
10
else
10
CCACHE := $(shell which ccache)
11
CCACHE := $(shell which ccache)
Line 15... Line 16...
15
AS      := $(CROSS)as
16
AS      := $(CROSS)as
16
LD      := $(CROSS)ld
17
LD      := $(CROSS)ld
17
OBJCOPY := $(CROSS)objcopy
18
OBJCOPY := $(CROSS)objcopy
18
ELF2ECA := $(CROSS)elf2emcoreapp
19
ELF2ECA := $(CROSS)elf2emcoreapp
19
 
20
 
-
 
21
LIBINCLUDES := -I$(LIBUIDIR)/export 
-
 
22
 
20
CFLAGS  += -Os -fno-pie -fno-stack-protector -fomit-frame-pointer -I. -I$(EMCOREDIR)/export -ffunction-sections -fdata-sections -mcpu=arm940t
23
CFLAGS  += -Os -fno-pie -fno-stack-protector -fomit-frame-pointer -I. -I$(EMCOREDIR)/export $(LIBINCLUDES) -ffunction-sections -fdata-sections -mcpu=arm940t
21
LDFLAGS += "$(shell $(CC) -print-libgcc-file-name)" -d -r --gc-sections
24
LDFLAGS += "$(shell $(CC) -print-libgcc-file-name)" -d -r --gc-sections
22
 
25
 
23
preprocess = $(shell $(CC) $(PPCFLAGS) $(2) -E -P -x c $(1) | grep -v "^\#")
26
preprocess = $(shell $(CC) $(PPCFLAGS) $(2) -E -P -x c $(1) | grep -v "^\#")
24
preprocesspaths = $(shell $(CC) $(PPCFLAGS) $(2) -E -P -x c $(1) | grep -v "^\#" | sed -e "s:^..*:$(dir $(1))&:")
27
preprocesspaths = $(shell $(CC) $(PPCFLAGS) $(2) -E -P -x c $(1) | grep -v "^\#" | sed -e "s:^..*:$(dir $(1))&:")
25
 
28
 
Line 37... Line 40...
37
-include $(OBJ:%=%.dep)
40
-include $(OBJ:%=%.dep)
38
 
41
 
39
$(NAME): build/$(NAME).emcoreapp
42
$(NAME): build/$(NAME).emcoreapp
40
 
43
 
41
build/$(NAME).emcoreapp: build/$(NAME).elf
44
build/$(NAME).emcoreapp: build/$(NAME).elf
42
	@echo "[EMCAPP] $<"
45
	@echo [EMCAPP] $<
43
ifeq ($(COMPRESS),true)
46
ifeq ($(COMPRESS),true)
44
	@$(ELF2ECA) -z -s $(STACKSIZE) -o $@ $^
47
	@$(ELF2ECA) -z -s $(STACKSIZE) -o $@ $^
45
else
48
else
46
	@$(ELF2ECA) -s $(STACKSIZE) -o $@ $^
49
	@$(ELF2ECA) -s $(STACKSIZE) -o $@ $^
47
endif
50
endif