Rev 890 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | SVN | RSS feed
| Rev 890 | Rev 891 | ||
|---|---|---|---|
| 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: $(abspath $(BUILDDIR)) |
33 | all: check_binaries $(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: $(abspath $(BIOSDIR)) |
36 | bios: check_binaries $(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 | ||
| Line 49... | Line 49... | ||
| 49 | $(CANUPLOAD) $(CANULFLAGS) -n $(NODE_ID) -i $(NODE_HW_ID) -r |
49 | $(CANUPLOAD) $(CANULFLAGS) -n $(NODE_ID) -i $(NODE_HW_ID) -r |
| 50 | 50 | ||
| 51 | start: |
51 | start: |
| 52 | $(CANUPLOAD) $(CANULFLAGS) -n $(NODE_ID) -i $(NODE_HW_ID) -s |
52 | $(CANUPLOAD) $(CANULFLAGS) -n $(NODE_ID) -i $(NODE_HW_ID) -s |
| 53 | 53 | ||
| 54 | $(BUILDDIR)/$(TARGET).hex: $(abspath $(BUILDDIR)) |
54 | $(BUILDDIR)/$(TARGET).hex: check_binaries $(abspath $(BUILDDIR)) |
| 55 | @$(MAKE) $(APPMAKEFLAGS) -C $(BUILDDIR) -f $(abspath $(SRCDIR)/Makefile) $(TARGET).hex |
55 | @$(MAKE) $(APPMAKEFLAGS) -C $(BUILDDIR) -f $(abspath $(SRCDIR)/Makefile) $(TARGET).hex |
| 56 | 56 | ||
| 57 | $(abspath $(BUILDDIR) $(BIOSDIR)): |
57 | $(abspath $(BUILDDIR) $(BIOSDIR)): check_binaries |
| 58 | @$(ECHO) $(MSG_CREATEDIR) $@ |
58 | @$(ECHO) $(MSG_CREATEDIR) $@ |
| 59 | @$(MKDIR) -p $@ |
59 | @$(MKDIR) -p $@ |
| 60 | 60 | ||
| 61 | # Target: clean project. |
61 | # Target: clean project. |
| 62 | clean: |
62 | clean: check_binaries |
| 63 | @$(MAKE) $(APPMAKEFLAGS) -C $(BUILDDIR) -f $(abspath $(SRCDIR)/Makefile) clean |
63 | @$(MAKE) $(APPMAKEFLAGS) -C $(BUILDDIR) -f $(abspath $(SRCDIR)/Makefile) clean |
| 64 | 64 | ||
| 65 | cleanbios: |
65 | cleanbios: check_binaries |
| 66 | @$(MAKE) $(BIOSMAKEFLAGS) -C $(BIOSDIR) -f $(abspath $(BIOSSRCDIR)/Makefile) clean |
66 | @$(MAKE) $(BIOSMAKEFLAGS) -C $(BIOSDIR) -f $(abspath $(BIOSSRCDIR)/Makefile) clean |
| 67 | 67 | ||
| 68 | distclean: |
68 | distclean: check_binaries |
| 69 | @$(ECHO) $(MSG_CLEANING) |
69 | @$(ECHO) $(MSG_CLEANING) |
| 70 | $(RM) -r $(BUILDDIR) |
70 | $(RM) -r $(BUILDDIR) |
| 71 | $(RM) -r $(BIOSDIR) |
71 | $(RM) -r $(BIOSDIR) |
| - | 72 | ||
| - | 73 | check_binaries: |
|
| - | 74 | ifndef MKDIR |
|
| - | 75 | @echo |
|
| - | 76 | @echo ERROR! This is because you have not defined build-binaries in system.inc |
|
| - | 77 | @echo Please update system.inc.template from SVN and then copy the build binaries definitions to your system.inc |
|
| - | 78 | @echo |
|
| - | 79 | @false |
|
| - | 80 | endif |
|
| 72 | 81 | ||
| 73 | # Listing of phony targets. |
82 | # Listing of phony targets. |
| 74 | .PHONY : all bios installbios upgradebios \ |
83 | .PHONY : all bios installbios upgradebios \ |
| 75 | install reset start \ |
84 | install reset start \ |
| 76 | clean cleanbios distclean |
85 | clean cleanbios distclean check_binaries |
| 77 | 86 | ||