source: rtems/c/Makefile.in @ cd155be

4.104.114.84.95
Last change on this file since cd155be was 692b9f7, checked in by Joel Sherrill <joel.sherrill@…>, on 10/28/98 at 19:17:16

Merged Vista SCORE603e, Radstone PPCn_60x, and DY-4 DMV177 BSPs along
with libchip.

  • Property mode set to 100644
File size: 3.8 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
23include $(RTEMS_ROOT)/make/custom/$(RTEMS_BSP).cfg
24include $(RTEMS_ROOT)/make/directory.cfg
25
26SUB_DIRS=build-tools src
27
28# We only make the install point for the networking header files if needed.
29LIBNETWORKING_yes_V = lib/include/networking lib/include/networking/sys \
30        lib/include/networking/machine lib/include/networking/rtems \
31        lib/include/networking/vm lib/include/networking/net \
32        lib/include/networking/netinet lib/include/networking/arpa \
33        lib/include/networking/nfs
34LIBNETWORKING = $(LIBNETWORKING_$(HAS_NETWORKING)_V)
35
36# We only make the rtems++ install point if it is enabled.
37LIBRTEMSCPLUSPLUS_yes_V = lib/include/rtems++
38LIBRTEMSCPLUSPLUS = $(LIBRTEMSCPLUSPLUS_$(HAS_CPLUSPLUS)_V)
39
40# directories to be created in install point
41CREATE_DIRS = \
42    lib lib/include lib/include/sys lib/include/rtems \
43    lib/include/rtems/score lib/include/rtems/rtems lib/include/rtems/posix \
44    lib/include/libc lib/include/libc/sys \
45    lib/include/motorola lib/include/zilog \
46    lib/include/libchip \
47    $(LIBNETWORKING) \
48    $(LIBRTEMSCPLUSPLUS) \
49    bin samples \
50    tests tests/screens tests/screens/sptests \
51    tests/screens/psxtests tests/screens/mptests \
52    tests/screens/mptests/node1 tests/screens/mptests/node2 \
53    build-tools update-tools
54
55# Make all/install must include 'env'
56# if something is added to TARGET_VARIANTS, then account for it here
57make_src_makefiles: Makefile.in Makefile
58        -find . -name Makefile \
59            -exec grep -l "^preinstall" {} \; > make_src_makefiles.tmp
60        -grep tools make_src_makefiles.tmp > make_src_makefiles
61        -grep -v tools make_src_makefiles.tmp >> make_src_makefiles
62        -rm make_src_makefiles.tmp
63
64
65pre_install_src: env make_src_makefiles
66        cd build-tools/scripts; $(MAKE)
67        @echo "Order of preinstall directories"
68        cat make_src_makefiles
69        @echo
70        CURRDIR=`pwd`; \
71        for i in `cat make_src_makefiles` ; do \
72                DIR=`dirname $$i`; \
73                cd $$DIR; \
74                $(MAKE) preinstall; \
75                cd $$CURRDIR; \
76        done
77all: pre_install_src env
78debug: pre_install_src env
79profile: pre_install_src env
80
81install: all install_files
82debug_install: env debug install_files
83profile_install: env profile install_files
84
85debug_all: debug
86profile_all: profile
87
88# top level clean/clobber will delete the install points
89clean_WRAPUP = $(MAKE) clean_wrapup
90clobber_WRAPUP = $(MAKE) clean_wrapup
91
92clean_wrapup: clean_tools clean_dirs clean_modules
93
94.PHONY: dirs clean_wrapup clean_dirs clean_tools clean_modules env install
95
96dirs:
97        -$(MKDIR) ${CREATE_DIRS:%=$(PROJECT_ROOT)/$(RTEMS_BSP)/%}
98        if test -d $(PROJECT_ROOT)/c/src/lib/libhwapi; then \
99                (cd $(PROJECT_ROOT)/c/src/lib/libhwapi ; $(MAKE) mkdirs) \
100        fi
101
102distclean: clobber
103
104clean_dirs:
105        $(RM) -r $(PROJECT_RELEASE)
106
107clean_tools:
108        cd build-tools; $(MAKE) clean
109
110$(PROJECT_ROOT)/$(RTEMS_BSP)/Makefile.inc: $(PROJECT_ROOT)/make/Templates/Makefile.inc
111        echo "RTEMS_BSP = $(RTEMS_BSP)" > $@
112        $(CAT) $< >> $@
113
114# NOTE: The wildcard on the install should pick up everything except
115#       the tests directory.  This significantly minimizes the install size.
116
117install_files: $(PROJECT_ROOT)/$(RTEMS_BSP)/Makefile.inc
118        -$(MKDIR) $(prefix)/
119        -$(MKDIR) $(prefix)/rtems
120        -$(RM) -rf $(prefix)/rtems/$(RTEMS_BSP)
121        cd ../; tar cf - $(RTEMS_BSP)/[bilsuM]* | \
122                (cd $(prefix)/rtems; tar xpBf - )
123        cd ../make; $(MAKE) RTEMS_BSP=$(RTEMS_BSP) install
124
125tests:
126        cd src/tests; $(MAKE) all
127
128debug_tests: debug
129        cd src/tests; $(MAKE) debug
130
131profile_tests: profile
132        cd src/tests; $(MAKE) profile
133
134env:    $(SRCS) dirs
Note: See TracBrowser for help on using the repository browser.