I don’t know if this is what you want. Here’s what I use. SDL is included; anything else you’ll have to add or let me know. What I do is use 2 makefiles one for ‘nix and one for gp2x. I created a win32 with dev c++ so here you go.
GP2X makefile
# Project: Project1
# For gp2x
CPP = g++.exe
CC = gcc.exe
OBJ = gp2x/main.o
LINKOBJ = gp2x/main.o
LIBS = -L"/arm-gp2x-linux/lib" -lSDL_image -lSDL_mixer -lSDL_ttf -lSDL_inifile -lSDL -lpng -ljpeg -lvorbisidec -lmad -lfreetype -lz -lunicodefont
INCS = -I"/arm-gp2x-linux/include" -I"/Tools/include" -I"/Tools/include/SDL"
CXXINCS = -I"/Tools/include/c++/3.4.6/backward" -I"/Tools/include/c++/3.4.6" -I"/Tools/arm-gp2x-linux/include" -I"/Tools/include" -I"/Tools/include/SDL"
BIN = Project1.gpe
CXXFLAGS = $(CXXINCS) -DGP2X
CFLAGS = $(INCS) -D_REENTRANT -DGP2X
RM = rm -f
MKDIR = cygwin-mkdir -p
.PHONY: all all-before all-after clean clean-custom
all: all-before Project1.gpe all-after
all-before:
$(MKDIR) "gp2x"
clean: clean-custom
${RM} $(OBJ) $(BIN)
$(BIN): $(OBJ)
$(CPP) $(LINKOBJ) -o $@ $(LIBS)
gp2x/main.o: main.c
$(CPP) -c main.c -o gp2x/main.o $(CXXFLAGS)
Win32 makefile
# Project: Project1
# For win32
CPP = g++.exe
CC = gcc.exe
WINDRES = windres.exe
RES =
OBJ = win/main.o $(RES)
LINKOBJ = win/main.o $(RES)
LIBS = -L"/lib" -lmingw32 -liconv -lgp2x -lSDL_image -lSDL_mixer -lSDL_ttf -lSDL_inifile -lSDLmain -lSDL -lpng -ljpeg -lvorbisidec -lmad -lfreetype -lz -lunicodefont
INCS = -I"/include/GP2X" -I"/include/SDL" -I"/include"
CXXINCS = -I"/include/GP2X" -I"/include/SDL" -I"/lib/gcc/mingw32/3.4.2/include" -I"/include/c++/3.4.2/backward" -I"/include/c++/3.4.2/mingw32" -I"/include/c++/3.4.2" -I"/include"
BIN = Project1.exe
CXXFLAGS = $(CXXINCS) -DWIN32
CFLAGS = $(INCS) -D_REENTRANT -DWIN32
RM = rm -f
MKDIR = cygwin-mkdir -p
.PHONY: all all-before all-after clean clean-custom
all: all-before Project1.exe all-after
all-before:
$(MKDIR) "win"
clean: clean-custom
${RM} $(OBJ) $(BIN)
$(BIN): $(OBJ)
$(CPP) $(LINKOBJ) -o $@ $(LIBS)
win/main.o: main.c
$(CPP) -c main.c -o win/main.o $(CXXFLAGS)
Good luck, also it might be easier to use DEV C++ or something.
-Malic