summaryrefslogtreecommitdiffstats
path: root/make/custom/default.cfg
blob: 52f9dff00241d3973e7e4f1a20781b0e0098ceda (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# Default target settings
#
# Some of these values are redefined in the target specific .cfg files.
#
# Created by Jiri Gaisler, 16-03-97  (who is owed a debt of gratitude
#   for the initial RTEMS autoconf support.  Thanks. --joel)
#
#  $Id$
#

include $(exec_prefix)/$(RTEMS_BSP)/make/target.cfg
include $(RTEMS_ROOT)/make/host.cfg

include $(RTEMS_ROOT)/make/main.cfg
include $(exec_prefix)/$(RTEMS_BSP)/make/bsp.cfg

## Target compiler config file, if any
CONFIG.CC = $(RTEMS_ROOT)/make/compilers/gcc-target-default.cfg

# Base name of start file
START_BASE=start

## what to do about $(EXEEXT) --> $(EXEEXT)
##    -o $(basename $@)$(EXEEXT)             OR
##    -o $(basename $@)$(EXEEXT)                  OR

EXEEXT=.exe
DOWNEXT=.ralf

define bsp-link-c
	$(LINK.c) $(CPU_CFLAGS) $(AM_CFLAGS) $(AM_LDFLAGS) \
	    -o $(basename $@)$(EXEEXT) $(LINK_OBJS) $(LINK_LIBS)
endef

define bsp-link-cxx
	$(LINK.cc) $(CPU_CFLAGS) $(AM_CFLAGS) $(AM_LDFLAGS) \
	    -o $(basename $@)$(EXEEXT) $(LINK_OBJS) $(LINK_LIBS)
endef

define default-bsp-post-link
	$(NM) -g -n $@ > $(basename $@).num
	$(SIZE) $@
endef

define bsp-post-link
	$(default-bsp-post-link)
	cp $(basename $@)$(EXEEXT) $(basename $@)$(DOWNEXT)
endef

define make-exe
       $(bsp-link-c)
       $(bsp-post-link)
endef

define make-cxx-exe
       $(bsp-link-cxx)
       $(bsp-post-link)
endef