Author Topic: Makefile help?  (Read 1216 times)

endercraft4 (OP)

  • Posts: 35
Makefile help?
« on: October 12, 2014, 09:45:53 pm »
I have been working on a game using SDL 2, and tried to compile for the zero.. It's a little confusing.
Would someone help show me how to form a proper makefile for the Zero.

The makefile so far.

OBJS = mainfile.cpp files/Texturefile.cpp files/mixer.cpp

CC = g++
Z = /opt/gcw0-toolchain/usr/bin/mipsel-linux-g++

COMPILER_FLAGS = -w
LINKER_FLAGS = -lSDL2 -lSDL2_image -lSDL2_mixer
OBJ_NAME = JR
all : $(OBJS)
   $(Z) $(OBJS) $(COMPILER_FLAGS) $(LINKER_FLAGS) -o $(OBJ_NAME)

Works with ubuntu. When I run it from the zero it just says "Permission denied"

zear

  • * Moderator
  • Posts: 2381
Re: Makefile help?
« Reply #1 on: October 12, 2014, 10:01:29 pm »
Works with ubuntu. When I run it from the zero it just says "Permission denied"
It's not a Makefile problem. It's a file permissions problem. Run:
Code: [Select]
chmod +x ./your_binary to set the execution rights, then attempt to run it again.

endercraft4 (OP)

  • Posts: 35
Re: Makefile help?
« Reply #2 on: October 12, 2014, 11:10:10 pm »
It works!
Thanks Zear.