Rev 890 | Rev 1855 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | SVN | RSS feed
| Rev 890 | Rev 891 | ||
|---|---|---|---|
| Line 1... | Line 1... | ||
| 1 | # $Id: Makefile |
1 | # $Id: Makefile 891 2008-07-17 09:39:09Z arune $ |
| 2 | BIOS_VERSION = 0x1339 |
2 | BIOS_VERSION = 0x1339 |
| 3 | 3 | ||
| 4 | # Paths: set default pathnames if they are not |
4 | # Paths: set default pathnames if they are not |
| 5 | # passed on from parent Makefile. |
5 | # passed on from parent Makefile. |
| 6 | ifndef TARGET |
6 | ifndef TARGET |
| Line 17... | Line 17... | ||
| 17 | endif |
17 | endif |
| 18 | LIBNAME = lib$(TARGET) |
18 | LIBNAME = lib$(TARGET) |
| 19 | 19 | ||
| 20 | include $(CFGDIR)/bios.inc |
20 | include $(CFGDIR)/bios.inc |
| 21 | include $(CFGDIR)/../system.inc |
21 | include $(CFGDIR)/../system.inc |
| 22 | - | ||
| 23 | ifndef AWK |
- | |
| 24 | STOP! This is because you have not defined build-binaries in system.inc |
- | |
| 25 | Please update system.inc.template from SVN and then copy the build binaries definitions to your system.inc |
- | |
| 26 | endif |
- | |
| 27 | 22 | ||
| 28 | # VPATH: setup search path for source files. |
23 | # VPATH: setup search path for source files. |
| 29 | vpath |
24 | vpath |
| 30 | vpath %.c $(SRCDIR):$(LIBDIR) |
25 | vpath %.c $(SRCDIR):$(LIBDIR) |
| 31 | vpath %.S $(SRCDIR):$(LIBDIR) |
26 | vpath %.S $(SRCDIR):$(LIBDIR) |
| Line 104... | Line 99... | ||
| 104 | # and function names needs to be present in the assembler source |
99 | # and function names needs to be present in the assembler source |
| 105 | # files -- see avr-libc docs [FIXME: not yet described there] |
100 | # files -- see avr-libc docs [FIXME: not yet described there] |
| 106 | ##ASFLAGS = -Wa,-adhlns=$(<:.S=.lst),-gstabs |
101 | ##ASFLAGS = -Wa,-adhlns=$(<:.S=.lst),-gstabs |
| 107 | ASFLAGS = -mmcu=$(MCU) -x assembler-with-cpp |
102 | ASFLAGS = -mmcu=$(MCU) -x assembler-with-cpp |
| 108 | ASFLAGS += -Wa,-g$(DEBUG) |
103 | ASFLAGS += -Wa,-g$(DEBUG) |
| 109 | 104 | ||
| 110 | 105 | ||
| 111 | #Additional libraries. |
106 | #Additional libraries. |
| 112 | 107 | ||
| 113 | # Minimalistic printf version |
108 | # Minimalistic printf version |
| 114 | PRINTF_LIB_MIN = -Wl,-u,vfprintf -lprintf_min |
109 | PRINTF_LIB_MIN = -Wl,-u,vfprintf -lprintf_min |
| Line 185... | Line 180... | ||
| 185 | 180 | ||
| 186 | BUILDDIRS = $(sort $(filter-out ./,$(dir $(OBJ)))) |
181 | BUILDDIRS = $(sort $(filter-out ./,$(dir $(OBJ)))) |
| 187 | 182 | ||
| 188 | # Compiler flags to generate dependency files. |
183 | # Compiler flags to generate dependency files. |
| 189 | GENDEPFLAGS = -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" |
184 | GENDEPFLAGS = -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" |
| 190 | 185 | ||
| 191 | check_binaries: |
- | |
| 192 | ifndef AWK |
- | |
| 193 | @echo |
- | |
| 194 | @echo ERROR! This is because you have not defined build-binaries in system.inc |
- | |
| 195 | @echo Please update system.inc.template from SVN and then copy the build binaries definitions to your system.inc |
- | |
| 196 | @echo |
- | |
| 197 | @false |
- | |
| 198 | endif |
- | |
| 199 | - | ||
| 200 | # Default target. |
186 | # Default target. |
| 201 | all: check_binaries sizebefore buildtree build lib sizeafter |
187 | all: check_binaries sizebefore buildtree build lib sizeafter |
| 202 | 188 | ||
| 203 | build: elf hex eep lss sym |
189 | build: elf hex eep lss sym |
| 204 | 190 | ||
| Line 348... | Line 334... | ||
| 348 | $(RM) $(DEP) |
334 | $(RM) $(DEP) |
| 349 | $(RM) $(LST) |
335 | $(RM) $(LST) |
| 350 | $(RM) $(LIBNAME).S |
336 | $(RM) $(LIBNAME).S |
| 351 | $(RM) config.h |
337 | $(RM) config.h |
| 352 | $(RM) -r drivers |
338 | $(RM) -r drivers |
| - | 339 | ||
| - | 340 | check_binaries: |
|
| - | 341 | ifndef AWK |
|
| - | 342 | @echo |
|
| - | 343 | @echo ERROR! This is because you have not defined build-binaries in system.inc |
|
| - | 344 | @echo Please update system.inc.template from SVN and then copy the build binaries definitions to your system.inc |
|
| - | 345 | @echo |
|
| - | 346 | @false |
|
| - | 347 | endif |
|
| 353 | 348 | ||
| 354 | # Include the dependency files. |
349 | # Include the dependency files. |
| 355 | ifneq ($(MAKECMDGOALS),clean) |
350 | ifneq ($(MAKECMDGOALS),clean) |
| 356 | ifneq ($(strip $(DEP)),) |
351 | ifneq ($(strip $(DEP)),) |
| 357 | -include $(DEP) |
352 | -include $(DEP) |