source: rtems/c/Makefile.in @ e619c28

4.104.114.84.9
Last change on this file since e619c28 was e619c28, checked in by Joel Sherrill <joel.sherrill@…>, on Mar 19, 1999 at 10:01:26 PM

Towards automake IX patch from Ralf Corsepius <corsepiu@…>:

This is the next step towards automake:

  • Two scripts for the toplevel directory: a) "autogen" (Idea borrowed from libtool and gnome) A helper script to recursively regenerate autoconf/automake/aclocal generated files (Still not perfect but sufficient). b) "missing" (from automake-cvs archive). This file normally is automatically generated by automake, but we have to manually add it until we add automake support to the toplevel configure script.

"chmod 755 missing autogen" after applying the patch.

  • Changing the toplevel installation directory [ I can hear you falling off the chair ;-] Until now rtems installed itself to $(prefix)/rtems. This is in contradiction to automake and GNU/FSF/Cygnus conventions. With this patch applied, rtems installs into $(prefix). To achieve the old behaviour simply configure with --prefix=<install-dir>/rtems instead of --prefix=<install-dir>

This is a widely visible change and I can understand if you don't
like it at the present point. It enables us to use automake's
default installation paths instead of having to set up installation
paths manually. At the moment this doesn't help much, but in the not
so far future this would enable us to mix cpu-only dependent libraries
into the host's cross-compiler library and header files into
newlib's include directories, tools into the toolchain directories etc.

I would recommend to change the main installation directory, however it's
up to you to draw the final design decision.

  • Property mode set to 100644
