summaryrefslogtreecommitdiff
path: root/util/nvidia/Makefile.inc
diff options
context:
space:
mode:
authorPatrick Georgi <patrick@georgi-clan.de>2014-09-27 11:37:46 +0200
committerPatrick Georgi <patrick@georgi-clan.de>2014-10-02 10:26:58 +0200
commit758f26aa2dd7447267ac7e08b32ef157fc55a755 (patch)
tree1d9972b1beb3d25ba79aeab11a21c2cb3b1d1db2 /util/nvidia/Makefile.inc
parente87ee14449fb549be09d6a5de10185f182efdc79 (diff)
nvidia/cbootimage: avoid upstream's build system
It brings in useless dependencies, a weird autotools configuration, and tons of pain everywhere. Instead just build things ourselves. Change-Id: I67f06e711cb9dcd594363bc1a4f99d3273074549 Signed-off-by: Patrick Georgi <patrick@georgi-clan.de> Reviewed-on: http://review.coreboot.org/6986 Tested-by: build bot (Jenkins) Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
Diffstat (limited to 'util/nvidia/Makefile.inc')
-rw-r--r--util/nvidia/Makefile.inc48
1 files changed, 48 insertions, 0 deletions
diff --git a/util/nvidia/Makefile.inc b/util/nvidia/Makefile.inc
new file mode 100644
index 0000000000..c8be3bbab2
--- /dev/null
+++ b/util/nvidia/Makefile.inc
@@ -0,0 +1,48 @@
+# copied from cbootimage/src/Makefile.am
+CBOOTIMAGE_RAW_SRCS:= \
+ cbootimage.c \
+ data_layout.c \
+ set.c \
+ crypto.c \
+ aes_ref.c \
+ context.c \
+ parse.c \
+ t132/parse_t132.c \
+ t124/parse_t124.c \
+ t114/parse_t114.c \
+ t30/parse_t30.c \
+ t20/parse_t20.c \
+ t132/nvbctlib_t132.c \
+ t124/nvbctlib_t124.c \
+ t114/nvbctlib_t114.c \
+ t30/nvbctlib_t30.c \
+ t20/nvbctlib_t20.c \
+ cbootimage.h \
+ context.h \
+ crypto.h \
+ data_layout.h \
+ nvaes_ref.h \
+ parse.h \
+ set.h \
+ t20/nvboot_bct_t20.h \
+ t20/nvboot_sdram_param_t20.h \
+ t30/nvboot_bct_t30.h \
+ t30/nvboot_sdram_param_t30.h \
+ t114/nvboot_bct_t114.h \
+ t114/nvboot_sdram_param_t114.h \
+ t124/nvboot_bct_t124.h \
+ t124/nvboot_sdram_param_t124.h \
+ t132/nvboot_bct_t132.h \
+ t132/nvboot_sdram_param_t132.h
+
+CBOOTIMAGE_SRCS:=$(addprefix util/nvidia/cbootimage/src/,$(filter %.c,$(CBOOTIMAGE_RAW_SRCS)))
+CBOOTIMAGE_OBJS:=$(addprefix $(objutil)/nvidia/cbootimage/,$(patsubst %.c,%.o,$(filter %.c,$(CBOOTIMAGE_RAW_SRCS))))
+
+additional-dirs += $(sort $(dir $(CBOOTIMAGE_OBJS)))
+
+$(objutil)/nvidia/cbootimage/%.o: util/nvidia/cbootimage/src/%.c
+ gcc -c -o $@ $<
+
+$(CBOOTIMAGE): $(CBOOTIMAGE_OBJS)
+ gcc -o $@.tmp $^ -lm
+ mv $@.tmp $@