?? makefile
字號:
############################################################################### MODULE: JN-AN-1067-Jenie-Wireless Sensor Network# AUTHOR: Mike Royce based upon 1061 Template# Modified by Simon Barfield## DESCRIPTION: Makefile for building Jenie Wireless Sensor Network############################################################################### This software is owned by Jennic and/or its supplier and is protected# under applicable copyright laws. All rights are reserved. We grant You,# and any third parties, a license to use this software solely and# exclusively on Jennic products. You, and any third parties must reproduce# the copyright and warranty notice and any other legend of ownership on each# copy or partial copy of the software.## THIS SOFTWARE IS PROVIDED "AS IS". JENNIC MAKES NO WARRANTIES, WHETHER# EXPRESS, IMPLIED OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE,# ACCURACY OR LACK OF NEGLIGENCE. JENNIC SHALL NOT, IN ANY CIRCUMSTANCES,# BE LIABLE FOR ANY DAMAGES, INCLUDING, BUT NOT LIMITED TO, SPECIAL,# INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR ANY REASON WHATSOEVER.## (c) Copyright 2007, Jennic Limited############################################################################################################################################################ Application configuration############################################################################## default network implementationJENIE_IMPL ?= JN# default buildDEBUG ?= NO# default target chip#JENNIC_CHIP ?= JN5139R1JENNIC_CHIP ?= JN5139# Application base directoryAPP_BASE ?= ..# Application sub-directoriesAPP_SRC ?= $(APP_BASE)/SourceAPP_PUB ?= $(APP_BASE)/IncludeAPP_LIB ?= $(APP_BASE)/LibraryAPP_BUILD ?= $(APP_BASE)/Build# SDK base directoryBASE_DIR ?= ../../..# Jenie directory, normally .../SDK/JenieJENIE_BASE ?= $(BASE_DIR)/JenieJENIE_APP_MK ?= $(JENIE_BASE)/Library/JenieAppConfig.mk# target base names, these will be decorated to give the binary file names # below. you can replace these with the target names for your specific # applicationCOORDINATOR := CoordinatorROUTER := RouterENDDEVICE := EndDevice# include the common configuration# this makefile fragment declares a number of variables, such as# $(JENIE_LIB_COORDINATOR) $(JENIE_LIB_ROUTER) $(JENIE_LIB_ENDDEVICE)# it also sets up 'all' as the default targetinclude $(JENIE_APP_MK)########################################################################## Add all of the build objects here# (these will be built from the corresponding .c or .S files)#########################################################################OBJS_COMMON = $(APP_SRC)/Network.oOBJS_COMMON += $(APP_SRC)/Sensor.oOBJS_COMMON += $(UTILITIES_SRC)/Printf.oOBJS_COMMON += $(UTILITIES_SRC)/NumToString.oOBJS_COORDINATOR = $(APP_SRC)/Coordinator.o $(OBJS_COMMON)OBJS_ROUTER = $(APP_SRC)/Router.o $(OBJS_COMMON)OBJS_ENDDEVICE = $(APP_SRC)/EndDevice.o $(OBJS_COMMON)# list all objects, used for dependancy generation and clean ruleOBJS = $(sort $(OBJS_COORDINATOR) $(OBJS_ROUTER) $(OBJS_ENDDEVICE) )########################################################################## Top level targets# You can modify and add to these to suit your specific application#########################################################################SHORT_CHIP := $(subst JN,,$(JENNIC_CHIP))TARGET_COORDINATOR := $(APP_BUILD)/$(SHORT_CHIP)_Jenie$(JENIE_IMPL)_$(COORDINATOR)TARGET_ROUTER := $(APP_BUILD)/$(SHORT_CHIP)_Jenie$(JENIE_IMPL)_$(ROUTER)TARGET_ENDDEVICE := $(APP_BUILD)/$(SHORT_CHIP)_Jenie$(JENIE_IMPL)_$(ENDDEVICE)all: $(TARGET_COORDINATOR).bin $(TARGET_ROUTER).bin $(TARGET_ENDDEVICE).bin.PHONEY: all$(TARGET_COORDINATOR).ba: $(OBJS_COORDINATOR) $(JENIE_LIB_COORDINATOR)$(TARGET_ROUTER).ba: $(OBJS_ROUTER) $(JENIE_LIB_ROUTER)$(TARGET_ENDDEVICE).ba: $(OBJS_ENDDEVICE) $(JENIE_LIB_ENDDEVICE)########################################################################## General build rules# You should not need to modify below this line#########################################################################-include $(OBJS:.o=.d)%.d: # if .d is missing then force rebuilding of .o @rm -f $*.o%.o: %.c $(CC) -c -o $*.o $(CFLAGS) $(INCFLAGS) $< -MD -MF $*.d -MP%.o: %.S $(CC) -c -o $*.o $(ASFLAGS) $< -MD -MF $*.d -MP%.bin: %.ba $(OBJCOPY) -S -O binary $< $@%.ba: $(LD) -L$(STACK_BLD) -T$(LINKER_FILE) -o $@ $(LDFLAGS) $^clean: rm -f $(OBJS) $(OBJS:.o=.d) *.bin *.ba.PHONEY: clean#########################################################################
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -