[Crosstoolchain-logs] [device-tree-compiler] 123/357: Reorganized Makefile into better top-down structure. Also removed a generic "LD" target that wasn't actually used.
Hector Oron
zumbi at moszumanska.debian.org
Thu Dec 8 17:05:57 UTC 2016
This is an automated email from the git hooks/post-receive script.
zumbi pushed a commit to branch upstream/1.3.x
in repository device-tree-compiler.
commit fdd2e6f9455020972b762a993046351f7845e7b5
Author: Jon Loeliger <jdl at freescale.com>
Date: Sat Jul 7 14:18:02 2007 -0500
Reorganized Makefile into better top-down structure.
Also removed a generic "LD" target that wasn't actually used.
Signed-off-by: Jon Loeliger <jdl at jdl.com>
---
Makefile | 85 ++++++++++++++++++++++++++++++----------------------------------
1 file changed, 40 insertions(+), 45 deletions(-)
diff --git a/Makefile b/Makefile
index 4740bff..04574c9 100644
--- a/Makefile
+++ b/Makefile
@@ -74,49 +74,6 @@ endif
all: dtc ftdump libfdt tests
-
-STD_CLEANFILES = *~ *.o *.d *.a *.i *.s core a.out
-GEN_CLEANFILES = $(VERSION_FILE)
-
-clean: libfdt_clean tests_clean
- @$(VECHO) CLEAN
- rm -f $(STD_CLEANFILES)
- rm -f $(GEN_CLEANFILES)
- rm -f *.tab.[ch] lex.yy.c *.output vgcore.*
- rm -f $(BIN)
-
-#
-# General rules
-#
-
-%.o: %.c
- @$(VECHO) CC $@
- $(CC) $(CPPFLAGS) $(CFLAGS) -o $@ -c $<
-
-%.o: %.S
- @$(VECHO) AS $@
- $(CC) $(CPPFLAGS) $(AFLAGS) -D__ASSEMBLY__ -o $@ -c $<
-
-%.d: %.c
- $(CC) $(CPPFLAGS) -MM -MG -MT "$*.o $@" $< > $@
-
-%.i: %.c
- @$(VECHO) CPP $@
- $(CC) $(CPPFLAGS) -E $< > $@
-
-%.s: %.c
- @$(VECHO) CC -S $@
- $(CC) $(CPPFLAGS) $(CFLAGS) -o $@ -S $<
-
-%.a:
- @$(VECHO) AR $@
- $(AR) $(ARFLAGS) $@ $^
-
-$(BIN): %:
- @$(VECHO) LD $@
- $(LINK.c) -o $@ $^
-
-
#
# Rules for dtc proper
#
@@ -126,6 +83,8 @@ DTC_OBJS = dtc.o flattree.o fstree.o data.o livetree.o \
dtc-parser.tab.o lex.yy.o
DTC_DEPFILES = $(DTC_OBJS:%.o=%.d)
+BIN += dtc ftdump
+
dtc-parser.tab.c dtc-parser.tab.h dtc-parser.output: dtc-parser.y
@$(VECHO) BISON $@
@$(VECHO) ---- Expect 2 s/r and 2 r/r. ----
@@ -138,9 +97,9 @@ lex.yy.c: dtc-lexer.l
@$(VECHO) LEX $@
$(LEX) $<
-BIN += dtc ftdump
-
dtc: $(DTC_OBJS)
+ @$(VECHO) LD $@
+ $(LINK.c) -o $@ $^
ftdump: ftdump.o
@@ -171,6 +130,16 @@ endif
TESTS_PREFIX=tests/
include tests/Makefile.tests
+STD_CLEANFILES = *~ *.o *.d *.a *.i *.s core a.out
+GEN_CLEANFILES = $(VERSION_FILE)
+
+clean: libfdt_clean tests_clean
+ @$(VECHO) CLEAN
+ rm -f $(STD_CLEANFILES)
+ rm -f $(GEN_CLEANFILES)
+ rm -f *.tab.[ch] lex.yy.c *.output vgcore.*
+ rm -f $(BIN)
+
install: dtc ftdump
$(INSTALL) -d $(DESTDIR)$(BINDIR)
$(INSTALL) -m 755 dtc $(DESTDIR)$(BINDIR)
@@ -189,4 +158,30 @@ define filechk
fi;
endef
+#
+# Generic compile rules
+#
+%.o: %.c
+ @$(VECHO) CC $@
+ $(CC) $(CPPFLAGS) $(CFLAGS) -o $@ -c $<
+
+%.o: %.S
+ @$(VECHO) AS $@
+ $(CC) $(CPPFLAGS) $(AFLAGS) -D__ASSEMBLY__ -o $@ -c $<
+
+%.d: %.c
+ $(CC) $(CPPFLAGS) -MM -MG -MT "$*.o $@" $< > $@
+
+%.i: %.c
+ @$(VECHO) CPP $@
+ $(CC) $(CPPFLAGS) -E $< > $@
+
+%.s: %.c
+ @$(VECHO) CC -S $@
+ $(CC) $(CPPFLAGS) $(CFLAGS) -o $@ -S $<
+
+%.a:
+ @$(VECHO) AR $@
+ $(AR) $(ARFLAGS) $@ $^
+
FORCE:
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/crosstoolchain/device-tree-compiler.git
More information about the Crosstoolchain-logs
mailing list