Subversion Repositories HomeAutomation

Rev

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

Rev 903 Rev 1719
Line 28... Line 28...
28
MSG_CLEANING = Cleaning project:
28
MSG_CLEANING = Cleaning project:
29
MSG_CREATEDIR = Creating directory:
29
MSG_CREATEDIR = Creating directory:
30
 
30
 
31
 
31
 
32
# Default target.
32
# Default target.
33
all: check_binaries $(abspath $(BUILDDIR))
33
all: check_systeminc $(abspath $(BUILDDIR))
34
	@$(MAKE) $(APPMAKEFLAGS) -C $(BUILDDIR) -f $(abspath $(SRCDIR)/Makefile) all
34
	@$(MAKE) $(APPMAKEFLAGS) -C $(BUILDDIR) -f $(abspath $(SRCDIR)/Makefile) all
35
 
35
 
36
bios: check_binaries $(abspath $(BIOSDIR))
36
bios: check_systeminc $(abspath $(BIOSDIR))
37
	@$(MAKE) $(BIOSMAKEFLAGS) -C $(BIOSDIR) -f $(abspath $(BIOSSRCDIR)/Makefile) all
37
	@$(MAKE) $(BIOSMAKEFLAGS) -C $(BIOSDIR) -f $(abspath $(BIOSSRCDIR)/Makefile) all
38
 
38
 
39
installbios: bios
39
installbios: bios
40
	$(UPLOAD) $(ULFLAGS)
40
	$(UPLOAD) $(ULFLAGS)
41
 
41
 
42
upgradebios: bios
42
upgradebios: bios
43
	$(CANUPLOAD) $(CANULFLAGS) -n $(NODE_ID) -i $(NODE_HW_ID) -f $(BIOSDIR)/$(BIOSTARGET).hex -r -b
43
	$(CANUPLOAD) $(CANULFLAGS) -n $(NODE_ID) -i $(NODE_HW_ID) -f $(BIOSDIR)/$(BIOSTARGET).hex -r -b
-
 
44
 
-
 
45
defaultbios: bios
-
 
46
	$(CANUPLOAD) $(CANULFLAGS) -n $(NODE_ID) -i $(NODE_HW_ID) -f $(BIOSDIR)/$(BIOSTARGET).hex -r -d
44
 
47
 
45
install: $(BUILDDIR)/$(TARGET).hex
48
install: $(BUILDDIR)/$(TARGET).hex
46
	$(CANUPLOAD) $(CANULFLAGS) -n $(NODE_ID) -i $(NODE_HW_ID) -f $< -r
49
	$(CANUPLOAD) $(CANULFLAGS) -n $(NODE_ID) -i $(NODE_HW_ID) -f $< -r
47
 
50
 
48
reset: 
51
reset: 
49
	$(CANUPLOAD) $(CANULFLAGS) -n $(NODE_ID) -i $(NODE_HW_ID) -r
52
	$(CANUPLOAD) $(CANULFLAGS) -n $(NODE_ID) -i $(NODE_HW_ID) -r
50
 
53
 
51
start: 
54
start: 
52
	$(CANUPLOAD) $(CANULFLAGS) -n $(NODE_ID) -i $(NODE_HW_ID) -s
55
	$(CANUPLOAD) $(CANULFLAGS) -n $(NODE_ID) -i $(NODE_HW_ID) -s
53
 
56
 
54
$(BUILDDIR)/$(TARGET).hex: check_binaries $(abspath $(BUILDDIR))
57
$(BUILDDIR)/$(TARGET).hex: check_systeminc $(abspath $(BUILDDIR))
55
	@$(MAKE) $(APPMAKEFLAGS) -C $(BUILDDIR) -f $(abspath $(SRCDIR)/Makefile) $(TARGET).hex
58
	@$(MAKE) $(APPMAKEFLAGS) -C $(BUILDDIR) -f $(abspath $(SRCDIR)/Makefile) $(TARGET).hex
56
 
59
 
57
$(abspath $(BUILDDIR) $(BIOSDIR)): check_binaries
60
$(abspath $(BUILDDIR) $(BIOSDIR)): check_systeminc
58
	@$(ECHO) $(MSG_CREATEDIR) $@
61
	@$(ECHO) $(MSG_CREATEDIR) $@
59
	@$(MKDIR) -p $@
62
	@$(MKDIR) -p $@
60
 
63
 
61
# Target: clean project.
64
# Target: clean project.
62
clean: check_binaries
65
clean: check_systeminc
63
	@$(MAKE) $(APPMAKEFLAGS) -C $(BUILDDIR) -f $(abspath $(SRCDIR)/Makefile) clean
66
	@$(MAKE) $(APPMAKEFLAGS) -C $(BUILDDIR) -f $(abspath $(SRCDIR)/Makefile) clean
64
 
67
 
65
cleanbios: check_binaries
68
cleanbios: check_systeminc
66
	@$(MAKE) $(BIOSMAKEFLAGS) -C $(BIOSDIR) -f $(abspath $(BIOSSRCDIR)/Makefile) clean
69
	@$(MAKE) $(BIOSMAKEFLAGS) -C $(BIOSDIR) -f $(abspath $(BIOSSRCDIR)/Makefile) clean
67
 
70
 
68
distclean: check_binaries
71
distclean: check_systeminc
69
	@$(ECHO) $(MSG_CLEANING)
72
	@$(ECHO) $(MSG_CLEANING)
70
	$(RM) -r $(BUILDDIR)
73
	$(RM) -r $(BUILDDIR)
71
	$(RM) -r $(BIOSDIR)
74
	$(RM) -r $(BIOSDIR)
72
 
75
 
73
sethwid:
76
setconfig: check_systeminc
74
	@$(PERL) ../../../../PcSoftware/scripts/SetHwId/SetHwId.pl
77
	@$(SETCONF) $(CANULFLAGS)
75
 
78
 
76
check_binaries:
79
check_systeminc:
77
ifndef MKDIR
80
ifndef SETCONF
78
	@echo 
81
	@echo 
79
	@echo ERROR! This is because you have not defined build-binaries in system.inc
82
	@echo ERROR! This is because your system.inc is out of date
80
	@echo Please update system.inc.template from SVN and then copy the build binaries definitions to your system.inc
83
	@echo Please update system.inc.template from SVN and then diff with your system.inc and add the appropriate settings
81
	@echo 
84
	@echo 
82
	@false
85
	@false
83
endif
86
endif
84
 
87
 
85
# Listing of phony targets.
88
# Listing of phony targets.
86
.PHONY : all bios installbios upgradebios \
89
.PHONY : all bios installbios upgradebios defaultbios \
87
install reset start \
90
install reset start \
88
clean cleanbios distclean check_binaries sethwid
91
clean cleanbios distclean check_systeminc setconfig
89
 
92