source: rtems/c/Makefile.in @ 608641e

4.104.114.84.95
Last change on this file since 608641e was 674c900, checked in by Joel Sherrill <joel.sherrill@…>, on 12/10/97 at 16:58:00

Modified a lot of files to take a first cut at supporting building from
any directory in the build tree. The only variable which must be set
before the command "gmake" is invoked is RTEMS_BSP (e.g. RTEMS_BSP=erc32).

  • Property mode set to 100644
File size: 3.1 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@
11prefix = @prefix@
12exec_prefix = @exec_prefix@
13bindir = @bindir@
14libdir = @libdir@
15includedir = @includedir@
16target = @target@
17manext = 1
18mandir = @mandir@/man$(manext)
19program_prefix = @program_prefix@
20VPATH = @srcdir@
21RTEMS_ROOT = @RTEMS_ROOT@
22PROJECT_ROOT = @PROJECT_ROOT@
23RTEMS_CUSTOM = $(RTEMS_ROOT)/make/custom/$(RTEMS_BSP).cfg
24
25include $(RTEMS_CUSTOM)
26include $(RTEMS_ROOT)/make/directory.cfg
27
28# dubious, but needed by rtems-glom ...
29export PROJECT_HOME
30
31SUB_DIRS=build-tools src
32
33# We only make the install point for the KA9Q header files if it is enabled.
34LIBKA9Q_yes_V = lib/include/ka9q
35LIBKA9Q = $(LIBKA9Q_$(HAS_KA9Q)_V)
36
37# We only make the rtems++ install point if it is enabled.
38LIBRTEMSCPLUSPLUS_yes_V = lib/include/rtems++
39LIBRTEMSCPLUSPLUS = $(LIBRTEMSCPLUSPLUS_$(HAS_CPLUSPLUS)_V)
40
41# directories to be created in install point
42CREATE_DIRS = \
43    lib lib/include lib/include/sys lib/include/rtems \
44    lib/include/rtems/score lib/include/rtems/rtems lib/include/rtems/posix \
45    lib/include/netinet lib/include/libc lib/include/libc/sys \
46    lib/include/motorola lib/include/zilog \
47    $(LIBKA9Q) \
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
57all: env
58debug: env
59profile: env
60
61install: all install_files
62debug_install: env debug install_files
63profile_install: env profile install_files
64
65debug_all: debug
66profile_all: profile
67
68# top level clean/clobber will delete the install points
69clean_WRAPUP = $(MAKE) clean_wrapup
70clobber_WRAPUP = $(MAKE) clean_wrapup
71
72clean_wrapup: clean_tools clean_dirs clean_modules
73
74.PHONY: dirs clean_wrapup clean_dirs clean_tools clean_modules env install
75
76dirs:
77        -test -d $(PROJECT_ROOT)/c/src/lib/libhwapi && \
78            (cd $(PROJECT_ROOT)/c/src/lib/libhwapi ; $(MAKE) mkdirs)
79        -$(MKDIR) ${CREATE_DIRS:%=$(PROJECT_ROOT)/$(RTEMS_BSP)/%}
80#       @echo Making directories in build tree ...
81#       -$(foreach dir,$(CREATE_DIRS), \
82#           $(shell $(MKDIR) $(PROJECT_ROOT)/$(RTEMS_BSP)/$(dir)))
83
84distclean: clobber
85
86clean_dirs:
87        $(RM) -r $(PROJECT_RELEASE)
88
89clean_tools:
90        cd build-tools; $(MAKE) clean
91
92# NOTE: The wildcard on the install should pick up everything except
93#       the tests directory.  This significantly minimizes the install size.
94
95
96install_files:
97         -$(MKDIR) $(prefix)/
98         -$(MKDIR) $(prefix)/rtems
99         -$(MKDIR) $(prefix)/rtems/make
100         -$(MKDIR) $(prefix)/rtems/make/compilers
101         -$(MKDIR) $(prefix)/rtems/make/custom
102        -rm -rf $(prefix)/rtems/$(RTEMS_BSP)
103        cd ../; tar cf - make $(RTEMS_BSP)/[bilsu]* | \
104                (cd $(prefix)/rtems; tar xpBf - )
105        (echo RTEMS_BSP = $(RTEMS_BSP) ; $(CAT) make/Templates/Makefile.inc ) \
106                > $(prefix)/rtems/$(RTEMS_BSP)/Makefile.inc
107
108tests:
109        cd src/tests; $(MAKE) all
110
111env:    $(SRCS) dirs
Note: See TracBrowser for help on using the repository browser.