Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(335)

Unified Diff: GNUmakefile

Issue 6524004: Add bct_dump tool. (Closed)
Patch Set: Created 9 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | bct_dump.c » ('j') | bct_dump.c » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: GNUmakefile
diff --git a/GNUmakefile b/GNUmakefile
index f5b1e51a4e4fc3d429041bb038f45cfcc218733a..a1fe303283cd134f1dda49ad8f8e6bafa7931056 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -1,21 +1,45 @@
-C_FILES :=
-C_FILES += nvbctlib_ap20.c
-C_FILES += cbootimage.c
-C_FILES += data_layout.c
-C_FILES += parse.c
-C_FILES += set.c
-C_FILES += crypto.c
-C_FILES += aes_ref.c
-C_FILES += context.c
+TARGETS = cbootimage bct_dump
+CC = gcc
+CFLAG = -Wall -O
-OBJS := $(patsubst %.c,%.o,$(notdir $(C_FILES)))
+all: $(TARGETS)
-TARGET = cbootimage
-CC = gcc
-CFLAGS=-Wall -O
+#
+# Build the cbootimage tool.
+#
+CBOOTIMAGE_C_FILES := cbootimage.c
+CBOOTIMAGE_C_FILES += nvbctlib_ap20.c
+CBOOTIMAGE_C_FILES += data_layout.c
+CBOOTIMAGE_C_FILES += parse.c
+CBOOTIMAGE_C_FILES += set.c
+CBOOTIMAGE_C_FILES += crypto.c
+CBOOTIMAGE_C_FILES += aes_ref.c
+CBOOTIMAGE_C_FILES += context.c
-$(TARGET):$(OBJS)
- $(CC) -o $(TARGET) $(OBJS) $(CFLAGS)
+CBOOTIMAGE_OBJS := $(patsubst %.c,%.o,$(notdir $(CBOOTIMAGE_C_FILES)))
+cbootimage: $(CBOOTIMAGE_OBJS)
+ $(CC) -o $@ $^ $(CFLAGS)
vb 2011/02/23 22:34:02 just out of curiosity: wouldn't cbootimage: $(CBO
robotboy 2011/02/23 22:45:52 It does mostly the same thing. It makes the outpu
+
+#
+# Build the bct_dump tool. This tool generates a human readable version of
+# the given BCT file.
+#
+BCT_DUMP_C_FILES := bct_dump.c
+BCT_DUMP_C_FILES += nvbctlib_ap20.c
+BCT_DUMP_C_FILES += data_layout.c
+BCT_DUMP_C_FILES += set.c
+BCT_DUMP_C_FILES += crypto.c
+BCT_DUMP_C_FILES += aes_ref.c
+BCT_DUMP_C_FILES += context.c
+
+BCT_DUMP_OBJS := $(patsubst %.c,%.o,$(notdir $(BCT_DUMP_C_FILES)))
+
+bct_dump: $(BCT_DUMP_OBJS)
+ $(CC) -o $@ $^ $(CFLAGS)
+
+#
+# Remove
+#
clean:
- rm -rf *.o $(TARGET)
+ rm -rf *.o *~ $(TARGETS)
« no previous file with comments | « no previous file | bct_dump.c » ('j') | bct_dump.c » ('J')

Powered by Google App Engine
This is Rietveld 408576698