| 71 | | #use embedded specific map flags |
|---|
| 72 | | $(1)_MAP_FLAGS = $$(MAP_FLAGS_EMB) |
|---|
| 73 | | #In embedded we need s19, hex and bin |
|---|
| 74 | | $$(OUTDIR)/$(1).tgt : $$(OUTDIR)/$(1).s19 $$(OUTDIR)/$(1).hex $$(OUTDIR)/$(1).bin |
|---|
| | 71 | #use embedded specific map flags |
|---|
| | 72 | $(1)_MAP_FLAGS = $$(MAP_FLAGS_EMB) |
|---|
| | 73 | #In embedded we need s19, hex and bin |
|---|
| | 74 | $$(OUTDIR)/$(1).tgt : $$(OUTDIR)/$(1).s19 $$(OUTDIR)/$(1).hex $$(OUTDIR)/$(1).bin |
|---|
| 76 | | #On Darwin architecture the assembly doesn't link correctly if this flag is set. |
|---|
| 77 | | ifeq ($(shell uname | grep -c "Darwin"),1) |
|---|
| 78 | | LIST_FLAGS := "" |
|---|
| 79 | | MAP_FLAGS := "" |
|---|
| 80 | | LDFLAGS := "" |
|---|
| 81 | | endif |
|---|
| 82 | | #use hosted specific map flags |
|---|
| 83 | | $(1)_MAP_FLAGS = $$(MAP_FLAGS_HOST) |
|---|
| 84 | | #in hosted application we need only executable file. |
|---|
| 85 | | $$(OUTDIR)/$(1).tgt : $$(OUTDIR)/$(1) |
|---|
| | 76 | #On Darwin architecture the assembly doesn't link correctly if this flag is set. |
|---|
| | 77 | ifeq ($(shell uname | grep -c "Darwin"),1) |
|---|
| | 78 | LIST_FLAGS := "" |
|---|
| | 79 | MAP_FLAGS := "" |
|---|
| | 80 | LDFLAGS := "" |
|---|
| | 81 | endif |
|---|
| | 82 | #use hosted specific map flags |
|---|
| | 83 | $(1)_MAP_FLAGS = $$(MAP_FLAGS_HOST) |
|---|
| | 84 | #in hosted application we need only executable file. |
|---|
| | 85 | $$(OUTDIR)/$(1).tgt : $$(OUTDIR)/$(1) |
|---|
| 103 | | $(1)_CFLAGS += $$($(1)_MCPU) |
|---|
| 104 | | $(1)_CXXFLAGS += $$($(1)_MCPU) |
|---|
| 105 | | $(1)_ASFLAGS += $$($(1)_MCPU) |
|---|
| 106 | | $(1)_CPPAFLAGS += $$($(1)_MCPU) |
|---|
| 107 | | $(1)_LDFLAGS += $$($(1)_MCPU) |
|---|
| | 103 | $(1)_CFLAGS += $$($(1)_MCPU) |
|---|
| | 104 | $(1)_CXXFLAGS += $$($(1)_MCPU) |
|---|
| | 105 | $(1)_ASFLAGS += $$($(1)_MCPU) |
|---|
| | 106 | $(1)_CPPAFLAGS += $$($(1)_MCPU) |
|---|
| | 107 | $(1)_LDFLAGS += $$($(1)_MCPU) |
|---|
| 116 | | # AVR is an harvard processor |
|---|
| 117 | | # and needs debug module |
|---|
| 118 | | # to be compiled in program memory |
|---|
| 119 | | ifeq ($$(findstring avr, $$($(1)_CROSS)),avr) |
|---|
| 120 | | $(1)_DEBUGSRC = $(1)_PCSRC |
|---|
| 121 | | else |
|---|
| 122 | | $(1)_DEBUGSRC = $(1)_CSRC |
|---|
| 123 | | endif |
|---|
| 124 | | |
|---|
| 125 | | $$($(1)_DEBUGSRC) += bertos/drv/kdebug.c |
|---|
| 126 | | |
|---|
| 127 | | # Also add formatwr.c (printf) if not already present |
|---|
| 128 | | ifneq ($$(findstring formatwr.c, $$($$($(1)_DEBUGSRC))),formatwr.c) |
|---|
| 129 | | $$($(1)_DEBUGSRC) += bertos/mware/formatwr.c |
|---|
| 130 | | endif |
|---|
| 131 | | |
|---|
| 132 | | $(1)_CFLAGS += -D_DEBUG |
|---|
| 133 | | $(1)_CXXFLAGS += -D_DEBUG |
|---|
| | 116 | # AVR is an harvard processor |
|---|
| | 117 | # and needs debug module |
|---|
| | 118 | # to be compiled in program memory |
|---|
| | 119 | ifeq ($$(findstring avr, $$($(1)_CROSS)),avr) |
|---|
| | 120 | $(1)_DEBUGSRC = $(1)_PCSRC |
|---|
| | 121 | else |
|---|
| | 122 | $(1)_DEBUGSRC = $(1)_CSRC |
|---|
| | 123 | endif |
|---|
| | 124 | |
|---|
| | 125 | $$($(1)_DEBUGSRC) += bertos/drv/kdebug.c |
|---|
| | 126 | |
|---|
| | 127 | # Also add formatwr.c (printf) if not already present |
|---|
| | 128 | ifneq ($$(findstring formatwr.c, $$($$($(1)_DEBUGSRC))),formatwr.c) |
|---|
| | 129 | $$($(1)_DEBUGSRC) += bertos/mware/formatwr.c |
|---|
| | 130 | endif |
|---|
| | 131 | |
|---|
| | 132 | $(1)_CFLAGS += -D_DEBUG |
|---|
| | 133 | $(1)_CXXFLAGS += -D_DEBUG |
|---|