source: rtems/c/Makefile.in @ 2a1a547

4.104.114.84.95
Last change on this file since 2a1a547 was 2a1a547, checked in by Joel Sherrill <joel.sherrill@…>, on Aug 27, 1997 at 8:29:26 PM

Added rule so TARGET_VARIANTS are dependent on the environment stuff.

  • 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@
21
22include $(RTEMS_CUSTOM)
23include $(RTEMS_ROOT)/make/directory.cfg
24
25# dubious, but needed by rtems-glom ...
26export PROJECT_HOME
27
28SUB_DIRS=build-tools src
29
30# We only make the install point for the KA9Q header files if it is enabled.
31LIBKA9Q_yes_V = include/ka9q
32LIBKA9Q = $(LIBKA9Q_$(HAS_KA9Q)_V)
33
34# We only make the rtems++ install point if it is enabled.
35LIBRTEMSCPLUSPLUS_yes_V = include/rtems++
36LIBRTEMSCPLUSPLUS = $(LIBRTEMSCPLUSPLUS_$(HAS_CPLUSPLUS)_V)
37
38# directories to be created in install point
39CREATE_DIRS =   include include/sys \
40    include/rtems include/rtems/score include/rtems/rtems include/rtems/posix \
41    include/netinet include/libc include/libc/sys \
42    include/motorola include/zilog \
43    $(LIBKA9Q) \
44    $(LIBRTEMSCPLUSPLUS) \
45    lib bin samples \
46    tests tests/screens tests/screens/sptests \
47    tests/screens/psxtests tests/screens/mptests \
48    tests/screens/mptests/node1 tests/screens/mptests/node2 \
49    build-tools update-tools
50
51# Make all/install must include 'env'
52all: env
53$(TARGET_VARIANTS): env
54$(TARGET_VARIANTS:%=%_install): env
55$(TARGET_VARIANTS:%=%_all): env
56
57# top level clean/clobber will delete the install points
58clean_WRAPUP = $(MAKE) clean_wrapup
59clobber_WRAPUP = $(MAKE) clean_wrapup
60
61clean_wrapup: clean_tools clean_dirs clean_modules
62
63.PHONY: dirs clean_wrapup clean_dirs clean_tools clean_modules env install
64
65#  XXX The link is temporary while switching to -specs options.
66dirs:
67        -test -d $(PROJECT_ROOT)/c/src/lib/libhwapi && \
68            (cd $(PROJECT_ROOT)/c/src/lib/libhwapi ; $(MAKE) mkdirs)
69        -$(MKDIR) ${CREATE_DIRS:%=$(PROJECT_ROOT)/$(RTEMS_BSP)/%}
70        -rm -f $(PROJECT_ROOT)/$(RTEMS_BSP)/include
71        -ln -s $(PROJECT_ROOT)/$(RTEMS_BSP)/include \
72                $(PROJECT_ROOT)/$(RTEMS_BSP)/lib/include
73
74distclean: clobber
75
76clean_dirs:
77        $(RM) -r $(PROJECT_RELEASE)
78
79clean_tools:
80        cd build-tools; $(MAKE) clean
81
82# NOTE: The wildcard on the install should pick up everything except
83#       the tests directory.  This significantly minimizes the install size.
84install: all
85         -$(MKDIR) $(prefix)/$(target)
86         -$(MKDIR) $(prefix)/$(target)/rtems
87         -$(MKDIR) $(prefix)/$(target)/rtems/make
88         -$(MKDIR) $(prefix)/$(target)/rtems/make/compilers
89         -$(MKDIR) $(prefix)/$(target)/rtems/make/custom
90         -$(MKDIR) $(prefix)/$(target)/rtems/make/os
91        -rm -rf $(prefix)/$(target)/rtems/$(RTEMS_BSP)
92        cd ../; tar cf - $(RTEMS_BSP)/[bilsu]* | \
93                (cd $(prefix)/$(target)/rtems; tar xpBf - )
94        cd $(srcdir); tar cf - make/compilers make/custom make/os \
95                make/leaf.cfg make/directory.cfg make/main.cfg | \
96                (cd $(prefix)/$(target)/rtems; tar xpBf - )
97        echo RTEMS_BSP = $(RTEMS_BSP) > \
98                $(prefix)/$(target)/rtems/$(RTEMS_BSP)/Makefile.inc
99        cat make/Templates/Makefile.inc >> \
100                $(prefix)/$(target)/rtems/$(RTEMS_BSP)/Makefile.inc
101
102tests:
103        cd src/tests; $(MAKE) all
104
105env:    $(SRCS) dirs
Note: See TracBrowser for help on using the repository browser.