source: rtems/Makefile.in @ 37717818

4.104.114.84.9
Last change on this file since 37717818 was 37717818, checked in by Joel Sherrill <joel.sherrill@…>, on Nov 30, 1997 at 6:34:11 PM

Serious cleanup to reduce the number of explicitly listed Makefiles,
eliminated autoconf looking for commands which are unused, and reduce the
number of Makefiles generated.

  • Property mode set to 100644
File size: 3.3 KB
Line 
1#
2# top level directory for RTEMS build tree
3#
4# Modified by Jiri to implement autoconf and cygnus one-tree build
5#
6
7@SET_MAKE@
8srcdir = @srcdir@
9prefix = @prefix@
10exec_prefix = @exec_prefix@
11bindir = @bindir@
12libdir = @libdir@
13includedir = @includedir@
14target = @target@
15manext = 1
16mandir = @mandir@/man$(manext)
17program_prefix = @program_prefix@
18
19
20VPATH=@srcdir@
21
22CFLAGS = @CFLAGS@
23CPPFLAGS = @CPPFLAGS@
24DEFS = @DEFS@
25LDFLAGS =
26LIBS = @LIBS@
27CC_FOR_BUILD = gcc
28
29
30CC_FOR_TARGET = $(program_prefix)gcc
31AS_FOR_TARGET = $(program_prefix)as
32AR_FOR_TARGET = $(program_prefix)ar
33NM_FOR_TARGET = $(program_prefix)nm
34LD_FOR_TARGET = $(program_prefix)ld
35OBJCOPY_FOR_TARGET = $(program_prefix)objcopy
36SIZE_FOR_TARGET = $(program_prefix)size
37
38RTEMS_ROOT = @RTEMS_ROOT@
39RTEMS_HOST = @RTEMS_HOST@
40PROJECT_ROOT = @PROJECT_ROOT@
41RTEMS_USE_OWN_PDIR = @RTEMS_USE_OWN_PDIR@
42RTEMS_HAS_POSIX_API = @RTEMS_HAS_POSIX_API@
43RTEMS_HAS_KA9Q = @RTEMS_HAS_KA9Q@
44RTEMS_HAS_CPLUSPLUS = @RTEMS_HAS_CPLUSPLUS@
45RTEMS_USE_MACROS = @RTEMS_USE_MACROS@
46RTEMS_USE_GCC272 = @RTEMS_USE_GCC272@
47RTEMS_LIBC_DIR = @RTEMS_LIBC_DIR@
48
49ifeq ($(RTEMSBSP),)
50  RTEMS_BSP = @RTEMS_BSP@
51else
52  RTEMS_BSP = $(RTEMSBSP)
53endif
54
55include $(RTEMS_ROOT)/make/main.cfg
56
57MTARGETS = all install $(TARGET_VARIANTS) $(TARGET_VARIANTS:%=%_all) \
58  $(TARGET_VARIANTS:%=%_install) $(TARGET_VARIANTS:%=%_tests) \
59  clean_wrapup distclean clean_dirs clean_tools tests clean depend
60
61.PHONY: clean_modules make_subdir
62
63EXIT_CMD = exit 1
64
65# Don't pass flags from previous make - especially NOT CFLAGS
66override MAKEFLAGS=
67
68$(MTARGETS): make_subdir
69        BASEDIR=`pwd`; \
70        for bsp in $(RTEMS_BSP) xxx; \
71        do if [ $$bsp != xxx ] ; then  \
72            cd $$BASEDIR; \
73            cmd="cd c; $(MAKE) RTEMS_BSP=$$bsp $(FLAGS_TO_PASS) \
74            RTEMS_CUSTOM=$(RTEMS_ROOT)/make/custom/$$bsp.cfg \
75            INSTALL=$(PROJECT_ROOT)/$$bsp/build-tools/install-if-change \
76            \"CC=$(CC_FOR_TARGET)\" \
77            \"XCFLAGS=$(CFLAGS_FOR_TARGET)\" \
78            \"CC_FOR_BUILD=$(CC_FOR_BUILD)\" \
79            \"AS=$(AS_FOR_TARGET)\" \
80            \"LD=$(LD_FOR_TARGET)\" \
81            \"NM=$(NM_FOR_TARGET)\" \
82            \"AR=$(AR_FOR_TARGET)\" \
83            \"SIZE=$(SIZE_FOR_TARGET)\" \
84            \"OBJCOPY=$(OBJCOPY_FOR_TARGET)\" \
85            \"RTEMS_ROOT=$(RTEMS_ROOT)\" \
86            \"RTEMS_HOST=$(RTEMS_HOST)\" \
87            \"PROJECT_HOME=$(PROJECT_ROOT)/$$bsp\" \
88            \"PROJECT_ROOT=$(PROJECT_ROOT)\" \
89            \"RTEMS_USE_OWN_PDIR=$(RTEMS_USE_OWN_PDIR)\" \
90            \"RTEMS_HAS_POSIX_API=$(RTEMS_HAS_POSIX_API)\" \
91            \"RTEMS_HAS_KA9Q=$(RTEMS_HAS_KA9Q)\" \
92            \"RTEMS_HAS_CPLUSPLUS=$(RTEMS_HAS_CPLUSPLUS)\" \
93            \"RTEMS_USE_MACROS=$(RTEMS_USE_MACROS)\" \
94            \"RTEMS_USE_GCC272=$(RTEMS_USE_GCC272)\" \
95            \"RTEMS_LIBC_DIR=$(RTEMS_LIBC_DIR)\" \
96            $@" ; \
97            eval $$cmd || $(EXIT_CMD); \
98        fi; done;
99
100clean_modules:
101        rm -f src/Modules/rtems/.moduleavailcache
102        rm -f src/Modules/rtems/.moduleavailcachedir
103
104make_subdir:
105        if [ ! -d make ] ; then \
106          (cd $(srcdir)/c; tar cf - make/compilers make/custom \
107                make/directory.cfg make/leaf.cfg make/lib.cfg make/main.cfg \
108                make/Templates/Makefile.dir \
109                make/Templates/Makefile.leaf make/Templates/Makefile.lib) | \
110                tar xpBf - ; rm -rf make/CVS make/*/CVS ; \
111          cp c/make/Templates/Makefile.inc make/Templates/Makefile.inc ; \
112        fi
113       
114       
115
Note: See TracBrowser for help on using the repository browser.