Subversion Repositories HomeAutomation

Rev

Rev 437 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | SVN | RSS feed

Rev 437 Rev 438
Line 1... Line 1...
1
# $Id: Makefile 437 2007-05-09 19:43:41Z eqlazer $
1
# $Id: Makefile 438 2007-05-09 22:29:16Z eqlazer $
2
PRG            = bios
2
PRG            = bios
3
ASRC           = $(BIOSDIR)/vectors.S
3
ASRC           = $(BIOSDIR)/vectors.S
4
CSRC           = $(BIOSDIR)/bios_export.c $(BIOSDIR)/bios.c $(BIOSDIR)/flash.c
4
CSRC           = $(BIOSDIR)/bios_export.c $(BIOSDIR)/bios.c $(BIOSDIR)/flash.c
5
BIOS_VERSION   = 0x1338
5
BIOS_VERSION   = 0x1338
6
OPTIMIZE       = -Os -mcall-prologues
6
OPTIMIZE       = -Os -mcall-prologues
Line 51... Line 51...
51
.PHONY: all
51
.PHONY: all
52
all: $(PRG).elf lst hex eeprom template
52
all: $(PRG).elf lst hex eeprom template
53
 
53
 
54
$(PRG)_pass1.elf: $(BIOSDIR)/config.h $(OBJ)
54
$(PRG)_pass1.elf: $(BIOSDIR)/config.h $(OBJ)
55
	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS)
55
	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS)
-
 
56
 
-
 
57
# Get old node config and build new bios "make update NODE_ID=0x01"
-
 
58
.PHONY: update oldconfig move
-
 
59
update: clean oldconfig all move
-
 
60
 
-
 
61
oldconfig:
-
 
62
	- cp $(PERSONALDIR)/*$(NODE_ID)*/bios.inc config.inc
56
 
63
 
57
# Copy template to personal dir
64
# Copy template to personal dir
58
.PHONY: move
-
 
59
move:
65
move:
60
	- cp -r $(TEMPLATEDIR) $(PERSONALDIR)/$(NODE_ID)_$(HW_NAME)
66
	- mkdir -p $(PERSONALDIR)/$(NODE_ID)_$(HW_NAME)
61
	- rm -rf $(PERSONALDIR)/$(NODE_ID)_$(HW_NAME)/.svn
67
	- cp $(TEMPLATEDIR)/bios.h $(TEMPLATEDIR)/bios.inc $(TEMPLATEDIR)/config.inc $(TEMPLATEDIR)/libbios.a $(TEMPLATEDIR)/main.c $(TEMPLATEDIR)/Makefile $(PERSONALDIR)/$(NODE_ID)_$(HW_NAME)/
-
 
68
 
62
 
69
 
63
.PHONY: clean cleanintermediate cleantemplate
70
.PHONY: clean cleanintermediate cleantemplate
64
clean: cleanintermediate cleantemplate
71
clean: cleanintermediate cleantemplate
65
	-rm -f $(PRG).elf $(PRG).lst $(PRG).map *.hex
72
	-rm -f $(PRG).elf $(PRG).lst $(PRG).map *.hex
66
 
73