source: rtems/c/Makefile.in @ 21bfd93

4.104.114.84.95
Last change on this file since 21bfd93 was 28e7d7fa, checked in by Joel Sherrill <joel.sherrill@…>, on 08/20/98 at 22:04:22

Patches from Eric Norum

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