summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.win3233
1 files changed, 27 insertions, 6 deletions
diff --git a/Makefile.win32 b/Makefile.win32
index 7201493..4b64070 100644
--- a/Makefile.win32
+++ b/Makefile.win32
@@ -1,12 +1,33 @@
-CXX=g++
-LD=g++
+ifeq ($(shell uname), Linux)
+ CXX=i486-mingw32-g++
+ LD=i486-mingw32-g++
+ ROOT=/usr/i486-mingw32
+else
+ CXX=g++
+ LD=g++
+ ROOT=C:/MinGW
+endif
+
TARGET=foo.exe
#OBJECTS=$(shell ls *.cpp | sed 's/cpp/o/')
-OBJECTS=gl.o gui.o main.o terrain.o noiseutils\noiseutils.o scene.o shader.o tool.o vector.o video.o
+OBJECTS=gl.o gui.o main.o terrain.o scene.o shader.o tool.o vector.o video.o
+
+ifeq ($(shell uname), Linux)
+ OBJECTS+=noiseutils/noiseutils.o
+else
+ OBJECTS+=noiseutils\noiseutils.o
+endif
+
#-D_GNU_SOURCE=1 -D_REENTRANT
-CPPFLAGS=-IC:/MinGW/include/SDL -IC:/MinGW/include/CEGUI/ -IC:/MinGW/include/freetype2 -Wall -g -O3 -mconsole #-mwin32
-LDFLAGS=-lCEGUIOpenGLRenderer -lCEGUIBase -lCEGUITGAImageCodec -lCEGUITinyXMLParser -lCEGUIFalagardWRBase -lCEGUISILLYImageCodec
-LDFLAGS+=-lSDL_image -lftgl -lfreetype -lz -lpcre -lopengl32 -lglu32 -lwinmm -lmingw32 -lSDLmain -lSDL -ljpeg -lstdc++ -lboost_filesystem -lboost_system -lnoise
+CPPFLAGS=-I$(ROOT)/include/SDL -I$(ROOT)/include/CEGUI/ -I$(ROOT)/include/freetype2 -Wall -g -mconsole #-mwin32
+LDFLAGS=-L$(ROOT)/lib -lCEGUIOpenGLRenderer -lCEGUIBase -lCEGUITGAImageCodec -lCEGUITinyXMLParser -lCEGUIFalagardWRBase -lCEGUISILLYImageCodec
+LDFLAGS+=-lSDL_image -lftgl -lfreetype -lz -lpcre -lopengl32 -lglu32 -lwinmm -lmingw32 -lSDLmain -lSDL -ljpeg -lstdc++ -lnoise
+
+ifeq ($(shell uname), Linux)
+ LDFLAGS+=-lboost_filesystem-mt-s -lboost_system-mt-s
+else
+ LDFLAGS+=-lboost_filesystem -lboost_system
+endif
all: $(TARGET)