| # Copyright 2014 by Nest Labs, Inc. All rights reserved. |
| # |
| # This program is confidential and proprietary to Nest Labs, Inc., |
| # and may not be reproduced, published or disclosed to others without |
| # company authorization. |
| # |
| |
| include Makefile.config |
| |
| OUTDIR = ./objs |
| |
| -include $(FREERTOS_CONFIG_FILE) |
| |
| ifeq ($(FreeRTOSVer),) |
| FreeRTOSVer=7.2.0 |
| endif |
| |
| ifneq ($(FREERTOS_CONFIG),) |
| include configs/$(FREERTOS_CONFIG)/config.mak |
| INC_DIRS += configs/$(FREERTOS_CONFIG)/$(FreeRTOSVer) |
| endif |
| |
| FreeRTOS_SRC_BASE = FreeRTOSV$(FreeRTOSVer)/FreeRTOS/Source |
| |
| VPATH += \ |
| $(FreeRTOS_SRC_BASE) \ |
| $(FreeRTOS_SRC_BASE)/portable/MemMang \ |
| $(FreeRTOS_SRC_BASE)/portable/$(PORTABLE_TOOL)/$(PORTABLE_ARCH) |
| |
| include FreeRTOS.versions/$(FreeRTOSVer)/versions.mk |
| |
| OBJECTS = $(KernelSourcesVersion:%.c=$(OUTDIR)/%.o) |
| |
| INC_DIRS += \ |
| $(FreeRTOS_SRC_BASE)/include \ |
| $(FreeRTOS_SRC_BASE)/portable/$(PORTABLE_TOOL)/$(PORTABLE_ARCH) \ |
| $(EXTRA_INCLUDE_DIRS) |
| |
| CFLAGS += $(INC_DIRS:%=-I%) |
| |
| all: $(OUTDIR) $(LIB_DIR)/libfreertos.a |
| |
| $(OUTDIR): |
| $(Verbose)$(MKDIR) $(OUTDIR) |
| |
| clean: |
| $(Verbose)$(RM) $(OUTDIR) |
| $(Verbose)$(RM) $(LIB_DIR)/libfreertos.a |
| |
| $(OUTDIR)/%.o: %.c $(HEADERS) |
| $(COMPILE) $(CFLAGS) $< -o $@ |
| |
| $(OUTDIR)/libfreertos.a: $(OBJECTS) |
| $(ARCHIVE) $@ $(OBJECTS) |
| $(RANLIB) $@ |
| |
| $(LIB_DIR)/libfreertos.a: $(OUTDIR)/libfreertos.a |
| $(Verbose)$(MKDIR) $(dir $@) |
| $(Verbose)$(CP) $< $@ |