2014-09-27 11:37:46 +02:00
|
|
|
# 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 \
|
2015-04-24 10:52:52 +02:00
|
|
|
t210/parse_t210.c \
|
2014-09-27 11:37:46 +02:00
|
|
|
t132/parse_t132.c \
|
|
|
|
t124/parse_t124.c \
|
|
|
|
t114/parse_t114.c \
|
|
|
|
t30/parse_t30.c \
|
|
|
|
t20/parse_t20.c \
|
2015-04-24 10:52:52 +02:00
|
|
|
t210/nvbctlib_t210.c \
|
2014-09-27 11:37:46 +02:00
|
|
|
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 \
|
2015-04-24 10:52:52 +02:00
|
|
|
t132/nvboot_sdram_param_t132.h \
|
|
|
|
t210/nvboot_bct_t210.h \
|
|
|
|
t210/nvboot_sdram_param_t210.h
|
2014-09-27 11:37:46 +02:00
|
|
|
|
|
|
|
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))))
|
2015-02-10 22:15:45 +01:00
|
|
|
CBOOTIMAGE_FLAGS:=-Wall -std=c99 -O2
|
2014-09-27 11:37:46 +02:00
|
|
|
|
2018-08-27 15:12:50 +02:00
|
|
|
ifeq ($(OS_ARCH), FreeBSD)
|
|
|
|
CBOOTIMAGE_FLAGS:=-DENODATA=ENOATTR
|
|
|
|
endif
|
|
|
|
|
2014-09-27 11:37:46 +02:00
|
|
|
additional-dirs += $(sort $(dir $(CBOOTIMAGE_OBJS)))
|
|
|
|
|
|
|
|
$(objutil)/nvidia/cbootimage/%.o: util/nvidia/cbootimage/src/%.c
|
2015-02-10 22:15:45 +01:00
|
|
|
printf " HOSTCC $(subst $(objutil)/,,$(@))\n"
|
|
|
|
$(HOSTCC) $(CBOOTIMAGE_FLAGS) -c -o $@ $<
|
2014-09-27 11:37:46 +02:00
|
|
|
|
|
|
|
$(CBOOTIMAGE): $(CBOOTIMAGE_OBJS)
|
2015-02-10 22:15:45 +01:00
|
|
|
printf " HOSTCC $(subst $(objutil)/,,$(@)) (link)\n"
|
|
|
|
$(HOSTCC) $(CBOOTIMAGE_FLAGS) -o $@.tmp $^ -lm
|
2014-09-27 11:37:46 +02:00
|
|
|
mv $@.tmp $@
|