updated to build on Windows

git-svn-id: svn://anubis/misc/wfobj-view@165 bd8a9e45-a331-0410-811e-c64571078777
This commit is contained in:
josh 2009-10-09 19:59:08 +00:00
parent 726d1e9e88
commit f04947830e
2 changed files with 18 additions and 4 deletions

View File

@ -1,6 +1,20 @@
CXX := g++
CXXFLAGS := -O2 `sdl-config --cflags` WINCHECK := $(shell which msys-1.0.dll >/dev/null 2>&1; if [ $$? -eq 0 ]; then echo MSYS; fi)
LDFLAGS := -lGL -lGLU `sdl-config --libs` -lSDL_image ifeq ($(strip $(WINCHECK)),)
WINDOWS := 0
else
WINDOWS := 1
endif
ifeq ($(WINDOWS),1)
GLLIBS := -lopengl32 -lglu32
WINDOWSLIBS := -lmingw32
else
GLLIBS := -lGL -lGLU
endif
export CXXFLAGS := -O2 $(shell sdl-config --cflags)
LDFLAGS := $(GLLIBS) $(WINDOWSLIBS) $(shell sdl-config --libs) -lSDL_image
TARGET := wfobj-view TARGET := wfobj-view
.PHONY: all clean TextureCache wfobj .PHONY: all clean TextureCache wfobj

View File

@ -1,6 +1,6 @@
/* Libraries we use */ /* Libraries we use */
#include <SDL/SDL.h> #include <SDL.h>
#include <GL/gl.h> #include <GL/gl.h>
#include <GL/glu.h> #include <GL/glu.h>
#include <iostream> #include <iostream>