blob: 308aa6fea69465bc3eccc939b8dc1cc1c95ccbf9 (
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
|
#
# Makefile for hello world example
#
MAIN=hello
# Tool paths
tooldir=/opt/gnatrtems
rtemsdir=${tooldir}/powerpc-rtems/score603e
# Tool names
GCC=${tooldir}/bin/powerpc-rtems-gcc
GNATMAKE=${tooldir}/bin/powerpc-rtems-gnatmake
SIZE=${tooldir}/bin/powerpc-rtems-size
OBJCOPY=${tooldir}/bin/powerpc-rtems-objcopy
PACKHEX=${tooldir}/bin/packhex
CARGS=-B${rtemsdir}/lib/ -specs bsp_specs -qrtems -mcpu=603
all: init.o
$(GNATMAKE) -v -O -gnata -gnatE -gnato $(MAIN) -g \
-bargs -Mgnat_main \
-cargs $(CARGS) \
-largs $(CARGS) init.o
$(SIZE) $(MAIN)
$(OBJCOPY) -O srec $(MAIN) $(MAIN).s1
sed -e 's/.$$//' $(MAIN).s1 | $(PACKHEX) > $(MAIN).exe
rm -f $(MAIN).s1
init.o: init.c
$(GCC) -O4 -g -Wall -ansi -fasm $(CARGS) -c init.c
run:
@ echo Must run on the real target
gdb:
@ echo No real target
clean:
rm -f b~* *.o *.ali $(MAIN) $(MAIN).exe $(MAIN).s1 $(MAIN).num
|