Rev 890 | Rev 903 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | SVN | RSS feed
| Rev 890 | Rev 891 | ||
|---|---|---|---|
| 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: $(abspath $(BUILDDIR)) |
36 | all: check_binaries $(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: $(abspath $(BIOSDIR)) |
39 | bios: check_binaries $(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: $(abspath $(BUILDDIR)) |
57 | $(BUILDDIR)/$(TARGET).hex: check_binaries $(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)): |
60 | $(abspath $(BUILDDIR) $(BIOSDIR)): check_binaries |
| 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: |
65 | clean: check_binaries |
| 66 | @$(MAKE) $(APPMAKEFLAGS) -C $(BUILDDIR) -f $(abspath $(SRCDIR)/Makefile) clean |
66 | @$(MAKE) $(APPMAKEFLAGS) -C $(BUILDDIR) -f $(abspath $(SRCDIR)/Makefile) clean |
| 67 | 67 | ||
| 68 | cleanbios: |
68 | cleanbios: check_binaries |
| 69 | @$(MAKE) $(BIOSMAKEFLAGS) -C $(BIOSDIR) -f $(abspath $(BIOSSRCDIR)/Makefile) clean |
69 | @$(MAKE) $(BIOSMAKEFLAGS) -C $(BIOSDIR) -f $(abspath $(BIOSSRCDIR)/Makefile) clean |
| 70 | 70 | ||
| 71 | distclean: |
71 | distclean: check_binaries |
| 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 | ||
| - | 76 | check_binaries: |
|
| - | 77 | ifndef MKDIR |
|
| - | 78 | @echo |
|
| - | 79 | @echo ERROR! This is because you have not defined build-binaries in system.inc |
|
| - | 80 | @echo Please update system.inc.template from SVN and then copy the build binaries definitions to your system.inc |
|
| - | 81 | @echo |
|
| - | 82 | @false |
|
| - | 83 | endif |
|
| 75 | 84 | ||
| 76 | # Listing of phony targets. |
85 | # Listing of phony targets. |
| 77 | .PHONY : all bios installbios upgradebios \ |
86 | .PHONY : all bios installbios upgradebios \ |
| 78 | install reset start \ |
87 | install reset start \ |
| 79 | clean cleanbios distclean |
88 | clean cleanbios distclean check_binaries |
| 80 | 89 | ||