summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJon Loeliger <jdl@jdl.com>2008-10-03 10:49:22 -0500
committerJon Loeliger <jdl@jdl.com>2008-10-03 10:50:28 -0500
commit68f98d7b8aa41fab175daf9f1bcb2a5bc22dbc90 (patch)
tree27db5ad614b48c9b75b25e7dd82987aa63220188 /Makefile
parente8903fe225f1e3f4a04ea963306c87ca0ac795dc (diff)
downloaddtc-68f98d7b8aa41fab175daf9f1bcb2a5bc22dbc90.tar.gz
Rearrange ftdump and convert-dtsv0 into sub-Makefiles.
Follows the model of the existing sub-Makefiles for dtc. Adjust $(BIN) definition to represent installable bin programs and use it as the list of installed programs rather than using an enumerated list in the install target. Adjust the tests/Makefile to clean up properly still. Signed-off-by: Jon Loeliger <jdl@freescale.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile70
1 files changed, 37 insertions, 33 deletions
diff --git a/Makefile b/Makefile
index 558e10c..b3b85a5 100644
--- a/Makefile
+++ b/Makefile
@@ -46,18 +46,6 @@ else
DEPTARGETS = $(filter-out $(NODEPTARGETS),$(MAKECMDGOALS))
endif
-all: dtc ftdump convert-dtsv0 libfdt
-
-install: all
- @$(VECHO) INSTALL
- $(INSTALL) -d $(DESTDIR)$(BINDIR)
- $(INSTALL) -m 755 dtc $(DESTDIR)$(BINDIR)
- $(INSTALL) -m 755 convert-dtsv0 $(DESTDIR)$(BINDIR)
- $(INSTALL) -d $(DESTDIR)$(LIBDIR)
- $(INSTALL) -m 644 $(LIBFDT_lib) $(DESTDIR)$(LIBDIR)
- $(INSTALL) -d $(DESTDIR)$(INCLUDEDIR)
- $(INSTALL) -m 644 $(LIBFDT_include) $(DESTDIR)$(INCLUDEDIR)
-
#
# Rules for versioning
#
@@ -101,40 +89,27 @@ define filechk
fi;
endef
-$(VERSION_FILE): Makefile FORCE
- $(call filechk,version)
-#
-# Rules for dtc proper
-#
+include Makefile.convert-dtsv0
include Makefile.dtc
+include Makefile.ftdump
+BIN += convert-dtsv0
BIN += dtc
+BIN += ftdump
-# This stops make from generating the lex and bison output during
-# auto-dependency computation, but throwing them away as an
-# intermediate target and building them again "for real"
-.SECONDARY: $(DTC_GEN_SRCS)
-dtc: $(DTC_OBJS)
+all: $(BIN) libfdt
+
ifneq ($(DEPTARGETS),)
-include $(DTC_OBJS:%.o=%.d)
+-include $(CONVERT_OBJS:%.o=%.d)
+-include $(FTDUMP_OBJS:%.o=%.d)
endif
-#
-# Rules for ftdump & convert-dtsv0
-#
-BIN += ftdump convert-dtsv0
-ftdump: ftdump.o
-convert-dtsv0: convert-dtsv0-lexer.lex.o srcpos.o
- @$(VECHO) LD $@
- $(LINK.c) -o $@ $^
-ifneq ($(DEPTARGETS),)
--include ftdump.d
-endif
#
# Rules for libfdt
#
@@ -158,6 +133,35 @@ ifneq ($(DEPTARGETS),)
-include $(LIBFDT_OBJS:%.o=$(LIBFDT_objdir)/%.d)
endif
+# This stops make from generating the lex and bison output during
+# auto-dependency computation, but throwing them away as an
+# intermediate target and building them again "for real"
+.SECONDARY: $(DTC_GEN_SRCS) $(CONVERT_GEN_SRCS)
+
+
+
+install: all
+ @$(VECHO) INSTALL
+ $(INSTALL) -d $(DESTDIR)$(BINDIR)
+ $(INSTALL) -m 755 $(BIN) $(DESTDIR)$(BINDIR)
+ $(INSTALL) -d $(DESTDIR)$(LIBDIR)
+ $(INSTALL) -m 644 $(LIBFDT_lib) $(DESTDIR)$(LIBDIR)
+ $(INSTALL) -d $(DESTDIR)$(INCLUDEDIR)
+ $(INSTALL) -m 644 $(LIBFDT_include) $(DESTDIR)$(INCLUDEDIR)
+
+$(VERSION_FILE): Makefile FORCE
+ $(call filechk,version)
+
+
+dtc: $(DTC_OBJS)
+
+convert-dtsv0: $(CONVERT_OBJS)
+ @$(VECHO) LD $@
+ $(LINK.c) -o $@ $^
+
+ftdump: $(FTDUMP_OBJS)
+
+
#
# Testsuite rules
#