1 # Makefile.in for building crosstool-ng
2 # This file serves as source for the ./configure operation
6 ###############################################################################
7 # Configuration variables
11 LIBDIR := @@LIBDIR@@/ct-ng-$(VERSION)
12 DOCDIR := @@DOCDIR@@/ct-ng-$(VERSION)
13 MANDIR := @@MANDIR@@/man1
15 MAKE := $(shell which make || type -p make || echo /usr/bin/make)
17 ###############################################################################
20 build: build-bin build-lib build-doc
22 install: build install-bin install-lib install-doc
24 clean: clean-bin clean-lib clean-doc
29 uninstall: uninstall-bin uninstall-lib uninstall-doc
31 ###############################################################################
34 #--------------------------------------
41 build-doc: docs/ct-ng.1
44 @sed -r -e 's,@@CT_MAKE@@,$(MAKE),g;' \
45 -e 's,@@CT_BINDIR@@,$(BINDIR),g;' \
46 -e 's,@@CT_LIBDIR@@,$(LIBDIR),g;' \
47 -e 's,@@CT_DOCDIR@@,$(DOCDIR),g;' \
48 -e 's,@@CT_MANDIR@@,$(MANDIR),g;' \
49 -e 's,@@CT_VERSION@@,$(VERSION),g;' \
50 -e 's,@@CT_DATE@@,$(DATE),g;' \
53 #--------------------------------------
64 #--------------------------------------
67 install-bin: $(BINDIR)
68 @install -m 755 ct-ng $(BINDIR)/ct-ng
70 install-lib: $(LIBDIR) install-lib-main install-lib-samples
72 install-lib-main: $(LIBDIR)
73 @for src_dir in config kconfig patches scripts tools; do \
74 tar cf - --exclude=.svn $${src_dir} |(cd $(LIBDIR); tar xf -); \
76 @for src_file in Makefile.steps version; do \
77 install -m 644 $${src_file} $(LIBDIR)/$${src_file}; \
80 # Samples need a little love:
81 # - change every occurence of CT_TOP_DIR to CT_LIB_DIR
82 install-lib-samples: $(LIBDIR) install-lib-main
83 @tar cf - --exclude=.svn samples |(cd $(LIBDIR); tar xf -)
84 @for samp_file in $(LIBDIR)/samples/*/crosstool.config; do \
85 sed -r -i -e 's,\$$\{CT_TOP_DIR\},\$$\{CT_LIB_DIR\},g;' $${samp_file}; \
88 install-doc: $(DOCDIR) $(MANDIR)
89 @for doc_file in LICENSES licenses.d COPYING CREDITS docs/overview.txt; do \
90 install -m 644 docs/overview.txt $(DOCDIR); \
92 @install -m 644 docs/ct-ng.1 $(MANDIR)
94 $(BINDIR) $(LIBDIR) $(DOCDIR) $(MANDIR):
98 #--------------------------------------
102 @rm -f $(BINDIR)/ct-ng
109 @rm -f $(MANDIR)/ct-ng.1