Subversion Repositories HomeAutomation

Rev

Rev 903 | Rev 1639 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | SVN | RSS feed

Rev 903 Rev 1638
Line 31... Line 31...
31
MSG_CLEANING = Cleaning project:
31
MSG_CLEANING = Cleaning project:
32
MSG_CREATEDIR = Creating directory:
32
MSG_CREATEDIR = Creating directory:
33
 
33
 
34
 
34
 
35
# Default target.
35
# Default target.
36
all: check_binaries $(abspath $(BUILDDIR))
36
all: check_systeminc $(abspath $(BUILDDIR))
37
	@$(MAKE) $(APPMAKEFLAGS) -C $(BUILDDIR) -f $(abspath $(SRCDIR)/Makefile) all
37
	@$(MAKE) $(APPMAKEFLAGS) -C $(BUILDDIR) -f $(abspath $(SRCDIR)/Makefile) all
38
 
38
 
39
bios: check_binaries $(abspath $(BIOSDIR))
39
bios: check_systeminc $(abspath $(BIOSDIR))
40
	@$(MAKE) $(BIOSMAKEFLAGS) -C $(BIOSDIR) -f $(abspath $(BIOSSRCDIR)/Makefile) all
40
	@$(MAKE) $(BIOSMAKEFLAGS) -C $(BIOSDIR) -f $(abspath $(BIOSSRCDIR)/Makefile) all
41
 
41
 
42
installbios: bios
42
installbios: bios
43
	$(UPLOAD) $(ULFLAGS)
43
	$(UPLOAD) $(ULFLAGS)
44
 
44
 
Line 52... Line 52...
52
	$(CANUPLOAD) $(CANULFLAGS) -n $(NODE_ID) -i $(NODE_HW_ID) -r
52
	$(CANUPLOAD) $(CANULFLAGS) -n $(NODE_ID) -i $(NODE_HW_ID) -r
53
 
53
 
54
start: 
54
start: 
55
	$(CANUPLOAD) $(CANULFLAGS) -n $(NODE_ID) -i $(NODE_HW_ID) -s
55
	$(CANUPLOAD) $(CANULFLAGS) -n $(NODE_ID) -i $(NODE_HW_ID) -s
56
 
56
 
57
$(BUILDDIR)/$(TARGET).hex: check_binaries $(abspath $(BUILDDIR))
57
$(BUILDDIR)/$(TARGET).hex: check_systeminc $(abspath $(BUILDDIR))
58
	@$(MAKE) $(APPMAKEFLAGS) -C $(BUILDDIR) -f $(abspath $(SRCDIR)/Makefile) $(TARGET).hex
58
	@$(MAKE) $(APPMAKEFLAGS) -C $(BUILDDIR) -f $(abspath $(SRCDIR)/Makefile) $(TARGET).hex
59
 
59
 
60
$(abspath $(BUILDDIR) $(BIOSDIR)): check_binaries
60
$(abspath $(BUILDDIR) $(BIOSDIR)): check_systeminc
61
	@echo $(MSG_CREATEDIR) $@
61
	@echo $(MSG_CREATEDIR) $@
62
	@$(MKDIR) -p $@
62
	@$(MKDIR) -p $@
63
 
63
 
64
# Target: clean project.
64
# Target: clean project.
65
clean: check_binaries
65
clean: check_systeminc
66
	@$(MAKE) $(APPMAKEFLAGS) -C $(BUILDDIR) -f $(abspath $(SRCDIR)/Makefile) clean
66
	@$(MAKE) $(APPMAKEFLAGS) -C $(BUILDDIR) -f $(abspath $(SRCDIR)/Makefile) clean
67
 
67
 
68
cleanbios: check_binaries
68
cleanbios: check_systeminc
69
	@$(MAKE) $(BIOSMAKEFLAGS) -C $(BIOSDIR) -f $(abspath $(BIOSSRCDIR)/Makefile) clean
69
	@$(MAKE) $(BIOSMAKEFLAGS) -C $(BIOSDIR) -f $(abspath $(BIOSSRCDIR)/Makefile) clean
70
 
70
 
71
distclean: check_binaries
71
distclean: check_systeminc
72
	@echo $(MSG_CLEANING)
72
	@echo $(MSG_CLEANING)
73
	$(RM) -r $(BUILDDIR)
73
	$(RM) -r $(BUILDDIR)
74
	$(RM) -r $(BIOSDIR)
74
	$(RM) -r $(BIOSDIR)
75
 
75
 
76
sethwid:
76
setconfig: check_systeminc
77
	@$(PERL) ../../../../PcSoftware/scripts/SetHwId/SetHwId.pl
77
	@$(SETCONF) $(CANULFLAGS)
78
 
78
 
79
check_binaries:
79
check_systeminc:
80
ifndef MKDIR
80
ifndef SETCONF
81
	@echo 
81
	@echo 
82
	@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
83
	@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
84
	@echo 
84
	@echo 
85
	@false
85
	@false
86
endif
86
endif
87
 
87
 
88
# Listing of phony targets.
88
# Listing of phony targets.
89
.PHONY : all bios installbios upgradebios \
89
.PHONY : all bios installbios upgradebios \
90
install reset start \
90
install reset start \
91
clean cleanbios distclean check_binaries sethwid
91
clean cleanbios distclean check_systeminc sethwid
92
 
92