FRDM K64F Metronome

Committer:
ram54288
Date:
Sun May 14 18:37:05 2017 +0000
Revision:
0:dbad57390bd1
Initial commit

Who changed what in which revision?

UserRevisionLine numberNew contents of line
ram54288 0:dbad57390bd1 1 #
ram54288 0:dbad57390bd1 2 # Makefile for mbed Client C++ Library
ram54288 0:dbad57390bd1 3 #
ram54288 0:dbad57390bd1 4 # List of subdirectories to build
ram54288 0:dbad57390bd1 5 TEST_FOLDER := ./test/
ram54288 0:dbad57390bd1 6
ram54288 0:dbad57390bd1 7 # Define compiler toolchain with CC or PLATFORM variables
ram54288 0:dbad57390bd1 8 # Example (GCC toolchains, default $CC and $AR are used)
ram54288 0:dbad57390bd1 9 # make
ram54288 0:dbad57390bd1 10 #
ram54288 0:dbad57390bd1 11 # OR (Cross-compile GCC toolchain)
ram54288 0:dbad57390bd1 12 # make PLATFORM=arm-linux-gnueabi-
ram54288 0:dbad57390bd1 13 #
ram54288 0:dbad57390bd1 14 # OR (ArmCC/Keil)
ram54288 0:dbad57390bd1 15 # make CC=ArmCC AR=ArmAR
ram54288 0:dbad57390bd1 16 #
ram54288 0:dbad57390bd1 17 # OR (IAR-ARM)
ram54288 0:dbad57390bd1 18 # make CC=iccarm
ram54288 0:dbad57390bd1 19
ram54288 0:dbad57390bd1 20 LIB = libmbedclient.a
ram54288 0:dbad57390bd1 21
ram54288 0:dbad57390bd1 22 # List of unit test directories for libraries
ram54288 0:dbad57390bd1 23 UNITTESTS := $(sort $(dir $(wildcard $(TEST_FOLDER)*/utest/*)))
ram54288 0:dbad57390bd1 24
ram54288 0:dbad57390bd1 25 # If configuration is not specified, use linux
ram54288 0:dbad57390bd1 26 ifeq (,$(CONFIG))
ram54288 0:dbad57390bd1 27 CONFIG := linux
ram54288 0:dbad57390bd1 28 endif
ram54288 0:dbad57390bd1 29
ram54288 0:dbad57390bd1 30 include sources.mk
ram54288 0:dbad57390bd1 31 include include_dirs.mk
ram54288 0:dbad57390bd1 32 include config/$(CONFIG).mk
ram54288 0:dbad57390bd1 33
ram54288 0:dbad57390bd1 34 SERVLIB_DIR := ../../libService
ram54288 0:dbad57390bd1 35 NSDL_C_DIR := ../../nsdl-c
ram54288 0:dbad57390bd1 36 override CFLAGS += -I$(SERVLIB_DIR)/libService
ram54288 0:dbad57390bd1 37 override CFLAGS += -I$(NSDL_C_DIR)/nsdl-c
ram54288 0:dbad57390bd1 38 override CFLAGS += $(addprefix -I,$(INCLUDE_DIRS))
ram54288 0:dbad57390bd1 39 override CFLAGS += $(addprefix -D,$(FLAGS))
ram54288 0:dbad57390bd1 40 ifeq ($(DEBUG),1)
ram54288 0:dbad57390bd1 41 override CFLAGS += -DHAVE_DEBUG
ram54288 0:dbad57390bd1 42 endif
ram54288 0:dbad57390bd1 43
ram54288 0:dbad57390bd1 44 COVERAGEFILE := ./lcov/coverage.info
ram54288 0:dbad57390bd1 45
ram54288 0:dbad57390bd1 46 #
ram54288 0:dbad57390bd1 47 # Define compiler toolchain
ram54288 0:dbad57390bd1 48 #
ram54288 0:dbad57390bd1 49 include ../../libService/toolchain_rules.mk
ram54288 0:dbad57390bd1 50
ram54288 0:dbad57390bd1 51 $(eval $(call generate_rules,$(LIB),$(SRCS)))
ram54288 0:dbad57390bd1 52
ram54288 0:dbad57390bd1 53 # Extend default clean rule
ram54288 0:dbad57390bd1 54 clean: clean-extra
ram54288 0:dbad57390bd1 55
ram54288 0:dbad57390bd1 56 $(CLEANDIRS):
ram54288 0:dbad57390bd1 57 @make -C $(@:clean-%=%) clean
ram54288 0:dbad57390bd1 58
ram54288 0:dbad57390bd1 59 clean-extra: $(CLEANDIRS)