source: rtems/c/Makefile.in @ 0280cb6

4.104.114.84.95
Last change on this file since 0280cb6 was 0280cb6, checked in by Joel Sherrill <joel.sherrill@…>, on 08/20/98 at 14:39:09

FreeBSD stack compiles for the first time (except libc/strsep.c)

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