Subversion Repositories freemyipod

Rev

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

Rev 489 Rev 491
Line 1... Line 1...
1
NAME := helloworld
1
NAME := helloworld
2
STACKSIZE := 4096
2
STACKSIZE := 4096
3
COMPRESS := true
3
COMPRESS := false
4
 
4
 
5
EMCOREDIR ?= ../../emcore/trunk/
5
EMCOREDIR ?= ../../emcore/trunk/
6
LIBUIDIR ?= ../../libs/ui/
6
LIBPNGDIR ?= ../../libs/png/
7
 
7
 
8
ifeq ($(shell uname),WindowsNT)
8
ifeq ($(shell uname),WindowsNT)
9
CCACHE :=
9
CCACHE :=
10
else
10
else
11
CCACHE := $(shell which ccache)
11
CCACHE := $(shell which ccache)
Line 16... Line 16...
16
AS      := $(CROSS)as
16
AS      := $(CROSS)as
17
LD      := $(CROSS)ld
17
LD      := $(CROSS)ld
18
OBJCOPY := $(CROSS)objcopy
18
OBJCOPY := $(CROSS)objcopy
19
ELF2ECA := $(CROSS)elf2emcoreapp
19
ELF2ECA := $(CROSS)elf2emcoreapp
20
 
20
 
21
LIBINCLUDES := -I$(LIBUIDIR)/export 
21
LIBINCLUDES := -I$(LIBPNGDIR)/export 
22
 
22
 
23
CFLAGS  += -Os -fno-pie -fno-stack-protector -fomit-frame-pointer -I. -I$(EMCOREDIR)/export $(LIBINCLUDES) -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 -DARM_ARCH=4
24
LDFLAGS += "$(shell $(CC) -print-libgcc-file-name)" -d -r --gc-sections
24
LDFLAGS += "$(shell $(CC) -print-libgcc-file-name)" --emit-relocs --gc-sections
25
 
25
 
26
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 "^\#")
27
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))&:")
28
 
28
 
29
REVISION := $(shell svnversion .)
29
REVISION := $(shell svnversion .)
Line 85... Line 85...
85
else
85
else
86
	@sed -e 's/.*://' -e 's/\\$$//' < $@.dep.tmp | fmt -1 | sed -e 's/^ *//' -e 's/$$/:/' >> $@.dep
86
	@sed -e 's/.*://' -e 's/\\$$//' < $@.dep.tmp | fmt -1 | sed -e 's/^ *//' -e 's/$$/:/' >> $@.dep
87
endif
87
endif
88
	@rm -f $@.dep.tmp
88
	@rm -f $@.dep.tmp
89
 
89
 
-
 
90
build/__emcore_%.o: $(EMCOREDIR)/export/%.c
-
 
91
	@echo [CC]     $<
-
 
92
ifeq ($(shell uname),WindowsNT)
-
 
93
	@-if not exist $(subst /,\,$(dir $@)) md $(subst /,\,$(dir $@))
-
 
94
else
-
 
95
	@-mkdir -p $(dir $@)
-
 
96
endif
-
 
97
	@$(CC) -c $(CFLAGS) -o $@ $<
-
 
98
 
90
build/__emcore_%.o: $(EMCOREDIR)/export/%.S
99
build/__emcore_%.o: $(EMCOREDIR)/export/%.S
91
	@echo [CC]     $<
100
	@echo [CC]     $<
92
ifeq ($(shell uname),WindowsNT)
101
ifeq ($(shell uname),WindowsNT)
93
	@-if not exist $(subst /,\,$(dir $@)) md $(subst /,\,$(dir $@))
102
	@-if not exist $(subst /,\,$(dir $@)) md $(subst /,\,$(dir $@))
94
else
103
else