#	for myself, to compil the glut sources, I had to put them in the /usr dir
#	space Delirium need the static glut library: libglut.a
#	place of the glut sources compiled
              TOP = /usr/glut-3.3

#	you must use MY hacked jpeg library which
#	allow you to load images from memory.
#	you have to build the jpeg static libray with g++
#	coz space delirium is a g++ project: edit the Makefile of the jpeg library
#	and put g++ with the CC option
#	place of the compiled jpeg sources
           JPGDIR = /usr/src/jpg/jpeg2

#	place of the modplug xmms plugin sources
#	with static library compiled
	MODPLGDIR = /usr/src/modplugxmms-2.0

    WIN32SOURCES  = Win32

        USRLIBDIR = /usr/X11R6/lib

# compiler options
         LDPRELIB = -L$(USRLIBDIR)
        LDOPTIONS = $(LDPRELIBS)
           CCLINK = $(CC)
	 INCLUDES = -I$(JPGDIR) -I$(WIN32SOURCES) -I$(MODPLGDIR)
#	-ggdb = debugging infos!!
               CC = g++ $(INCLUDES) -w -O3

XMULIBONLY = -lXmu
XMULIB = $(XMULIBONLY) $(XTOOLLIB) $(XLIB)

    USRLIBDIRPATH = $(USRLIBDIR)
        LDPRELIBS = -L$(USRLIBDIR)

GLUT_LIBS = $(GLUT) $(GLU) $(OPENGL) $(XMULIB) $(XLIB) -lm
OPENGL = -lGL
GLU = -lGLU
GLUT = $(TOP)/lib/glut/libglut.a
JPEG = $(JPGDIR)/.libs/libjpeg.a
LIBMODPLUG = $(MODPLGDIR)/libmodplug/.libs/libmodplug.a

TARGETS = spaceDelirium
SRCS = spaceDelirium.c
all:: $(TARGETS)

spaceDelirium: spaceDelirium.o
	$(RM) $@
	$(CCLINK) -o $@ $(LDOPTIONS) spaceDelirium.o $(JPEG) $(LIBMODPLUG) $(GLUT_LIBS) $(LDLIBS)
