In some distributions (like openSUSE 11.2), there is no lua-config utility.
The makefile should try to detect whether the util can be run. If not, the flags needs to be changed to the following to work:
CFLAGS+=$(shell sdl-config --cflags) -o cubo
LIBS=-llua -llualib $(shell sdl-config --libs) -lGL -lGLEW -lGLU -lSDL_mixer -ljpeg
I also had to add "-lGLU" to make the game compile.