Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
mbed-client/Makefile@0:a7a43371b306, 2017-05-14 (annotated)
- Committer:
- ram54288
- Date:
- Sun May 14 18:40:18 2017 +0000
- Revision:
- 0:a7a43371b306
Initial commit
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| ram54288 | 0:a7a43371b306 | 1 | # |
| ram54288 | 0:a7a43371b306 | 2 | # Makefile for mbed Client C++ Library |
| ram54288 | 0:a7a43371b306 | 3 | # |
| ram54288 | 0:a7a43371b306 | 4 | # List of subdirectories to build |
| ram54288 | 0:a7a43371b306 | 5 | TEST_FOLDER := ./test/ |
| ram54288 | 0:a7a43371b306 | 6 | |
| ram54288 | 0:a7a43371b306 | 7 | # Define compiler toolchain with CC or PLATFORM variables |
| ram54288 | 0:a7a43371b306 | 8 | # Example (GCC toolchains, default $CC and $AR are used) |
| ram54288 | 0:a7a43371b306 | 9 | # make |
| ram54288 | 0:a7a43371b306 | 10 | # |
| ram54288 | 0:a7a43371b306 | 11 | # OR (Cross-compile GCC toolchain) |
| ram54288 | 0:a7a43371b306 | 12 | # make PLATFORM=arm-linux-gnueabi- |
| ram54288 | 0:a7a43371b306 | 13 | # |
| ram54288 | 0:a7a43371b306 | 14 | # OR (ArmCC/Keil) |
| ram54288 | 0:a7a43371b306 | 15 | # make CC=ArmCC AR=ArmAR |
| ram54288 | 0:a7a43371b306 | 16 | # |
| ram54288 | 0:a7a43371b306 | 17 | # OR (IAR-ARM) |
| ram54288 | 0:a7a43371b306 | 18 | # make CC=iccarm |
| ram54288 | 0:a7a43371b306 | 19 | |
| ram54288 | 0:a7a43371b306 | 20 | LIB = libmbedclient.a |
| ram54288 | 0:a7a43371b306 | 21 | |
| ram54288 | 0:a7a43371b306 | 22 | # List of unit test directories for libraries |
| ram54288 | 0:a7a43371b306 | 23 | UNITTESTS := $(sort $(dir $(wildcard $(TEST_FOLDER)*/utest/*))) |
| ram54288 | 0:a7a43371b306 | 24 | |
| ram54288 | 0:a7a43371b306 | 25 | # If configuration is not specified, use linux |
| ram54288 | 0:a7a43371b306 | 26 | ifeq (,$(CONFIG)) |
| ram54288 | 0:a7a43371b306 | 27 | CONFIG := linux |
| ram54288 | 0:a7a43371b306 | 28 | endif |
| ram54288 | 0:a7a43371b306 | 29 | |
| ram54288 | 0:a7a43371b306 | 30 | include sources.mk |
| ram54288 | 0:a7a43371b306 | 31 | include include_dirs.mk |
| ram54288 | 0:a7a43371b306 | 32 | include config/$(CONFIG).mk |
| ram54288 | 0:a7a43371b306 | 33 | |
| ram54288 | 0:a7a43371b306 | 34 | SERVLIB_DIR := ../../libService |
| ram54288 | 0:a7a43371b306 | 35 | NSDL_C_DIR := ../../nsdl-c |
| ram54288 | 0:a7a43371b306 | 36 | override CFLAGS += -I$(SERVLIB_DIR)/libService |
| ram54288 | 0:a7a43371b306 | 37 | override CFLAGS += -I$(NSDL_C_DIR)/nsdl-c |
| ram54288 | 0:a7a43371b306 | 38 | override CFLAGS += $(addprefix -I,$(INCLUDE_DIRS)) |
| ram54288 | 0:a7a43371b306 | 39 | override CFLAGS += $(addprefix -D,$(FLAGS)) |
| ram54288 | 0:a7a43371b306 | 40 | ifeq ($(DEBUG),1) |
| ram54288 | 0:a7a43371b306 | 41 | override CFLAGS += -DHAVE_DEBUG |
| ram54288 | 0:a7a43371b306 | 42 | endif |
| ram54288 | 0:a7a43371b306 | 43 | |
| ram54288 | 0:a7a43371b306 | 44 | COVERAGEFILE := ./lcov/coverage.info |
| ram54288 | 0:a7a43371b306 | 45 | |
| ram54288 | 0:a7a43371b306 | 46 | # |
| ram54288 | 0:a7a43371b306 | 47 | # Define compiler toolchain |
| ram54288 | 0:a7a43371b306 | 48 | # |
| ram54288 | 0:a7a43371b306 | 49 | include ../../libService/toolchain_rules.mk |
| ram54288 | 0:a7a43371b306 | 50 | |
| ram54288 | 0:a7a43371b306 | 51 | $(eval $(call generate_rules,$(LIB),$(SRCS))) |
| ram54288 | 0:a7a43371b306 | 52 | |
| ram54288 | 0:a7a43371b306 | 53 | # Extend default clean rule |
| ram54288 | 0:a7a43371b306 | 54 | clean: clean-extra |
| ram54288 | 0:a7a43371b306 | 55 | |
| ram54288 | 0:a7a43371b306 | 56 | $(CLEANDIRS): |
| ram54288 | 0:a7a43371b306 | 57 | @make -C $(@:clean-%=%) clean |
| ram54288 | 0:a7a43371b306 | 58 | |
| ram54288 | 0:a7a43371b306 | 59 | clean-extra: $(CLEANDIRS) |