summaryrefslogtreecommitdiff
path: root/util/cbfstool/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'util/cbfstool/Makefile')
-rw-r--r--util/cbfstool/Makefile30
1 files changed, 20 insertions, 10 deletions
diff --git a/util/cbfstool/Makefile b/util/cbfstool/Makefile
index bc49c64002..e647c88062 100644
--- a/util/cbfstool/Makefile
+++ b/util/cbfstool/Makefile
@@ -8,30 +8,40 @@ CFLAGS += -Wstrict-aliasing -Werror
CFLAGS += -Wshadow
LDFLAGS += -g
-BINARY:=$(obj)/cbfstool
+CBFSTOOL_BINARY:=$(obj)/cbfstool
-COMMON:=cbfstool.o common.o cbfs_image.o compress.o fit.o
-COMMON+=elfheaders.o cbfs-mkstage.o cbfs-mkpayload.o xdr.o
+CBFSTOOL_COMMON:=cbfstool.o common.o cbfs_image.o compress.o fit.o
+CBFSTOOL_COMMON+=elfheaders.o cbfs-mkstage.o cbfs-mkpayload.o xdr.o
# LZMA
-COMMON+=lzma/lzma.o
-COMMON+=lzma/C/LzFind.o lzma/C/LzmaDec.o lzma/C/LzmaEnc.o
+CBFSTOOL_COMMON+=lzma/lzma.o
+CBFSTOOL_COMMON+=lzma/C/LzFind.o lzma/C/LzmaDec.o lzma/C/LzmaEnc.o
-COMMON+=linux_trampoline.o cbfs-payload-linux.o
+CBFSTOOL_COMMON+=linux_trampoline.o cbfs-payload-linux.o
-COMMON:=$(addprefix $(obj)/,$(COMMON))
+CBFSTOOL_COMMON:=$(addprefix $(obj)/,$(CBFSTOOL_COMMON))
-all: dep $(BINARY)
+
+RMODTOOL_BINARY:=$(obj)/rmodtool
+RMODTOOL_COMMON:=rmodtool.o rmodule.o common.o elfheaders.o xdr.o
+
+RMODTOOL_COMMON:=$(addprefix $(obj)/,$(RMODTOOL_COMMON))
+
+all: dep $(CBFSTOOL_BINARY) $(RMODTOOL_BINARY)
$(obj)/%.o: %.c
$(HOSTCC) $(CFLAGS) -c -o $@ $<
clean:
- rm -f $(COMMON) $(BINARY)
+ rm -f $(CBFSTOOL_COMMON) $(CBFSTOOL_BINARY)
+ rm -f $(RMODTOOL_COMMON) $(RMODTOOL_BINARY)
tags:
ctags *.[ch]
-$(obj)/cbfstool:$(COMMON)
+$(obj)/cbfstool:$(CBFSTOOL_COMMON)
+ $(HOSTCC) $(CFLAGS) -o $@ $^
+
+$(obj)/rmodtool:$(RMODTOOL_COMMON)
$(HOSTCC) $(CFLAGS) -o $@ $^
dep: