Rev 145 | Blame | Last modification | View Log | RSS feed
NAME := uninstaller-nano2gEMBIOSDIR ?= ../../embios/trunk/CROSS ?= arm-none-eabi-CC := $(CROSS)gccAS := $(CROSS)asLD := $(CROSS)ldOBJCOPY := $(CROSS)objcopyUCLPACK := ucl2e10singleblkCFLAGS += -Os -fno-pie -fno-stack-protector -fomit-frame-pointer -I. -I$(EMBIOSDIR)/export -ffunction-sections -fdata-sections -mcpu=arm940tLDFLAGS += "$(shell $(CC) -print-libgcc-file-name)" --gc-sectionspreprocess = $(shell $(CC) $(PPCFLAGS) $(2) -E -P -x c $(1) | grep -v "^\#")preprocesspaths = $(shell $(CC) $(PPCFLAGS) $(2) -E -P -x c $(1) | grep -v "^\#" | sed -e "s:^..*:$(dir $(1))&:")REVISION := $(shell svnversion .)REVISIONINT := $(shell echo $(REVISION) | sed -e "s/[^0-9].*$$//")HELPERS := build/__embios_armhelpers.oSRC := $(call preprocesspaths,SOURCES,-I. -I..)OBJ := $(SRC:%.c=build/%.o)OBJ := $(OBJ:%.S=build/%.o) $(HELPERS)all: $(NAME)-include $(OBJ:%=%.dep)$(NAME): build/$(NAME).embiosapp.uclbuild/$(NAME).embiosapp.ucl: build/$(NAME).embiosapp@echo [UCL] $<@$(UCLPACK) $^ $@build/$(NAME).embiosapp: build/$(NAME).elf@echo [OC] $<@$(OBJCOPY) -O binary $^ $@build/$(NAME).elf: ls.x $(OBJ)@echo [LD] $@@$(LD) $(LDFLAGS) -o $@ -T ls.x $(OBJ)build/%.o: %.c build/version.h@echo [CC] $<ifeq ($(shell uname),WindowsNT)@-if not exist $(subst /,\,$(dir $@)) md $(subst /,\,$(dir $@))else@-mkdir -p $(dir $@)endif@$(CC) -c $(CFLAGS) -o $@ $<@$(CC) -MM $(CFLAGS) $< > $@.dep.tmp@sed -e "s|.*:|$@:|" < $@.dep.tmp > $@.depifeq ($(shell uname),WindowsNT)@sed -e "s/.*://" -e "s/\\$$//" < $@.dep.tmp | fmt -1 | sed -e "s/^ *//" -e "s/$$/:/" >> $@.depelse@sed -e 's/.*://' -e 's/\\$$//' < $@.dep.tmp | fmt -1 | sed -e 's/^ *//' -e 's/$$/:/' >> $@.dependif@rm -f $@.dep.tmpbuild/%.o: %.S build/version.h@echo [CC] $<ifeq ($(shell uname),WindowsNT)@-if not exist $(subst /,\,$(dir $@)) md $(subst /,\,$(dir $@))else@-mkdir -p $(dir $@)endif@$(CC) -c $(CFLAGS) -o $@ $<@$(CC) -MM $(CFLAGS) $< > $@.dep.tmp@sed -e "s|.*:|$@:|" < $@.dep.tmp > $@.depifeq ($(shell uname),WindowsNT)@sed -e "s/.*://" -e "s/\\$$//" < $@.dep.tmp | fmt -1 | sed -e "s/^ *//" -e "s/$$/:/" >> $@.depelse@sed -e 's/.*://' -e 's/\\$$//' < $@.dep.tmp | fmt -1 | sed -e 's/^ *//' -e 's/$$/:/' >> $@.dependif@rm -f $@.dep.tmpbuild/__embios_%.o: $(EMBIOSDIR)/export/%.S@echo [CC] $<ifeq ($(shell uname),WindowsNT)@-if not exist $(subst /,\,$(dir $@)) md $(subst /,\,$(dir $@))else@-mkdir -p $(dir $@)endif@$(CC) -c $(CFLAGS) -o $@ $<build/version.h: version.h .svn/entries@echo [PP] $<ifeq ($(shell uname),WindowsNT)@-if not exist build md build@sed -e "s/\$$REVISION\$$/$(REVISION)/" -e "s/\$$REVISIONINT\$$/$(REVISIONINT)/" < $< > $@else@-mkdir -p build@sed -e 's/\$$REVISION\$$/$(REVISION)/' -e 's/\$$REVISIONINT\$$/$(REVISIONINT)/' < $< > $@endifclean:@rm -rf build.PHONY: all clean $(NAME)