Using environment variables LKROOT and LKINC you can specify multiple parallel top level directories (outside of the lk root) that are overlayed on top of the build system. This allows for a structure like lk/ testproject/ someotherfirmware/ Where each of these subdirs has an entire overlayed tree of libraries, platforms, targets, and projects. To accomplish this, copy makefile into the root dir and build a lk_inc.mk that sets LKROOT and LKINC.
36 lines
999 B
Makefile
36 lines
999 B
Makefile
# comment out or override if you want to see the full output of each command
|
|
NOECHO ?= @
|
|
|
|
$(OUTBIN): $(OUTELF)
|
|
@echo generating image: $@
|
|
$(NOECHO)$(SIZE) $<
|
|
$(NOECHO)$(OBJCOPY) -O binary $< $@
|
|
|
|
$(OUTELF).hex: $(OUTELF)
|
|
@echo generating hex file: $@
|
|
$(NOECHO)$(OBJCOPY) -O ihex $< $@
|
|
|
|
$(OUTELF): $(ALLMODULE_OBJS) $(EXTRA_OBJS) $(LINKER_SCRIPT)
|
|
@echo linking $@
|
|
$(NOECHO)$(SIZE) -t --common $(sort $(ALLMODULE_OBJS))
|
|
$(NOECHO)$(LD) $(GLOBAL_LDFLAGS) -T $(LINKER_SCRIPT) $(ALLMODULE_OBJS) $(EXTRA_OBJS) $(LIBGCC) -o $@
|
|
|
|
$(OUTELF).sym: $(OUTELF)
|
|
@echo generating symbols: $@
|
|
$(NOECHO)$(OBJDUMP) -t $< | $(CPPFILT) > $@
|
|
|
|
$(OUTELF).lst: $(OUTELF)
|
|
@echo generating listing: $@
|
|
$(NOECHO)$(OBJDUMP) -Mreg-names-raw -d $< | $(CPPFILT) > $@
|
|
|
|
$(OUTELF).debug.lst: $(OUTELF)
|
|
@echo generating listing: $@
|
|
$(NOECHO)$(OBJDUMP) -Mreg-names-raw -S $< | $(CPPFILT) > $@
|
|
|
|
$(OUTELF).size: $(OUTELF)
|
|
@echo generating size map: $@
|
|
$(NOECHO)$(NM) -S --size-sort $< > $@
|
|
|
|
#include arch/$(ARCH)/compile.mk
|
|
|