aboutsummaryrefslogtreecommitdiff
path: root/external
diff options
context:
space:
mode:
authorPatrick Williams <patrick@stwcx.xyz>2016-09-16 15:50:37 -0500
committerStewart Smith <stewart@linux.vnet.ibm.com>2016-09-22 15:41:29 +1000
commitcd72d0fbdd7184ee88e3a55b0eda089cf7d8528d (patch)
tree8d74223c6e8485abc090a22487ea7d2361448f1d /external
parent171726631d014cd5e61170f06028474d900a827e (diff)
downloadskiboot-cd72d0fbdd7184ee88e3a55b0eda089cf7d8528d.zip
skiboot-cd72d0fbdd7184ee88e3a55b0eda089cf7d8528d.tar.gz
skiboot-cd72d0fbdd7184ee88e3a55b0eda089cf7d8528d.tar.bz2
gard: Fix Makefile race condition
Commit fd599965 added some dependencies in 'external/pflash' for libflash files that are created via symlink. Replicate that same behavior in 'external/gard' to prevent race conditions where we attempt to compile files from libflash before they are symlink'd. Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'external')
-rw-r--r--external/gard/rules.mk6
1 files changed, 5 insertions, 1 deletions
diff --git a/external/gard/rules.mk b/external/gard/rules.mk
index 0dd14ed..a39022b 100644
--- a/external/gard/rules.mk
+++ b/external/gard/rules.mk
@@ -2,7 +2,9 @@
override CFLAGS += -O2 -Wall -Werror -I.
OBJS = version.o gard.o
-LIBFLASH_OBJS += libflash-file.o libflash-libflash.o libflash-libffs.o libflash-ecc.o libflash-blocklevel.o
+LIBFLASH_FILES := libflash.c libffs.c ecc.c blocklevel.c file.c
+LIBFLASH_OBJS := $(addprefix libflash-, $(LIBFLASH_FILES:.c=.o))
+LIBFLASH_SRC := $(addprefix libflash/,$(LIBFLASH_FILES))
OBJS += $(LIBFLASH_OBJS)
OBJS += common-arch_flash.o
EXE = gard
@@ -24,6 +26,8 @@ version.c: make_version.sh .version
%.o : %.c
$(CC) $(CFLAGS) -c $< -o $@
+$(LIBFLASH_SRC): | links
+
$(LIBFLASH_OBJS): libflash-%.o : libflash/%.c
$(CC) $(CFLAGS) -c $< -o $@