From c127f17e0e0aaa3229e4da4114da1075852dc813 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Thu, 4 Sep 2014 17:27:00 -0700 Subject: [PATCH 1/1] Fix parallel build All the .o files must be compiled before we can create the .a library from them. When compiling with a -j option (as low as -j4), often one or two .o files would be missing from the resulting .a because they hadn't finished compiling yet. Change-Id: Ie7bc0ad489b8b0afecab3ec318f2784ee706ae12 Signed-off-by: Thiago Macieira --- csdk/makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/csdk/makefile b/csdk/makefile index 8818000..185121e 100644 --- a/csdk/makefile +++ b/csdk/makefile @@ -126,7 +126,7 @@ obj_build: # Output all *.o files to $(OBJ_DIR)/$(BUILD) $(foreach source,$(SOURCES), $(CC) $(CFLAGS) $(source) -o $(patsubst %.c, %.o, $(patsubst %, $(BUILD)/$(OBJ_DIR)/%, $(notdir $(source))));) -liboctbstack.a: +liboctbstack.a: obj_build @echo "Building $@" # Unpackage libcoap.a to $(OBJ_DIR)/$(BUILD). The output objects from OCStack and OCCoap are already at this location @cd $(BUILD)/$(OBJ_DIR) && $(AR) -x $(LCOAP_DIR)/$(BUILD)/libcoap.a -- 2.7.4