mb/dell: Add Latitude E5520 (Sandy Bridge)
[coreboot.git] / util / nvidia / Makefile.mk
blob08cdfc142f61336aaae40e2ae5ce145b369b794e
1 ## SPDX-License-Identifier: GPL-2.0-only
2 # copied from cbootimage/src/Makefile.am
3 CBOOTIMAGE_RAW_SRCS:= \
4 cbootimage.c \
5 data_layout.c \
6 set.c \
7 crypto.c \
8 aes_ref.c \
9 context.c \
10 parse.c \
11 t210/parse_t210.c \
12 t132/parse_t132.c \
13 t124/parse_t124.c \
14 t114/parse_t114.c \
15 t30/parse_t30.c \
16 t20/parse_t20.c \
17 t210/nvbctlib_t210.c \
18 t132/nvbctlib_t132.c \
19 t124/nvbctlib_t124.c \
20 t114/nvbctlib_t114.c \
21 t30/nvbctlib_t30.c \
22 t20/nvbctlib_t20.c \
23 cbootimage.h \
24 context.h \
25 crypto.h \
26 data_layout.h \
27 nvaes_ref.h \
28 parse.h \
29 set.h \
30 t20/nvboot_bct_t20.h \
31 t20/nvboot_sdram_param_t20.h \
32 t30/nvboot_bct_t30.h \
33 t30/nvboot_sdram_param_t30.h \
34 t114/nvboot_bct_t114.h \
35 t114/nvboot_sdram_param_t114.h \
36 t124/nvboot_bct_t124.h \
37 t124/nvboot_sdram_param_t124.h \
38 t132/nvboot_bct_t132.h \
39 t132/nvboot_sdram_param_t132.h \
40 t210/nvboot_bct_t210.h \
41 t210/nvboot_sdram_param_t210.h
43 CBOOTIMAGE_SRCS:=$(addprefix util/nvidia/cbootimage/src/,$(filter %.c,$(CBOOTIMAGE_RAW_SRCS)))
44 CBOOTIMAGE_OBJS:=$(addprefix $(objutil)/nvidia/cbootimage/,$(patsubst %.c,%.o,$(filter %.c,$(CBOOTIMAGE_RAW_SRCS))))
45 CBOOTIMAGE_FLAGS:=-Wall -std=c11 -O2
47 ifeq ($(OS_ARCH), FreeBSD)
48 CBOOTIMAGE_FLAGS:=-DENODATA=ENOATTR
49 endif
51 additional-dirs += $(sort $(dir $(CBOOTIMAGE_OBJS)))
53 $(objutil)/nvidia/cbootimage/%.o: util/nvidia/cbootimage/src/%.c
54 printf " HOSTCC $(subst $(objutil)/,,$(@))\n"
55 $(HOSTCC) $(CBOOTIMAGE_FLAGS) -c -o $@ $<
57 $(CBOOTIMAGE): $(CBOOTIMAGE_OBJS)
58 printf " HOSTCC $(subst $(objutil)/,,$(@)) (link)\n"
59 $(HOSTCC) $(CBOOTIMAGE_FLAGS) -o $@.tmp $^ -lm
60 mv $@.tmp $@