aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorPaul Selkirk <paul@psgd.org>2017-09-07 18:17:12 -0400
committerPaul Selkirk <paul@psgd.org>2017-09-07 18:20:55 -0400
commit72227852729ed3125af58cff3f593340b3247fed (patch)
tree234d45ae587ce51bfbbce6d8c059a121a44bf1e6 /Makefile
parent2e1f88062c7ec6cd12688ce7522e802bbf09bba1 (diff)
parent5ff8c9512db48d128cf07904f68eb5139bebf952 (diff)
Rebase branch 'profiling' from master
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile10
1 files changed, 7 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 12e7df8..e349ab1 100644
--- a/Makefile
+++ b/Makefile
@@ -117,6 +117,9 @@ CFLAGS += -I$(MBED_DIR)/targets/cmsis/TARGET_STM/TARGET_STM32F4
CFLAGS += -I$(MBED_DIR)/targets/cmsis/TARGET_STM/TARGET_STM32F4/$(BOARD)
CFLAGS += -I$(MBED_DIR)/targets/hal/TARGET_STM/TARGET_STM32F4
CFLAGS += -I$(MBED_DIR)/targets/hal/TARGET_STM/TARGET_STM32F4/$(BOARD)
+ifdef DO_TASK_METRICS
+CFLAGS += -DDO_TASK_METRICS
+endif
%.o : %.c
$(CC) $(CFLAGS) -c -o $@ $<
@@ -124,7 +127,11 @@ CFLAGS += -I$(MBED_DIR)/targets/hal/TARGET_STM/TARGET_STM32F4/$(BOARD)
%.o : %.S
$(CC) $(CFLAGS) -c -o $@ $<
+ifdef DO_PROFILING
+all: hsm
+else
all: board-test cli-test libhal-test hsm bootloader
+endif
$(MBED_DIR)/libstmf4.a: .FORCE
$(MAKE) -C $(MBED_DIR)
@@ -152,9 +159,6 @@ libhal-test: $(BOARD_OBJS) $(LIBS) $(LIBHAL_BLD)/libhal.a .FORCE
ifdef DO_PROFILING
CFLAGS += -pg -DDO_PROFILING
-endif
-ifdef DO_TASK_METRICS
-CFLAGS += -DDO_TASK_METRICS
hsm: $(BOARD_OBJS) $(LIBS) $(LIBHAL_BLD)/libhal.a $(LIBCLI_BLD)/libcli.a $(LIBPROF_BLD)/libprof.a .FORCE
$(MAKE) -C projects/hsm
else