FRDM K64F Metronome

Committer:
ram54288
Date:
Sun May 14 18:35:07 2017 +0000
Revision:
0:a2cb7295a1f7
Initial commit

Who changed what in which revision?

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