Subversion Repositories freemyipod

Rev

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

Rev 491 Rev 529
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
LIBPNGDIR ?= ../../libs/png/
-
 
7
 
6
 
8
ifeq ($(shell uname),WindowsNT)
7
ifeq ($(shell uname),WindowsNT)
9
CCACHE :=
8
CCACHE :=
10
else
9
else
11
CCACHE := $(shell which ccache)
10
CCACHE := $(shell which ccache)
Line 16... Line 15...
16
AS      := $(CROSS)as
15
AS      := $(CROSS)as
17
LD      := $(CROSS)ld
16
LD      := $(CROSS)ld
18
OBJCOPY := $(CROSS)objcopy
17
OBJCOPY := $(CROSS)objcopy
19
ELF2ECA := $(CROSS)elf2emcoreapp
18
ELF2ECA := $(CROSS)elf2emcoreapp
20
 
19
 
21
LIBINCLUDES := -I$(LIBPNGDIR)/export 
20
LIBINCLUDES := 
22
 
21
 
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
22
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)" --emit-relocs --gc-sections
23
LDFLAGS += "$(shell $(CC) -print-libgcc-file-name)" --emit-relocs --gc-sections
25
 
24
 
26
preprocess = $(shell $(CC) $(PPCFLAGS) $(2) -E -P -x c $(1) | grep -v "^\#")
25
preprocess = $(shell $(CC) $(PPCFLAGS) $(2) -E -P -x c $(1) | grep -v "^\#")
Line 103... Line 102...
103
else
102
else
104
	@-mkdir -p $(dir $@)
103
	@-mkdir -p $(dir $@)
105
endif
104
endif
106
	@$(CC) -c $(CFLAGS) -o $@ $<
105
	@$(CC) -c $(CFLAGS) -o $@ $<
107
 
106
 
108
build/version.h: version.h .svn/entries build
107
build/version.h: version.h .svn/entries
109
	@echo [PP]     $<
108
	@echo [PP]     $<
110
ifeq ($(shell uname),WindowsNT)
109
ifeq ($(shell uname),WindowsNT)
-
 
110
	@-if not exist build md build
111
	@sed -e "s/\$$REVISION\$$/$(REVISION)/" -e "s/\$$REVISIONINT\$$/$(REVISIONINT)/" < $< > $@
111
	@sed -e "s/\$$REVISION\$$/$(REVISION)/" -e "s/\$$REVISIONINT\$$/$(REVISIONINT)/" < $< > $@
112
else
112
else
-
 
113
	@-mkdir -p build
113
	@sed -e 's/\$$REVISION\$$/$(REVISION)/' -e 's/\$$REVISIONINT\$$/$(REVISIONINT)/' < $< > $@
114
	@sed -e 's/\$$REVISION\$$/$(REVISION)/' -e 's/\$$REVISIONINT\$$/$(REVISIONINT)/' < $< > $@
114
endif
115
endif
115
 
116
 
116
build:
-
 
117
	@mkdir $@
-
 
118
 
-
 
119
clean:
117
clean:
120
	rm -rf build
118
	@rm -rf build
121
 
119
 
122
.PHONY: all clean $(NAME)
120
.PHONY: all clean $(NAME)