source: rtems/c/Makefile.in @ 196094eb

4.104.114.84.95
Last change on this file since 196094eb was 196094eb, checked in by Joel Sherrill <joel.sherrill@…>, on 04/19/99 at 13:19:14

Patch from Ralf Corsepius <corsepiu@…>:

This one is an enhancement to acpolish.

It replaces some Makefile variables by others variable in Makefile.ins
(tries to use unique name for some variables). It therefore eases
parsing Makefile.ins for further automatic Makefile.in conversions in
future.

To apply:

cd <rtems-source-tree>
sh <path-to>/rtems-rc-19990407-8.sh
./autogen

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