summaryrefslogtreecommitdiffstats
path: root/hello_world_ada/Makefile.anybsp
blob: 9020f35dca32e0069ef33b242c0b918233529eef (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
#
#  Makefile for hello world example -- any BSP without special help
#
#  Directly produces an executable for any BSP which directly runs
#  the format (usually ELF) produced by just linking an application.
#  The executables produced by this Makefile should run on at least the
#  following BSPs:
#      arm/edb7312
#      mips/jmr3904
#      powerpc/psim
#      powerpc/score603e
#      sparc/erc32
#      sparc/sis
#

MAIN=hello

include $(RTEMS_MAKEFILE_PATH)/Makefile.inc

include $(RTEMS_CUSTOM)
include $(PROJECT_ROOT)/make/leaf.cfg

ifeq ($(RTEMS_BSP),ep5200)
LINKARGS+=-qnolinkcmds -T$(RTEMS_LINKCMDS)
endif

# Tool helpers
rtemsdir=${RTEMS_MAKEFILE_PATH}
GNATMAKE=$(AS:as=gnatmake)
CARGS =-B${rtemsdir}/lib/ -specs bsp_specs -qrtems $(CPU_CFLAGS) 
CARGS+=-DGNAT_MAIN_STACKSPACE=100

all: init.o 
	$(GNATMAKE) -v -O -gnata -gnatE -gnato $(MAIN) -g \
	    -bargs -Mgnat_main \
	    -largs $(CARGS) $(LINKARGS) init.o
	$(SIZE) $(MAIN)

init.o: init.c
	$(CC) $(CFLAGS) $(CPU_CFLAGS) -c init.c

clean:
	rm -f b~$(MAIN).*  *.o *.ali $(MAIN)