File size: 4.6 KB
Line 
1#
2#  $Id$
3#
4# top level directory for RTEMS build tree
5# This Makefile is *not* a good example of a directory Makefile.
6#
7
8@SET_MAKE@
9srcdir = @srcdir@
10prefix = @prefix@
11exec_prefix = @exec_prefix@
12bindir = @bindir@
13libdir = @libdir@
14includedir = @includedir@
15target = @target@
16manext = 1
17mandir = @mandir@/man$(manext)
18program_prefix = @program_prefix@
19VPATH = @srcdir@
20RTEMS_ROOT = @top_srcdir@
21PROJECT_ROOT = @PROJECT_ROOT@
22
23INSTALL = @INSTALL@
24
25include $(RTEMS_ROOT)/make/custom/$(RTEMS_BSP).cfg
26include $(RTEMS_ROOT)/make/directory.cfg
27
28SUB_DIRS=build-tools src
29
30# We only make the install point for the networking header files if needed.
31LIBNETWORKING_yes_V = lib/include/networking lib/include/networking/sys \
32        lib/include/networking/machine lib/include/networking/rtems \
33        lib/include/networking/vm lib/include/networking/net \
34        lib/include/networking/netinet lib/include/networking/arpa \
35        lib/include/networking/nfs
36LIBNETWORKING = $(LIBNETWORKING_$(HAS_NETWORKING)_V)
37
38# We only make the rpc install point if networking is enabled.
39LIBRPC_yes_V = lib/include/rpc
40LIBRPC = $(LIBRPC_$(HAS_NETWORKING)_V)
41
42# We only make the rdbg install point if networking and rdbg is enabled.
43LIBRDBG_yes_yes_V = lib/include/rdbg
44LIBRDBG = $(LIBRDBG_$(HAS_NETWORKING)_$(HAS_RDBG)_V)
45
46# We only make the rtems++ install point if it is enabled.
47LIBRTEMSCPLUSPLUS_yes_V = lib/include/rtems++
48LIBRTEMSCPLUSPLUS = $(LIBRTEMSCPLUSPLUS_$(HAS_CPLUSPLUS)_V)
49
50# directories to be created in install point
51CREATE_DIRS = \
52    lib lib/include lib/include/sys lib/include/rtems \
53    lib/include/rtems/score lib/include/rtems/rtems lib/include/rtems/posix \
54    lib/include/libc lib/include/libc/sys \
55    lib/include/motorola lib/include/zilog \
56    lib/include/libchip \
57    $(LIBNETWORKING) \
58    $(LIBRPC) \
59    $(LIBRDBG) \
60    $(LIBRTEMSCPLUSPLUS) \
61    bin samples \
62    tests tests/screens tests/screens/sptests \
63    tests/screens/psxtests tests/screens/mptests \
64    tests/screens/mptests/node1 tests/screens/mptests/node2 \
65    build-tools update-tools
66
67BUILD_DIRS = ${CREATE_DIRS:%=$(PROJECT_ROOT)/$(RTEMS_BSP)/%}
68
69# bsp_specs should be installed by a bsp-specific configure script
70BSP_SPECS = $(PROJECT_RELEASE)/lib/bsp_specs
71ifeq ($(RTEMS_BSP),bare)
72BSP_SPECS_DIR = $(RTEMS_ROOT)/c/src/lib/libbsp/$(RTEMS_BSP_FAMILY)
73else       
74BSP_SPECS_DIR = $(RTEMS_ROOT)/c/src/lib/libbsp/$(RTEMS_CPU)/$(RTEMS_BSP_FAMILY)
75endif
76
77$(BSP_SPECS): $(BSP_SPECS_DIR)/bsp_specs
78        $(INSTALL) $(INSTDATAFLAGS) $< $@
79
80# Make all/install must include 'env'
81# if something is added to TARGET_VARIANTS, then account for it here
82make_src_makefiles: Makefile.in Makefile
83        -find . -name Makefile \
84            -exec grep -l "^preinstall" {} \; > make_src_makefiles.tmp
85        -grep tools make_src_makefiles.tmp > make_src_makefiles
86        -grep -v tools make_src_makefiles.tmp >> make_src_makefiles
87        -rm make_src_makefiles.tmp
88
89
90pre_install_src: env make_src_makefiles
91        cd build-tools/scripts; $(MAKE)
92        @echo "Order of preinstall directories"
93        cat make_src_makefiles
94        @echo
95        CURRDIR=`pwd`; \
96        for i in `cat make_src_makefiles` ; do \
97                DIR=`dirname $$i`; \
98                cd $$DIR; \
99                $(MAKE) preinstall; \
100                cd $$CURRDIR; \
101        done
102all: pre_install_src env
103debug: pre_install_src env
104profile: pre_install_src env
105
106install: all install_files
107debug_install: env debug install_files
108profile_install: env profile install_files
109
110debug_all: debug
111profile_all: profile
112
113# top level clean/clobber will delete the install points
114clean_WRAPUP = $(MAKE) clean_wrapup
115clobber_WRAPUP = $(MAKE) clean_wrapup
116
117clean_wrapup: clean_tools clean_dirs clean_modules
118
119.PHONY: dirs clean_wrapup clean_dirs clean_tools clean_modules env install
120
121$(BUILD_DIRS):
122        -$(MKDIR) $(BUILD_DIRS)
123        if test -d $(PROJECT_ROOT)/c/src/lib/libhwapi; then \
124                (cd $(PROJECT_ROOT)/c/src/lib/libhwapi ; $(MAKE) mkdirs) \
125        fi
126
127dirs: $(BUILD_DIRS)
128
129distclean: clobber
130
131clean_dirs:
132        $(RM) -r $(PROJECT_RELEASE)
133
134clean_tools:
135        cd build-tools; $(MAKE) clean
136
137$(PROJECT_ROOT)/$(RTEMS_BSP)/Makefile.inc: $(PROJECT_ROOT)/make/Templates/Makefile.inc
138        echo "RTEMS_BSP = $(RTEMS_BSP)" > $@
139        $(CAT) $< >> $@
140
141# NOTE: The wildcard on the install should pick up everything except
142#       the tests directory.  This significantly minimizes the install size.
143
144install_files: $(PROJECT_ROOT)/$(RTEMS_BSP)/Makefile.inc
145        @top_srcdir@/mkinstalldirs $(prefix)
146        -$(RM) -rf $(prefix)/$(RTEMS_BSP)
147        cd ../; tar cf - $(RTEMS_BSP)/[bilsuM]* | \
148                (cd $(prefix); tar xpBf - )
149        cd ../make; $(MAKE) RTEMS_BSP=$(RTEMS_BSP) install
150
151tests:
152        cd src/tests; $(MAKE) all
153
154debug_tests: debug
155        cd src/tests; $(MAKE) debug
156
157profile_tests: profile
158        cd src/tests; $(MAKE) profile
159
160env:    $(SRCS) dirs $(BSP_SPECS)
161
Note: See TracBrowser for help on using the repository browser.