diff options
Diffstat (limited to 'Makefile.win32')
-rw-r--r-- | Makefile.win32 | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/Makefile.win32 b/Makefile.win32 new file mode 100644 index 0000000..4b64070 --- /dev/null +++ b/Makefile.win32 @@ -0,0 +1,38 @@ +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 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=-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) + +$(TARGET): $(OBJECTS) + $(LD) -o $@ $^ $(LDFLAGS) + +clean: + del $(OBJECTS) $(TARGET) |