Patrick Georgi | 0588d19 | 2009-08-12 15:00:51 +0000 | [diff] [blame] | 1 | cbfsobj := |
Stefan Reinauer | 2e200cd | 2012-10-30 14:02:45 -0700 | [diff] [blame] | 2 | cbfsobj += cbfstool.o |
Patrick Georgi | b7b56dd8 | 2009-09-14 13:29:27 +0000 | [diff] [blame] | 3 | cbfsobj += common.o |
| 4 | cbfsobj += compress.o |
Hung-Te Lin | eab2c81 | 2013-01-29 01:56:17 +0800 | [diff] [blame] | 5 | cbfsobj += cbfs_image.o |
Patrick Georgi | b7b56dd8 | 2009-09-14 13:29:27 +0000 | [diff] [blame] | 6 | cbfsobj += cbfs-mkstage.o |
| 7 | cbfsobj += cbfs-mkpayload.o |
Ronald G. Minnich | a8a133d | 2013-12-30 13:16:18 -0800 | [diff] [blame] | 8 | cbfsobj += elfheaders.o |
Ronald G. Minnich | aa2f739 | 2013-12-03 11:13:35 -0800 | [diff] [blame] | 9 | cbfsobj += xdr.o |
Aaron Durbin | 6b0d0d6 | 2012-12-14 17:16:21 -0600 | [diff] [blame] | 10 | cbfsobj += fit.o |
Stefan Reinauer | 2e200cd | 2012-10-30 14:02:45 -0700 | [diff] [blame] | 11 | # LZMA |
| 12 | cbfsobj += lzma.o |
| 13 | cbfsobj += LzFind.o |
| 14 | cbfsobj += LzmaDec.o |
| 15 | cbfsobj += LzmaEnc.o |
Patrick Georgi | de36d33 | 2013-08-27 20:22:21 +0200 | [diff] [blame] | 16 | # linux as payload |
| 17 | cbfsobj += linux_trampoline.o |
| 18 | cbfsobj += cbfs-payload-linux.o |
Patrick Georgi | 0588d19 | 2009-08-12 15:00:51 +0000 | [diff] [blame] | 19 | |
Sol Boucher | 0e53931 | 2015-03-05 15:38:03 -0800 | [diff] [blame] | 20 | rmodobj := |
Aaron Durbin | 4fde5a6 | 2014-03-07 15:11:53 -0600 | [diff] [blame] | 21 | rmodobj += rmodtool.o |
| 22 | rmodobj += rmodule.o |
| 23 | rmodobj += common.o |
| 24 | rmodobj += elfheaders.o |
| 25 | rmodobj += xdr.o |
| 26 | |
Sol Boucher | 0e53931 | 2015-03-05 15:38:03 -0800 | [diff] [blame] | 27 | TOOLCFLAGS ?= -std=c99 -Werror -Wall -Wextra |
| 28 | TOOLCFLAGS += -Wcast-qual -Wmissing-prototypes -Wredundant-decls -Wshadow |
| 29 | TOOLCFLAGS += -Wstrict-prototypes -Wwrite-strings |
| 30 | TOOLCPPFLAGS ?= -D_POSIX_C_SOURCE=200809L # strdup() from string.h |
Paul Menzel | 6548ae9 | 2015-05-03 09:35:32 +0200 | [diff] [blame] | 31 | TOOLLDFLAGS ?= |
Sol Boucher | 0e53931 | 2015-03-05 15:38:03 -0800 | [diff] [blame] | 32 | |
Zheng Bao | c31cdd8 | 2012-10-22 16:39:24 +0800 | [diff] [blame] | 33 | ifeq ($(shell uname -s | cut -c-7 2>/dev/null), MINGW32) |
Aaron Durbin | 4fde5a6 | 2014-03-07 15:11:53 -0600 | [diff] [blame] | 34 | TOOLFLAGS+=-mno-ms-bitfields |
Zheng Bao | c31cdd8 | 2012-10-22 16:39:24 +0800 | [diff] [blame] | 35 | endif |
| 36 | |
Patrick Georgi | a2acbc7 | 2010-04-16 22:48:57 +0000 | [diff] [blame] | 37 | $(objutil)/cbfstool/%.o: $(top)/util/cbfstool/%.c |
| 38 | printf " HOSTCC $(subst $(objutil)/,,$(@))\n" |
Sol Boucher | 0e53931 | 2015-03-05 15:38:03 -0800 | [diff] [blame] | 39 | $(HOSTCC) $(TOOLCPPFLAGS) $(TOOLCFLAGS) $(HOSTCFLAGS) -c -o $@ $< |
Patrick Georgi | 0588d19 | 2009-08-12 15:00:51 +0000 | [diff] [blame] | 40 | |
Stefan Reinauer | aa3f7ba | 2013-03-28 16:51:45 -0700 | [diff] [blame] | 41 | $(objutil)/cbfstool/%.o: $(top)/util/cbfstool/lzma/%.c |
| 42 | printf " HOSTCC $(subst $(objutil)/,,$(@))\n" |
Sol Boucher | 0e53931 | 2015-03-05 15:38:03 -0800 | [diff] [blame] | 43 | $(HOSTCC) $(TOOLCPPFLAGS) $(TOOLCFLAGS) $(HOSTCFLAGS) -c -o $@ $< |
Patrick Georgi | b7b56dd8 | 2009-09-14 13:29:27 +0000 | [diff] [blame] | 44 | |
Stefan Reinauer | 2e200cd | 2012-10-30 14:02:45 -0700 | [diff] [blame] | 45 | $(objutil)/cbfstool/%.o: $(top)/util/cbfstool/lzma/C/%.c |
Zheng Bao | a182cbd | 2012-12-14 15:44:59 +0800 | [diff] [blame] | 46 | printf " HOSTCC $(subst $(objutil)/,,$(@))\n" |
Sol Boucher | 0e53931 | 2015-03-05 15:38:03 -0800 | [diff] [blame] | 47 | $(HOSTCC) $(TOOLCPPFLAGS) $(TOOLCFLAGS) $(HOSTCFLAGS) -c -o $@ $< |
Patrick Georgi | b7b56dd8 | 2009-09-14 13:29:27 +0000 | [diff] [blame] | 48 | |
Patrick Georgi | 913e171 | 2014-07-15 12:28:12 +0200 | [diff] [blame] | 49 | $(objutil)/cbfstool/cbfstool: $(addprefix $(objutil)/cbfstool/,$(cbfsobj)) |
Stefan Reinauer | aa3f7ba | 2013-03-28 16:51:45 -0700 | [diff] [blame] | 50 | printf " HOSTCC $(subst $(objutil)/,,$(@)) (link)\n" |
Paul Menzel | 6548ae9 | 2015-05-03 09:35:32 +0200 | [diff] [blame] | 51 | $(HOSTCC) $(TOOLLDFLAGS) -o $@ $(addprefix $(objutil)/cbfstool/,$(cbfsobj)) |
Aaron Durbin | 4fde5a6 | 2014-03-07 15:11:53 -0600 | [diff] [blame] | 52 | |
Patrick Georgi | 913e171 | 2014-07-15 12:28:12 +0200 | [diff] [blame] | 53 | $(objutil)/cbfstool/rmodtool: $(addprefix $(objutil)/cbfstool/,$(rmodobj)) |
Aaron Durbin | 4fde5a6 | 2014-03-07 15:11:53 -0600 | [diff] [blame] | 54 | printf " HOSTCC $(subst $(objutil)/,,$(@)) (link)\n" |
Paul Menzel | 6548ae9 | 2015-05-03 09:35:32 +0200 | [diff] [blame] | 55 | $(HOSTCC) $(TOOLLDFLAGS) -o $@ $(addprefix $(objutil)/cbfstool/,$(rmodobj)) |
Sol Boucher | 0e53931 | 2015-03-05 15:38:03 -0800 | [diff] [blame] | 56 | |
| 57 | # Tolerate lzma sdk warnings |
| 58 | $(objutil)/cbfstool/LzmaEnc.o: TOOLCFLAGS += -Wno-sign-compare -Wno-cast-qual |