Use this Makefile. Change OPEN2X for your system, OBJS to list your object files (.o filenames that match your .c files), TARGET to the name of your application and add in LIBS the static libraries that you use. The example is for basic SDL libs.
CODE
TARGET=myapp.gpe
OBJS=objectfile1.o objectfile2.o objectfile3.o # match objectfile1.c, objectfile2.c and objectfile3.c
OPEN2X = /opt/open2x/gcc-4.1.1-glibc-2.3.6
CC = $(OPEN2X)/bin/arm-open2x-linux-gcc
LD = $(CC)
STRIP = $(OPEN2X)/bin/arm-open2x-linux-strip
CFLAGS_SDL=`$(OPEN2X)/bin/sdl-config --cflags`
LIBS_SDL=`$(OPEN2X)/bin/sdl-config --static-libs`
CFLAGS = -Wall -DGP2X -Werror -I$(OPEN2X)/include $(CFLAGS_SDL)
LDFLAGS=-static -L$(OPEN2X)/lib
LIBS=$(LIBS_SDL)
$(TARGET): $(OBJS)
$(LD) $(LDFLAGS) $(OBJS) -o $@ $(LIBS)
$(STRIP) $@
clean:
rm -f *.o *~
Take into account that the indentation of the last lines is with tabs and only tabs.
Then you can use any develop environment for your source files. I like Kate or Kdevelop for the KDE environment, or even vim from command line. Then place this Makefile in the same directory that your source files object1.c, object2.c and object3.c and run 'make'.