# # Makefile for hello world example # MAIN=hello # Tool paths target=powerpc-rtems tooldir=/home/joel/gnat-3.11b/${target}/ rtemsdir=${tooldir}/rtems/psim # Tool names GCC=${tooldir}/bin/${target}-gcc GNATMAKE=${tooldir}/bin/${target}-gnatmake SIZE=${tooldir}/bin/${target}-size PSIM=${tooldir}/bin/powerpc-rtems-run GDB=${tooldir}/bin/powerpc-rtems-gdb CARGS=-B${rtemsdir}/lib/ -specs bsp_specs -qrtems -mcpu=603 all: init.o $(GNATMAKE) -v -O -gnata -gnatE -gnato $(MAIN) -g \ -bargs -r \ -cargs $(CARGS) \ -largs $(CARGS) init.o $(SIZE) $(MAIN) init.o: init.c $(GCC) -O4 -g -Wall -ansi -fasm $(CARGS) -c init.c run: -$(PSIM) -o "/#address-cells 2" \ -o "/openprom/options/oea-memory-size 4194304" $(MAIN) @echo Ignore the return code. It is meaningless. gdb: $(GDB) -x gdb.psim $(MAIN) clean: rm -f b_$(MAIN).c b_$(MAIN).o *.o *.ali $(MAIN)