#RollCageX v0.04 (fanmade clone of the original RollCage games)
#Copyright (C) 2009  "Soul Slinger" (on gorcx.net forum)
#
#This program is free software: you can redistribute it and/or modify
#it under the terms of the GNU General Public License as published by
#the Free Software Foundation, either version 3 of the License, or
#(at your option) any later version.
#
#This program is distributed in the hope that it will be useful,
#but WITHOUT ANY WARRANTY; without even the implied warranty of
#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#
#GNU General Public License for more details.
#You should have received a copy of the GNU General Public License
#along with this program.  If not, see <http://www.gnu.org/licenses/>.


SOURCE = main.c shared.c graphics.c physics.c events.c loaders.c
SDL = `sdl-config --cflags --libs`
ODE = `ode-config --cflags --libs`
OGL = -lGL -lGLU
LIBS = $(SDL) $(ODE) $(OGL) -lm

normal: $(SOURCE)
	gcc -o rcx main.c $(LIBS)

#might cause ("nVidious") problems... :-P
static: $(SOURCE)
	gcc -o rcx.static main.c $(LIBS) -static

#only use with a suitable port of gcc (MinGW, CygWin, etc) (look in graphics.c for explanation of BADWM)
win32-static: $(SOURCE)
	gcc -o rcx.exe main.c $(SDL) $(ODE) -lm -lopengl32 -lglu32 -static -lstdc++ -lwinmm -lgdi32 -D BADWM

clean:
	-rm -f rcx rcx.static
