HELP NEEDED!
I tried to compile something, anything, in various ways and can't make a sense of what I am doing wrong. It always goes back to the menu.
I compile and get a dge which I try to run from file explorer in GCW. It just returns me back to the menu.
Is it ok to just run the executable or should I make it into an OPK or something else?
I tried to enable disable various things in makefile flags. I don't understand most of the flags there.
Tried also C and C++ version.
This is my makefile:
OBJS = main.o
TARGET = test.dge
TOOLCHAINDIR = /opt/gcw0-toolchain/usr
BINPATH = $(TOOLCHAINDIR)/bin
ARCH = mipsel-gcw0-linux-uclibc-
CC =$(BINPATH)/$(ARCH)gcc
CXX =$(BINPATH)/$(ARCH)g++
STRIP=$(BINPATH)/$(ARCH)strip
DEFAULT_CFLAGS = $(shell sdl-config --cflags)
MORE_CFLAGS = -I. \
-DENABLE_THREADS -mips32 -O3 -fstrength-reduce -fthread-jumps -fexpensive-optimizations \
-fomit-frame-pointer -frename-registers -pipe -G 0 -D_GNU_SOURCE=1 -D_REENTRANT -DIS_LITTLE_ENDIAN -D_DEBUG \
-DMPU_JZ4740 -ffast-math \
-DUNIX -DBPP16 -DLSB_FIRST -DSOUND -DNO_STDIO_REDIRECT \
-DDINGUX_MODE
LIB_PATH = $(TOOLCHAINDIR)/lib
CFLAGS = $(DEFAULT_CFLAGS) $(MORE_CFLAGS)
CXXFLAGS = $(CFLAGS)
LDFLAGS = -s -L$(LIB_PATH)
LIBS += -lSDL -lSDL_image -lpng -lz -lm -lpthread -ldl
.c.o:
$(CXX) $(CXXFLAGS) -c $< -o [email protected]
$(TARGET): $(OBJS)
$(CXX) $(LDFLAGS) $(CFLAGS) $(OBJS) $(LIBS) -o $(TARGET) && $(STRIP) $(TARGET)
clean:
rm -f $(OBJS) $(TARGET)
ctags:
ctags *[ch]
So what?
p.s. Maybe if there is a very elementary program, a helloworld with a proper makefile to run with this toolchain, that we know it works. And I can try it here. I have the toolchain in cygwin, extracted it from within cygwin. Seems fine.