GP32 Makefiles For Devkitarm


Ksmiler

Member
Joined
Apr 30, 2003
Messages
123
Location
Yamaguchi, Japan
Hey people, is anyone able to post a template makefile or, a makefile from a project which uses DevkitARM?

I have DevkitAdv makefiles but I dont know how to convert them to work for DevkitARM (if that is even possible).

Thanks #
 
If you look at the gp32wolf3d project on sourceforge the makefile is for devkitadv and makefile.tj is for dfevkitarm... I'm really not sure what was done to it as someone else did it for me ;) (Thanks go out to that person!) but it could give you an idea of what may need to be done...
 
Ahh, now I tried this tutorial and kept on getting the error:

Code:
arm-elf-gcc c:/devkitARM_r8/lib/gpstart.o gpmain.o  -s -LC:/devkitARM_r8/arm-elf/lib -specs=gp32_gpsdk.specs -lgpfont -lgpstdlib -lgpos -lgpgraphic -lgpstdio -lgpsound -lgpmem -lm -o hungry.elf
arm-elf-gcc: gp32_gpsdk.specs: No such file or directory
make: *** [hungry.elf] Error 1

This also occurs when using the batch file to compile :unsure:
 
rtb7 posted on Oct 5 2004 at 07:36 AM said:
do you have this file (gp32_gpsdk.specs) somewhere in the devkitarm folder (arm-elf/lib for me) ?

Yes, I do
 
Last edited by a moderator:
I've created the following makefile which workes for me perfectly well:

Code:
ARM = /home/Predi/GP32/devkitARM_r8
NAME = test
TITLE = Official Test Program
FILES = gpmain.c
AUTHOR = R0x0r Elite
ICON = 
ICONCMD = -b "$(ICON)"
LIBS = -lgpfont -lgpstdlib -lgpos -lgpgraphic -lgpstdio -lgpsound -lgpmem
PREFIX = arm-elf-
FLAGS = $(incdirs) -DLITTLE_ENDIAN -DGP32 -mcpu=arm9tdmi -mtune=arm9tdmi -fexpensive-optimizations -mapcs -Os -mstructure-size-boundary=8 -mno-thumb-interwork -fno-builtin -fno-common -fno-exceptions -finline-functions -fomit-frame-pointer -fshort-enums -ffast-math -fshort-double -I$(ARM)/include -c
LDFLAGS = -specs=gp32_gpsdk.specs -o $(NAME).elf *.o $(ARM)/lib/gpstart.o
TARGET = $(NAME).fxe
CC = $(ARM)/bin/$(PREFIX)gcc

all: $(TARGET)

cleanobjs: 
	@rm *.o

cleanbin: 
	@rm $(NAME).fxe $(NAME).gxb $(NAME).elf

clean: cleanobjs cleanbin
	@echo "Project Cleaned"

$(TARGET): $(NAME).gxb 
	@$(ARM)/bin/b2fxec -t "$(TITLE)" -a "$(AUTHOR)" $? $@

$(NAME).gxb: $(NAME).elf
	@$(ARM)/bin/$(PREFIX)objcopy -O binary $? $@

$(NAME).elf:
	@$(CC) $(FLAGS) $(FILES)
	@$(CC) $(LDFLAGS) $(LIBS)

You have to put a \t in front of the commands above like that:

\t@$(CC) $(FLAGS) $(FILES) so make recognizes it as a seperator ... remember press tabulator.... don not type \t .... ;)
 
Back
Top