Added a new example.

Separated the Makefile in two parts.
This commit is contained in:
spartanj@gmail.com
2012-06-17 02:03:11 -03:00
parent 2335f2d3b8
commit 81c78d960a
10 changed files with 1305 additions and 526 deletions

526
Makefile
View File

@@ -1,535 +1,49 @@
STRLOWERCASE = $(subst A,a,$(subst B,b,$(subst C,c,$(subst D,d,$(subst E,e,$(subst F,f,$(subst G,g,$(subst H,h,$(subst I,i,$(subst J,j,$(subst K,k,$(subst L,l,$(subst M,m,$(subst N,n,$(subst O,o,$(subst P,p,$(subst Q,q,$(subst R,r,$(subst S,s,$(subst T,t,$(subst U,u,$(subst V,v,$(subst W,w,$(subst X,x,$(subst Y,y,$(subst Z,z,$1))))))))))))))))))))))))))
#cross-compiling support
ifeq ($(MINGW32),yes)
BUILD_OS = mingw32
else
ifeq ($(IOS),yes)
BUILD_OS = ios
else
BUILD_OS = $(strip $(call STRLOWERCASE, $(shell uname) ) )
endif
endif
export VERSION = 0.8
export CP = cp
export LN = ln
export LNFLAGS = -s -f
export ARFLAGS = rcs
export DESTDIR = /usr
export DESTLIBDIR = $(DESTDIR)/lib
export DESTINCDIR = $(DESTDIR)/include
export MKDIR = mkdir -p
export RM = rm -rf
FRAMEWORKFLAGS =
STATIC_LIBS =
ifeq ($(BUILD_OS), mingw32)
export AR = i686-w64-mingw32-ar
export CC = i686-w64-mingw32-gcc
export CPP = i686-w64-mingw32-g++
OSLIBEXTENSION = dll
else
ifeq ($(BUILD_OS), ios)
ifeq ($(IOSVERSION),)
ifneq (,$(findstring 4.3,$(XCODE)))
IOSVERSION = 5.1
else
IOSVERSION = 5.0
endif
endif
ifeq ($(STATIC_FT2),)
STATIC_FT2=yes
endif
#if TOOLCHAINPATH is empty
ifeq ($(TOOLCHAINPATH),)
ifeq ($(SIMULATOR),yes)
ARCH = i386
PARCHFLAGS = -m32 -march=i386
PLATNAME = Simulator
else
ARCH = armv7
PARCHFLAGS = -march=armv7 -marm -mcpu=cortex-a8
PLATNAME = OS
endif
#if xcode is 4.3
ifneq (,$(findstring 4.3,$(XCODE)))
TOOLCHAINPATH = /Applications/Xcode.app/Contents/Developer/Platforms/iPhone$(PLATNAME).platform/Developer/usr/bin/
SYSROOTPATH = /Applications/Xcode.app/Contents/Developer/Platforms/iPhone$(PLATNAME).platform/Developer/SDKs/iPhone$(PLATNAME)$(IOSVERSION).sdk
FRAMEWORKPATH = /Applications/Xcode.app/Contents/Developer/Platforms/iPhone$(PLATNAME).platform/Developer/SDKs/iPhone$(PLATNAME)$(IOSVERSION).sdk/System/Library/Frameworks
else
TOOLCHAINPATH = /Developer/Platforms/iPhone$(PLATNAME).platform/Developer/usr/bin/
SYSROOTPATH = /Developer/Platforms/iPhone$(PLATNAME).platform/Developer/SDKs/iPhone$(PLATNAME)$(IOSVERSION).sdk
FRAMEWORKPATH = /Developer/Platforms/iPhone$(PLATNAME).platform/Developer/SDKs/iPhone$(PLATNAME)$(IOSVERSION).sdk/System/Library/Frameworks
endif
export C_INCLUDE_PATH = $(SYSROOTPATH)/usr/include
export CPLUS_INCLUDE_PATH = $(SYSROOTPATH)/usr/include
export LIBRARY_PATH = $(FRAMEWORKPATH)/usr/lib
PLATFORMFLAGS = -arch ${ARCH} -miphoneos-version-min=$(IOSVERSION) -isysroot $(SYSROOTPATH) -I${C_INCLUDE_PATH}
FRAMEWORKFLAGS += -arch ${ARCH} $(PARCHFLAGS) -F$(FRAMEWORKPATH) -L$(SYSROOTPATH)/usr/lib -isysroot $(SYSROOTPATH)
endif
endif
export AR = $(TOOLCHAINPATH)ar
ifeq ($(LLVM_BUILD), yes)
export CC = $(TOOLCHAINPATH)clang
export CPP = $(TOOLCHAINPATH)clang++
else
export CC = $(TOOLCHAINPATH)gcc
export CPP = $(TOOLCHAINPATH)g++
endif
ifneq (,$(findstring cygwin,$(BUILD_OS)))
OSLIBEXTENSION = dll
else
OSLIBEXTENSION = so
endif
SDLCONFIGPATH =
endif
ifeq ($(ARCH),)
ARCHEXT =
else
ARCHEXT =-$(ARCH)
endif
LIBPATH = ./libs/$(BUILD_OS)/$(RELEASETYPE)/
DYLIB = libeepp$(ARCHEXT).$(OSLIBEXTENSION)
ifeq ($(DYNAMIC), yes)
LIB = $(DYLIB)
LIBNAME = $(LIBPATH)$(LIB)
INSTALL = && $(LN) $(LNFLAGS) $(DESTLIBDIR)/$(LIB).$(VERSION) $(DESTLIBDIR)/$(LIB)
else
LIB = libeepp$(ARCHEXT).a
LIBNAME = $(LIBPATH)$(LIB)
INSTALL =
endif
ifeq ($(DEBUGBUILD), yes)
DEBUGFLAGS = -g -DDEBUG -DEE_DEBUG -DEE_MEMORY_MANAGER
RELEASETYPE = debug
else
ifeq ($(LLVM_BUILD), yes)
DEBUGFLAGS = -fno-strict-aliasing -O3 -DNDEBUG -ffast-math
else
DEBUGFLAGS = -fno-strict-aliasing -O3 -s -DNDEBUG -ffast-math
endif
RELEASETYPE = release
endif
ifeq ($(DYNAMIC), yes)
BUILDFLAGS = -fPIC -DEE_EXPORTS
LINKFLAGS = -shared -DEE_EXPORTS
else
BUILDFLAGS =
LINKFLAGS =
endif
ifeq ($(BACKENDS_ALL),yes)
BACKEND_SDL = yes
BACKEND_ALLEGRO = yes
endif
ifeq ($(BACKEND_SDL),)
ifeq ($(BACKEND_ALLEGRO),)
BACKEND_SDL = yes
endif
endif
ifeq ($(BACKEND_SDL),yes)
ifeq ($(BUILD_OS), ios)
TRY_SDL2 = yes
else
ifeq ($(BUILD_OS), darwin)
TRY_SDL2 = yes
else
TRY_SDL2 = no
endif
endif
ifeq ($(TRY_SDL2), yes)
# First check for SDL2
SDLVERSION2 = $(shell type -P $(SDLCONFIGPATH)sdl2-config &>/dev/null && $(SDLCONFIGPATH)sdl2-config --version || echo "")
ifeq ($(SDLVERSION2),)
# Then for SDL 1.2 or SDL 1.3
SDLVERSION = $(shell type -P $(SDLCONFIGPATH)sdl-config &>/dev/null && $(SDLCONFIGPATH)sdl-config --version || echo "")
ifeq ($(SDLVERSION),)
# Default 2.0.0
SDL_VERSION = 2.0.0
else
SDL_VERSION = $(SDLVERSION)
endif
else
SDL_VERSION = $(SDLVERSION2)
endif
else
# First check for SDL 1.2 or SDL 1.3
SDLVERSION = $(shell type -P $(SDLCONFIGPATH)sdl-config &>/dev/null && $(SDLCONFIGPATH)sdl-config --version || echo "")
ifeq ($(SDLVERSION),)
# Then for SDL 2
SDLVERSION2 = $(shell type -P $(SDLCONFIGPATH)sdl2-config &>/dev/null && $(SDLCONFIGPATH)sdl2-config --version || echo "")
ifeq ($(SDLVERSION2),)
# Default 1.2
SDL_VERSION = 1.2
else
SDL_VERSION = $(SDLVERSION2)
endif
else
SDL_VERSION = $(SDLVERSION)
endif
endif
# If version is 1.2.x
ifneq (,$(findstring 1.2,$(SDL_VERSION)))
ifeq ($(BUILD_OS), darwin)
SDL_ADD_LINK = -framework Cocoa -lSDLmain
else
SDL_ADD_LINK =
endif
SDL_BACKEND_LINK = -lSDL $(SDL_ADD_LINK)
SDL_BACKEND_SRC = $(wildcard ./src/eepp/window/backend/SDL/*.cpp)
EE_SDL_VERSION = -DEE_SDL_VERSION_1_2
else
ifeq ($(SHARED_BACKEND),)
#Check if static library exists
SDL_STATIC_FOUND = $(shell ls libs/$(BUILD_OS)/libSDL.a >/dev/null 2>&1 && echo "YES" || echo "NO")
SDL2_STATIC_FOUND = $(shell ls libs/$(BUILD_OS)/libSDL2.a >/dev/null 2>&1 && echo "YES" || echo "NO")
ifeq ($(SDL_STATIC_FOUND),NO)
ifeq ($(SDL2_STATIC_FOUND),NO)
SHARED_BACKEND = yes
endif
endif
endif
# Compile as shared?
ifeq ($(SHARED_BACKEND),yes)
ifneq (,$(findstring 1.3,$(SDL_VERSION)))
ifeq ($(BUILD_OS), darwin)
SDL_ADD_LINK = -framework Cocoa -lSDLmain2
else
SDL_ADD_LINK =
endif
SDL_BACKEND_LINK = -lSDL $(SDL_ADD_LINK)
EE_SDL_VERSION = -DEE_SDL_VERSION_1_3
else
SDL_BACKEND_LINK = -lSDL2
EE_SDL_VERSION = -DEE_SDL_VERSION_2
endif
else
# Compile as static then... ( only SDL 1.3 or SDL 2 allowed )
# If version is 1.3.x
ifneq (,$(findstring 1.3,$(SDL_VERSION)))
SDL_BACKEND_LINK = libs/$(BUILD_OS)/libSDL.a
EE_SDL_VERSION = -DEE_SDL_VERSION_1_3
else
# If version is 2.x.x
SDL_BACKEND_LINK = libs/$(BUILD_OS)/libSDL2$(ARCHEXT).a
EE_SDL_VERSION = -DEE_SDL_VERSION_2
endif
STATIC_LIBS += $(SDL_BACKEND_LINK)
endif
SDL_BACKEND_SRC = $(wildcard ./src/eepp/window/backend/SDL2/*.cpp)
endif
SDL_DEFINE = -DEE_BACKEND_SDL_ACTIVE $(EE_SDL_VERSION)
else
SDL_BACKEND_LINK =
SDL_BACKEND_SRC =
SDL_DEFINE =
endif
ifeq ($(BACKEND_ALLEGRO), yes)
ifeq ($(STATIC_ALLEGRO),)
ifeq ($(BUILD_OS), darwin)
ALLEGRO_BACKEND_LINK = -lallegro -lallegro_main
else
ALLEGRO_BACKEND_LINK = -lallegro
endif
else
ALLEGRO_BACKEND_LINK = libs/$(BUILD_OS)/liballegro$(ARCHEXT).a libs/$(BUILD_OS)/liballegro_main$(ARCHEXT).a
endif
ALLEGRO_BACKEND_SRC = $(wildcard ./src/eepp/window/backend/allegro5/*.cpp)
ALLEGRO_DEFINE = -DEE_BACKEND_ALLEGRO_ACTIVE
else
ALLEGRO_BACKEND_LINK =
ALLEGRO_BACKEND_SRC =
ALLEGRO_DEFINE =
endif
BACKENDFLAGS = $(SDL_DEFINE) $(ALLEGRO_DEFINE)
ifeq ($(LIBSNDFILE_ENABLE),yes)
ifeq ($(MINGW32),yes)
LIBSNDFILE = -llibsndfile-1
else
#if it is cygwin
ifneq (,$(findstring cygwin,$(BUILD_OS)))
LIBSNDFILE = -llibsndfile-1
else
LIBSNDFILE = -lsndfile
endif
endif
SNDFILEFLAG = -DEE_LIBSNDFILE_ENABLED
else
LIBSNDFILE =
SNDFILEFLAG =
endif
ifeq ($(STATIC_FT2),yes)
LIBFREETYPE2 =
INCFREETYPE2 = -I./src/eepp/helper/freetype2/include
else
LIBFREETYPE2 = -lfreetype
ifneq (,$(findstring cygwin,$(BUILD_OS)))
INCFREETYPE2 = -I./src/eepp/helper/freetype2/include
else
INCFREETYPE2 = -I$(DESTINCDIR)/freetype2
endif
endif
ifeq ($(BUILD_OS), ios)
ifeq ($(BACKEND_SDL),yes)
BACKENDINCLUDE = -I./src/eepp/helper/SDL2/include
else
BACKENDINCLUDE = -I./src/eepp/helper/allegro5/include
endif
PLATFORMFLAGS += $(BACKENDINCLUDE)
ifneq ($(GLES2), yes)
ifneq ($(GLES1), yes)
GLES1=yes
endif
endif
endif
FINALFLAGS = $(DEBUGFLAGS) $(SNDFILEFLAG)
ifeq ($(GLES2), yes)
ifneq ($(GLES1), yes)
FINALFLAGS += -DEE_GLES2 -DSOIL_GLES2
GL_VERSION = GLES2
else
FINALFLAGS += -DEE_GLES1 -DSOIL_GLES1 -DEE_GLES2 -DSOIL_GLES2
GL_VERSION = GLES
endif
else
ifeq ($(GLES1), yes)
FINALFLAGS += -DEE_GLES1 -DSOIL_GLES1
GL_VERSION = GLES1
else
GL_VERSION = GL
endif
endif
BASEINC = -I./include/ -I./src/
OTHERINC = $(BASEINC)
BININC = -I./include/
##################### OS BUILD OPTIONS #####################
ifeq ($(BUILD_OS), linux)
LIBS = -lrt -lpthread -lX11 -lopenal -lGL -lXcursor $(LIBSNDFILE) $(SDL_BACKEND_LINK) $(ALLEGRO_BACKEND_LINK) $(LIBFREETYPE2)
OTHERINC += $(INCFREETYPE2)
PLATFORMSRC = $(wildcard ./src/eepp/window/platform/x11/*.cpp) $(wildcard ./src/eepp/system/platform/posix/*.cpp)
else
ifeq ($(BUILD_OS), darwin)
LIBS = -framework OpenGL -framework OpenAL -framework CoreFoundation -framework AGL $(LIBSNDFILE) $(SDL_BACKEND_LINK) $(ALLEGRO_BACKEND_LINK) $(LIBFREETYPE2)
OTHERINC += $(INCFREETYPE2) -I/usr/local/include/freetype2
PLATFORMSRC = $(wildcard ./src/eepp/window/platform/osx/*.cpp) $(wildcard ./src/eepp/system/platform/posix/*.cpp)
else
ifeq ($(BUILD_OS), haiku)
LIBS = -lopenal -lGL $(SDL_BACKEND_LINK) $(LIBFREETYPE2)
OTHERINC += $(INCFREETYPE2)
PLATFORMSRC = $(wildcard ./src/eepp/system/platform/posix/*.cpp)
else
ifeq ($(BUILD_OS), freebsd)
LIBS = -lrt -lpthread -lX11 -lopenal -lGL -lXcursor $(LIBSNDFILE) $(SDL_BACKEND_LINK) $(ALLEGRO_BACKEND_LINK) $(LIBFREETYPE2)
OTHERINC += $(INCFREETYPE2)
PLATFORMSRC = $(wildcard ./src/eepp/window/platform/x11/*.cpp) $(wildcard ./src/eepp/system/platform/posix/*.cpp)
else
ifeq ($(BUILD_OS), mingw32)
LIBS = -lOpenAL32 -lopengl32 -lmingw32 -lglu32 -lgdi32 -static-libgcc -static-libstdc++ -mwindows $(LIBSNDFILE) $(SDL_BACKEND_LINK) $(ALLEGRO_BACKEND_LINK) $(LIBFREETYPE2)
OTHERINC += $(INCFREETYPE2)
PLATFORMSRC = $(wildcard ./src/eepp/window/platform/win/*.cpp) $(wildcard ./src/eepp/system/platform/win/*.cpp)
else
#if it is cygwin
ifneq (,$(findstring cygwin,$(BUILD_OS)))
LIBS = -lOpenAL32 -lmingw32 -lopengl32 -lglu32 -lgdi32 -static-libgcc -mwindows $(LIBSNDFILE) $(SDL_BACKEND_LINK) $(ALLEGRO_BACKEND_LINK) $(LIBFREETYPE2)
OTHERINC += -I./src/eepp/helper/zlib $(INCFREETYPE2)
PLATFORMSRC = $(wildcard ./src/eepp/window/platform/win/*.cpp) $(wildcard ./src/eepp/system/platform/win/*.cpp)
else
ifeq ($(BUILD_OS), ios)
LIBS = -static-libgcc -static-libstdc++ -framework OpenGLES -framework OpenAL -framework AudioToolbox -framework CoreAudio -framework Foundation -framework CoreFoundation -framework UIKit -framework QuartzCore -framework CoreGraphics $(SDL_BACKEND_LINK) $(ALLEGRO_BACKEND_LINK)
OTHERINC += $(INCFREETYPE2)
ifeq ($(ARCH),armv7)
OTHERINC += -DU_HAVE_GCC_ATOMICS=0
endif
PLATFORMSRC = $(wildcard ./src/eepp/system/platform/posix/*.cpp)
endif
#endif ios
endif
#endif cygwin
endif
#endif mingw32
endif
#endif freebsd
endif
#endif haiku
endif
#endif darwin
endif
#endif linux
##################### OS BUILD OPTIONS #####################
export CFLAGS = $(ARCHFLAGS) -Wall -Wno-unknown-pragmas $(FINALFLAGS) $(BUILDFLAGS) $(BACKENDFLAGS) $(PLATFORMFLAGS)
export CFLAGSEXT = $(ARCHFLAGS) $(FINALFLAGS) $(BUILDFLAGS) $(PLATFORMFLAGS)
export LDFLAGS = $(ARCHFLAGS) $(LINKFLAGS) $(FRAMEWORKFLAGS)
HELPERSFLAGS = -DSTBI_FAILURE_USERMSG -DFT2_BUILD_LIBRARY
HELPERSINC = -I./include/eepp/helper/chipmunk -I./src/eepp/helper/zlib -I./src/eepp/helper/freetype2/include -I./include/eepp/helper/SOIL -I./include/eepp/helper/glew
ifeq ($(BUILD_OS), mingw32)
OSEXTENSION = .exe
else
OSEXTENSION =
endif
ifeq ($(BUILD_OS), haiku)
SRCGLEW =
else
ifeq ($(BUILD_OS), ios)
SRCGLEW =
else
SRCGLEW = $(wildcard ./src/eepp/helper/glew/*.c)
endif
endif
ifeq ($(STATIC_FT2), yes)
SRCFREETYPE = $(wildcard ./src/eepp/helper/freetype2/src/*/*.c)
else
SRCFREETYPE =
endif
SRCHELPERS = $(SRCFREETYPE) $(SRCGLEW) $(wildcard ./src/eepp/helper/SOIL/*.c) $(wildcard ./src/eepp/helper/stb_vorbis/*.c) $(wildcard ./src/eepp/helper/zlib/*.c) $(wildcard ./src/eepp/helper/libzip/*.c) $(wildcard ./src/eepp/helper/chipmunk/*.c) $(wildcard ./src/eepp/helper/chipmunk/constraints/*.c)
SRCMODULES = $(wildcard ./src/eepp/helper/haikuttf/*.cpp) $(wildcard ./src/eepp/base/*.cpp) $(wildcard ./src/eepp/audio/*.cpp) $(wildcard ./src/eepp/gaming/*.cpp) $(wildcard ./src/eepp/gaming/mapeditor/*.cpp) $(wildcard ./src/eepp/graphics/*.cpp) $(wildcard ./src/eepp/graphics/renderer/*.cpp) $(wildcard ./src/eepp/math/*.cpp) $(wildcard ./src/eepp/system/*.cpp) $(wildcard ./src/eepp/ui/*.cpp) $(wildcard ./src/eepp/ui/tools/*.cpp) $(wildcard ./src/eepp/utils/*.cpp) $(wildcard ./src/eepp/window/*.cpp) $(wildcard ./src/eepp/window/backend/null/*.cpp) $(wildcard ./src/eepp/window/platform/null/*.cpp) $(SDL_BACKEND_SRC) $(ALLEGRO_BACKEND_SRC) $(PLATFORMSRC) $(wildcard ./src/eepp/physics/*.cpp) $(wildcard ./src/eepp/physics/constraints/*.cpp)
OBJHELPERS = $(SRCHELPERS:.c=.o)
OBJMODULES = $(SRCMODULES:.cpp=.o)
ifeq ($(ARCH),)
OBJDIR = obj/$(BUILD_OS)/$(RELEASETYPE)/
else
ifeq ($(BUILD_OS), ios)
OBJDIR = obj/$(BUILD_OS)/$(RELEASETYPE)/$(ARCH)/$(GL_VERSION)/
else
OBJDIR = obj/$(BUILD_OS)/$(RELEASETYPE)/$(ARCH)/
endif
endif
FOBJHELPERS = $(patsubst ./%, $(OBJDIR)%, $(OBJHELPERS) )
FOBJMODULES = $(patsubst ./%, $(OBJDIR)%, $(OBJMODULES) )
-include Makefile.base
# OUT OF EEPP LIB
SRCTEST = $(wildcard ./src/test/*.cpp)
SRCEMPTYWINDOW = $(wildcard ./src/examples/empty_window/*.cpp)
SRCEXTSHADER = $(wildcard ./src/examples/external_shader/*.cpp)
SRCEEIV = $(wildcard ./src/eeiv/*.cpp)
SRCFLUID = $(wildcard ./src/fluid/*.cpp)
SRCPARTICLES = $(wildcard ./src/particles/*.cpp) $(wildcard ./src/eepp/particles/objects/*.cpp) $(wildcard ./src/eepp/particles/gameobjects/*.cpp)
SRCBNB = $(wildcard ./src/bnb/*.cpp)
SRCEMPTYWINDOW = $(wildcard ./src/examples/empty_window/*.cpp)
SRCRHYTHM = $(wildcard ./src/rhythm/*.cpp)
OBJTEST = $(SRCTEST:.cpp=.o)
OBJEMPTYWINDOW = $(SRCEMPTYWINDOW:.cpp=.o)
OBJEEXTSHADER = $(SRCEXTSHADER:.cpp=.o)
OBJEEIV = $(SRCEEIV:.cpp=.o)
OBJFLUID = $(SRCFLUID:.cpp=.o)
OBJBNB = $(SRCBNB:.cpp=.o)
OBJEMPTYWINDOW = $(SRCEMPTYWINDOW:.cpp=.o)
OBJPARTICLES = $(SRCPARTICLES:.cpp=.o)
OBJRHYTHM = $(SRCRHYTHM:.cpp=.o)
FOBJTEST = $(patsubst ./%, $(OBJDIR)%, $(SRCTEST:.cpp=.o) )
FOBJEMTPYWINDOW = $(patsubst ./%, $(OBJDIR)%, $(SRCEMPTYWINDOW:.cpp=.o) )
FOBJEXTSHADER = $(patsubst ./%, $(OBJDIR)%, $(SRCEXTSHADER:.cpp=.o) )
FOBJEEIV = $(patsubst ./%, $(OBJDIR)%, $(SRCEEIV:.cpp=.o) )
FOBJFLUID = $(patsubst ./%, $(OBJDIR)%, $(SRCFLUID:.cpp=.o) )
FOBJBNB = $(patsubst ./%, $(OBJDIR)%, $(SRCBNB:.cpp=.o) )
FOBJEMTPYWINDOW = $(patsubst ./%, $(OBJDIR)%, $(SRCEMPTYWINDOW:.cpp=.o) )
FOBJPARTICLES = $(patsubst ./%, $(OBJDIR)%, $(SRCPARTICLES:.cpp=.o) )
FOBJRHYTHM = $(patsubst ./%, $(OBJDIR)%, $(SRCRHYTHM:.cpp=.o) )
EXE = eetest-$(RELEASETYPE)$(OSEXTENSION)
EXEEMPTYWINDOW = eeew-$(RELEASETYPE)$(OSEXTENSION)
EXEEXTSHADER = eees-$(RELEASETYPE)$(OSEXTENSION)
EXEIV = eeiv-$(RELEASETYPE)$(OSEXTENSION)
EXEFLUID = eefluid-$(RELEASETYPE)$(OSEXTENSION)
EXEBNB = bnb-$(RELEASETYPE)$(OSEXTENSION)
EXEEMPTYWINDOW = eeew-$(RELEASETYPE)$(OSEXTENSION)
EXEPARTICLES = eeparticles-$(RELEASETYPE)$(OSEXTENSION)
EXERHYTHM = rhythm-$(RELEASETYPE)$(OSEXTENSION)
# OUT OF EEPP LIB
FOBJEEPP = $(FOBJMODULES) $(FOBJTEST) $(FOBJEEIV) $(FOBJFLUID) $(FOBJBNB) $(FOBJEMTPYWINDOW) $(FOBJPARTICLES) $(FOBJRHYTHM)
FOBJEEPP = $(FOBJMODULES) $(FOBJTEST) $(FOBJEMTPYWINDOW) $(FOBJEXTSHADER) $(FOBJPARTICLES) $(FOBJRHYTHM) $(FOBJEEIV) $(FOBJFLUID) $(FOBJBNB)
FOBJALL = $(FOBJHELPERS) $(FOBJEEPP)
DEPSEEPP = $(FOBJEEPP:.o=.d)
@@ -596,6 +110,7 @@ dirs:
@$(MKDIR) $(OBJDIR)/src/eepp/physics/constraints
@$(MKDIR) $(OBJDIR)/src/test
@$(MKDIR) $(OBJDIR)/src/examples/empty_window
@$(MKDIR) $(OBJDIR)/src/examples/external_shader
@$(MKDIR) $(OBJDIR)/src/eeiv
@$(MKDIR) $(OBJDIR)/src/fluid
@$(MKDIR) $(OBJDIR)/src/bnb
@@ -638,6 +153,10 @@ $(FOBJEMTPYWINDOW):
$(CPP) -o $@ -c $(patsubst $(OBJDIR)%.o,%.cpp,$@) $(CFLAGS) $(BININC)
@$(CPP) -MT $@ -MM $(patsubst $(OBJDIR)%.o,%.cpp,$@) $(OTHERINC) > $(patsubst %.o,%.d,$@)
$(FOBJEXTSHADER):
$(CPP) -o $@ -c $(patsubst $(OBJDIR)%.o,%.cpp,$@) $(CFLAGS) $(BININC)
@$(CPP) -MT $@ -MM $(patsubst $(OBJDIR)%.o,%.cpp,$@) $(OTHERINC) > $(patsubst %.o,%.d,$@)
$(FOBJRHYTHM):
$(CPP) -o $@ -c $(patsubst $(OBJDIR)%.o,%.cpp,$@) $(CFLAGS) $(BININC)
@$(CPP) -MT $@ -MM $(patsubst $(OBJDIR)%.o,%.cpp,$@) $(OTHERINC) > $(patsubst %.o,%.d,$@)
@@ -657,6 +176,9 @@ $(EXEBNB): $(FOBJHELPERS) $(FOBJMODULES) $(FOBJBNB)
$(EXEEMPTYWINDOW): $(FOBJHELPERS) $(FOBJMODULES) $(FOBJEMTPYWINDOW)
$(CPP) -o ./$(EXEEMPTYWINDOW) $(FOBJHELPERS) $(FOBJMODULES) $(FOBJEMTPYWINDOW) $(LDFLAGS) $(LIBS)
$(EXEEXTSHADER): $(FOBJHELPERS) $(FOBJMODULES) $(FOBJEXTSHADER)
$(CPP) -o ./$(EXEEXTSHADER) $(FOBJHELPERS) $(FOBJMODULES) $(FOBJEXTSHADER) $(LDFLAGS) $(LIBS)
$(EXEPARTICLES): $(FOBJHELPERS) $(FOBJMODULES) $(FOBJPARTICLES)
$(CPP) -o ./$(EXEPARTICLES) $(FOBJHELPERS) $(FOBJMODULES) $(FOBJPARTICLES) $(LDFLAGS) $(LIBS)
@@ -689,6 +211,8 @@ bnb: dirs $(EXEBNB)
ew: dirs $(EXEEMPTYWINDOW)
es: dirs $(EXEEXTSHADER)
particles: dirs $(EXEPARTICLES)
rhythm: dirs $(EXERHYTHM)

496
Makefile.base Normal file
View File

@@ -0,0 +1,496 @@
STRLOWERCASE = $(subst A,a,$(subst B,b,$(subst C,c,$(subst D,d,$(subst E,e,$(subst F,f,$(subst G,g,$(subst H,h,$(subst I,i,$(subst J,j,$(subst K,k,$(subst L,l,$(subst M,m,$(subst N,n,$(subst O,o,$(subst P,p,$(subst Q,q,$(subst R,r,$(subst S,s,$(subst T,t,$(subst U,u,$(subst V,v,$(subst W,w,$(subst X,x,$(subst Y,y,$(subst Z,z,$1))))))))))))))))))))))))))
#cross-compiling support
ifeq ($(MINGW32),yes)
BUILD_OS = mingw32
else
ifeq ($(IOS),yes)
BUILD_OS = ios
else
BUILD_OS = $(strip $(call STRLOWERCASE, $(shell uname) ) )
endif
endif
export VERSION = 0.8
export CP = cp
export LN = ln
export LNFLAGS = -s -f
export ARFLAGS = rcs
export DESTDIR = /usr
export DESTLIBDIR = $(DESTDIR)/lib
export DESTINCDIR = $(DESTDIR)/include
export MKDIR = mkdir -p
export RM = rm -rf
FRAMEWORKFLAGS =
STATIC_LIBS =
ifeq ($(BUILD_OS), mingw32)
export AR = i686-w64-mingw32-ar
export CC = i686-w64-mingw32-gcc
export CPP = i686-w64-mingw32-g++
OSLIBEXTENSION = dll
else
ifeq ($(BUILD_OS), ios)
ifeq ($(IOSVERSION),)
ifneq (,$(findstring 4.3,$(XCODE)))
IOSVERSION = 5.1
else
IOSVERSION = 5.0
endif
endif
ifeq ($(STATIC_FT2),)
STATIC_FT2=yes
endif
#if TOOLCHAINPATH is empty
ifeq ($(TOOLCHAINPATH),)
ifeq ($(SIMULATOR),yes)
ARCH = i386
PARCHFLAGS = -m32 -march=i386
PLATNAME = Simulator
else
ARCH = armv7
PARCHFLAGS = -march=armv7 -marm -mcpu=cortex-a8
PLATNAME = OS
endif
#if xcode is 4.3
ifneq (,$(findstring 4.3,$(XCODE)))
TOOLCHAINPATH = /Applications/Xcode.app/Contents/Developer/Platforms/iPhone$(PLATNAME).platform/Developer/usr/bin/
SYSROOTPATH = /Applications/Xcode.app/Contents/Developer/Platforms/iPhone$(PLATNAME).platform/Developer/SDKs/iPhone$(PLATNAME)$(IOSVERSION).sdk
FRAMEWORKPATH = /Applications/Xcode.app/Contents/Developer/Platforms/iPhone$(PLATNAME).platform/Developer/SDKs/iPhone$(PLATNAME)$(IOSVERSION).sdk/System/Library/Frameworks
else
TOOLCHAINPATH = /Developer/Platforms/iPhone$(PLATNAME).platform/Developer/usr/bin/
SYSROOTPATH = /Developer/Platforms/iPhone$(PLATNAME).platform/Developer/SDKs/iPhone$(PLATNAME)$(IOSVERSION).sdk
FRAMEWORKPATH = /Developer/Platforms/iPhone$(PLATNAME).platform/Developer/SDKs/iPhone$(PLATNAME)$(IOSVERSION).sdk/System/Library/Frameworks
endif
export C_INCLUDE_PATH = $(SYSROOTPATH)/usr/include
export CPLUS_INCLUDE_PATH = $(SYSROOTPATH)/usr/include
export LIBRARY_PATH = $(FRAMEWORKPATH)/usr/lib
PLATFORMFLAGS = -arch ${ARCH} -miphoneos-version-min=$(IOSVERSION) -isysroot $(SYSROOTPATH) -I${C_INCLUDE_PATH}
FRAMEWORKFLAGS += -arch ${ARCH} $(PARCHFLAGS) -F$(FRAMEWORKPATH) -L$(SYSROOTPATH)/usr/lib -isysroot $(SYSROOTPATH)
endif
endif
export AR = $(TOOLCHAINPATH)ar
ifeq ($(LLVM_BUILD), yes)
export CC = $(TOOLCHAINPATH)clang
export CPP = $(TOOLCHAINPATH)clang++
else
export CC = $(TOOLCHAINPATH)gcc
export CPP = $(TOOLCHAINPATH)g++
endif
ifneq (,$(findstring cygwin,$(BUILD_OS)))
OSLIBEXTENSION = dll
else
OSLIBEXTENSION = so
endif
SDLCONFIGPATH =
endif
ifeq ($(ARCH),)
ARCHEXT =
else
ARCHEXT =-$(ARCH)
endif
LIBPATH = ./libs/$(BUILD_OS)/$(RELEASETYPE)/
DYLIB = libeepp$(ARCHEXT).$(OSLIBEXTENSION)
ifeq ($(DYNAMIC), yes)
LIB = $(DYLIB)
LIBNAME = $(LIBPATH)$(LIB)
INSTALL = && $(LN) $(LNFLAGS) $(DESTLIBDIR)/$(LIB).$(VERSION) $(DESTLIBDIR)/$(LIB)
else
LIB = libeepp$(ARCHEXT).a
LIBNAME = $(LIBPATH)$(LIB)
INSTALL =
endif
ifeq ($(DEBUGBUILD), yes)
DEBUGFLAGS = -g -DDEBUG -DEE_DEBUG -DEE_MEMORY_MANAGER
RELEASETYPE = debug
else
ifeq ($(LLVM_BUILD), yes)
DEBUGFLAGS = -fno-strict-aliasing -O3 -DNDEBUG -ffast-math
else
DEBUGFLAGS = -fno-strict-aliasing -O3 -s -DNDEBUG -ffast-math
endif
RELEASETYPE = release
endif
ifeq ($(DYNAMIC), yes)
BUILDFLAGS = -fPIC -DEE_EXPORTS
LINKFLAGS = -shared -DEE_EXPORTS
else
BUILDFLAGS =
LINKFLAGS =
endif
ifeq ($(BACKENDS_ALL),yes)
BACKEND_SDL = yes
BACKEND_ALLEGRO = yes
endif
ifeq ($(BACKEND_SDL),)
ifeq ($(BACKEND_ALLEGRO),)
BACKEND_SDL = yes
endif
endif
ifeq ($(BACKEND_SDL),yes)
ifeq ($(BUILD_OS), ios)
TRY_SDL2 = yes
else
ifeq ($(BUILD_OS), darwin)
TRY_SDL2 = yes
else
TRY_SDL2 = no
endif
endif
ifeq ($(TRY_SDL2), yes)
# First check for SDL2
SDLVERSION2 = $(shell type -P $(SDLCONFIGPATH)sdl2-config &>/dev/null && $(SDLCONFIGPATH)sdl2-config --version || echo "")
ifeq ($(SDLVERSION2),)
# Then for SDL 1.2 or SDL 1.3
SDLVERSION = $(shell type -P $(SDLCONFIGPATH)sdl-config &>/dev/null && $(SDLCONFIGPATH)sdl-config --version || echo "")
ifeq ($(SDLVERSION),)
# Default 2.0.0
SDL_VERSION = 2.0.0
else
SDL_VERSION = $(SDLVERSION)
endif
else
SDL_VERSION = $(SDLVERSION2)
endif
else
# First check for SDL 1.2 or SDL 1.3
SDLVERSION = $(shell type -P $(SDLCONFIGPATH)sdl-config &>/dev/null && $(SDLCONFIGPATH)sdl-config --version || echo "")
ifeq ($(SDLVERSION),)
# Then for SDL 2
SDLVERSION2 = $(shell type -P $(SDLCONFIGPATH)sdl2-config &>/dev/null && $(SDLCONFIGPATH)sdl2-config --version || echo "")
ifeq ($(SDLVERSION2),)
# Default 1.2
SDL_VERSION = 1.2
else
SDL_VERSION = $(SDLVERSION2)
endif
else
SDL_VERSION = $(SDLVERSION)
endif
endif
# If version is 1.2.x
ifneq (,$(findstring 1.2,$(SDL_VERSION)))
ifeq ($(BUILD_OS), darwin)
SDL_ADD_LINK = -framework Cocoa -lSDLmain
else
SDL_ADD_LINK =
endif
SDL_BACKEND_LINK = -lSDL $(SDL_ADD_LINK)
SDL_BACKEND_SRC = $(wildcard ./src/eepp/window/backend/SDL/*.cpp)
EE_SDL_VERSION = -DEE_SDL_VERSION_1_2
else
ifeq ($(SHARED_BACKEND),)
#Check if static library exists
SDL_STATIC_FOUND = $(shell ls libs/$(BUILD_OS)/libSDL.a >/dev/null 2>&1 && echo "YES" || echo "NO")
SDL2_STATIC_FOUND = $(shell ls libs/$(BUILD_OS)/libSDL2.a >/dev/null 2>&1 && echo "YES" || echo "NO")
ifeq ($(SDL_STATIC_FOUND),NO)
ifeq ($(SDL2_STATIC_FOUND),NO)
SHARED_BACKEND = yes
endif
endif
endif
# Compile as shared?
ifeq ($(SHARED_BACKEND),yes)
ifneq (,$(findstring 1.3,$(SDL_VERSION)))
ifeq ($(BUILD_OS), darwin)
SDL_ADD_LINK = -framework Cocoa -lSDLmain2
else
SDL_ADD_LINK =
endif
SDL_BACKEND_LINK = -lSDL $(SDL_ADD_LINK)
EE_SDL_VERSION = -DEE_SDL_VERSION_1_3
else
SDL_BACKEND_LINK = -lSDL2
EE_SDL_VERSION = -DEE_SDL_VERSION_2
endif
else
# Compile as static then... ( only SDL 1.3 or SDL 2 allowed )
# If version is 1.3.x
ifneq (,$(findstring 1.3,$(SDL_VERSION)))
SDL_BACKEND_LINK = libs/$(BUILD_OS)/libSDL.a
EE_SDL_VERSION = -DEE_SDL_VERSION_1_3
else
# If version is 2.x.x
SDL_BACKEND_LINK = libs/$(BUILD_OS)/libSDL2$(ARCHEXT).a
EE_SDL_VERSION = -DEE_SDL_VERSION_2
endif
STATIC_LIBS += $(SDL_BACKEND_LINK)
endif
SDL_BACKEND_SRC = $(wildcard ./src/eepp/window/backend/SDL2/*.cpp)
endif
SDL_DEFINE = -DEE_BACKEND_SDL_ACTIVE $(EE_SDL_VERSION)
else
SDL_BACKEND_LINK =
SDL_BACKEND_SRC =
SDL_DEFINE =
endif
ifeq ($(BACKEND_ALLEGRO), yes)
ifeq ($(STATIC_ALLEGRO),)
ifeq ($(BUILD_OS), darwin)
ALLEGRO_BACKEND_LINK = -lallegro -lallegro_main
else
ALLEGRO_BACKEND_LINK = -lallegro
endif
else
ALLEGRO_BACKEND_LINK = libs/$(BUILD_OS)/liballegro$(ARCHEXT).a libs/$(BUILD_OS)/liballegro_main$(ARCHEXT).a
endif
ALLEGRO_BACKEND_SRC = $(wildcard ./src/eepp/window/backend/allegro5/*.cpp)
ALLEGRO_DEFINE = -DEE_BACKEND_ALLEGRO_ACTIVE
else
ALLEGRO_BACKEND_LINK =
ALLEGRO_BACKEND_SRC =
ALLEGRO_DEFINE =
endif
BACKENDFLAGS = $(SDL_DEFINE) $(ALLEGRO_DEFINE)
ifeq ($(LIBSNDFILE_ENABLE),yes)
ifeq ($(MINGW32),yes)
LIBSNDFILE = -llibsndfile-1
else
#if it is cygwin
ifneq (,$(findstring cygwin,$(BUILD_OS)))
LIBSNDFILE = -llibsndfile-1
else
LIBSNDFILE = -lsndfile
endif
endif
SNDFILEFLAG = -DEE_LIBSNDFILE_ENABLED
else
LIBSNDFILE =
SNDFILEFLAG =
endif
ifeq ($(STATIC_FT2),yes)
LIBFREETYPE2 =
INCFREETYPE2 = -I./src/eepp/helper/freetype2/include
else
LIBFREETYPE2 = -lfreetype
ifneq (,$(findstring cygwin,$(BUILD_OS)))
INCFREETYPE2 = -I./src/eepp/helper/freetype2/include
else
INCFREETYPE2 = -I$(DESTINCDIR)/freetype2
endif
endif
ifeq ($(BUILD_OS), ios)
ifeq ($(BACKEND_SDL),yes)
BACKENDINCLUDE = -I./src/eepp/helper/SDL2/include
else
BACKENDINCLUDE = -I./src/eepp/helper/allegro5/include
endif
PLATFORMFLAGS += $(BACKENDINCLUDE)
ifneq ($(GLES2), yes)
ifneq ($(GLES1), yes)
GLES1=yes
endif
endif
endif
FINALFLAGS = $(DEBUGFLAGS) $(SNDFILEFLAG)
ifeq ($(GLES2), yes)
ifneq ($(GLES1), yes)
FINALFLAGS += -DEE_GLES2 -DSOIL_GLES2
GL_VERSION = GLES2
else
FINALFLAGS += -DEE_GLES1 -DSOIL_GLES1 -DEE_GLES2 -DSOIL_GLES2
GL_VERSION = GLES
endif
else
ifeq ($(GLES1), yes)
FINALFLAGS += -DEE_GLES1 -DSOIL_GLES1
GL_VERSION = GLES1
else
GL_VERSION = GL
endif
endif
BASEINC = -I./include/ -I./src/
OTHERINC = $(BASEINC)
BININC = -I./include/
##################### OS BUILD OPTIONS #####################
ifeq ($(BUILD_OS), linux)
LIBS = -lrt -lpthread -lX11 -lopenal -lGL -lXcursor $(LIBSNDFILE) $(SDL_BACKEND_LINK) $(ALLEGRO_BACKEND_LINK) $(LIBFREETYPE2)
OTHERINC += $(INCFREETYPE2)
PLATFORMSRC = $(wildcard ./src/eepp/window/platform/x11/*.cpp) $(wildcard ./src/eepp/system/platform/posix/*.cpp)
else
ifeq ($(BUILD_OS), darwin)
LIBS = -framework OpenGL -framework OpenAL -framework CoreFoundation -framework AGL $(LIBSNDFILE) $(SDL_BACKEND_LINK) $(ALLEGRO_BACKEND_LINK) $(LIBFREETYPE2)
OTHERINC += $(INCFREETYPE2) -I/usr/local/include/freetype2
PLATFORMSRC = $(wildcard ./src/eepp/window/platform/osx/*.cpp) $(wildcard ./src/eepp/system/platform/posix/*.cpp)
else
ifeq ($(BUILD_OS), haiku)
LIBS = -lopenal -lGL $(SDL_BACKEND_LINK) $(LIBFREETYPE2)
OTHERINC += $(INCFREETYPE2)
PLATFORMSRC = $(wildcard ./src/eepp/system/platform/posix/*.cpp)
else
ifeq ($(BUILD_OS), freebsd)
LIBS = -lrt -lpthread -lX11 -lopenal -lGL -lXcursor $(LIBSNDFILE) $(SDL_BACKEND_LINK) $(ALLEGRO_BACKEND_LINK) $(LIBFREETYPE2)
OTHERINC += $(INCFREETYPE2)
PLATFORMSRC = $(wildcard ./src/eepp/window/platform/x11/*.cpp) $(wildcard ./src/eepp/system/platform/posix/*.cpp)
else
ifeq ($(BUILD_OS), mingw32)
LIBS = -lOpenAL32 -lopengl32 -lmingw32 -lglu32 -lgdi32 -static-libgcc -static-libstdc++ -mwindows $(LIBSNDFILE) $(SDL_BACKEND_LINK) $(ALLEGRO_BACKEND_LINK) $(LIBFREETYPE2)
OTHERINC += $(INCFREETYPE2)
PLATFORMSRC = $(wildcard ./src/eepp/window/platform/win/*.cpp) $(wildcard ./src/eepp/system/platform/win/*.cpp)
else
#if it is cygwin
ifneq (,$(findstring cygwin,$(BUILD_OS)))
LIBS = -lOpenAL32 -lmingw32 -lopengl32 -lglu32 -lgdi32 -static-libgcc -mwindows $(LIBSNDFILE) $(SDL_BACKEND_LINK) $(ALLEGRO_BACKEND_LINK) $(LIBFREETYPE2)
OTHERINC += -I./src/eepp/helper/zlib $(INCFREETYPE2)
PLATFORMSRC = $(wildcard ./src/eepp/window/platform/win/*.cpp) $(wildcard ./src/eepp/system/platform/win/*.cpp)
else
ifeq ($(BUILD_OS), ios)
LIBS = -static-libgcc -static-libstdc++ -framework OpenGLES -framework OpenAL -framework AudioToolbox -framework CoreAudio -framework Foundation -framework CoreFoundation -framework UIKit -framework QuartzCore -framework CoreGraphics $(SDL_BACKEND_LINK) $(ALLEGRO_BACKEND_LINK)
OTHERINC += $(INCFREETYPE2)
ifeq ($(ARCH),armv7)
OTHERINC += -DU_HAVE_GCC_ATOMICS=0
endif
PLATFORMSRC = $(wildcard ./src/eepp/system/platform/posix/*.cpp)
endif
#endif ios
endif
#endif cygwin
endif
#endif mingw32
endif
#endif freebsd
endif
#endif haiku
endif
#endif darwin
endif
#endif linux
##################### OS BUILD OPTIONS #####################
export CFLAGS = $(ARCHFLAGS) -Wall -Wno-unknown-pragmas $(FINALFLAGS) $(BUILDFLAGS) $(BACKENDFLAGS) $(PLATFORMFLAGS)
export CFLAGSEXT = $(ARCHFLAGS) $(FINALFLAGS) $(BUILDFLAGS) $(PLATFORMFLAGS)
export LDFLAGS = $(ARCHFLAGS) $(LINKFLAGS) $(FRAMEWORKFLAGS)
HELPERSFLAGS = -DSTBI_FAILURE_USERMSG -DFT2_BUILD_LIBRARY
HELPERSINC = -I./include/eepp/helper/chipmunk -I./src/eepp/helper/zlib -I./src/eepp/helper/freetype2/include -I./include/eepp/helper/SOIL -I./include/eepp/helper/glew
ifeq ($(BUILD_OS), mingw32)
OSEXTENSION = .exe
else
OSEXTENSION =
endif
ifeq ($(BUILD_OS), haiku)
SRCGLEW =
else
ifeq ($(BUILD_OS), ios)
SRCGLEW =
else
SRCGLEW = $(wildcard ./src/eepp/helper/glew/*.c)
endif
endif
ifeq ($(STATIC_FT2), yes)
SRCFREETYPE = $(wildcard ./src/eepp/helper/freetype2/src/*/*.c)
else
SRCFREETYPE =
endif
SRCHELPERS = $(SRCFREETYPE) $(SRCGLEW) $(wildcard ./src/eepp/helper/SOIL/*.c) $(wildcard ./src/eepp/helper/stb_vorbis/*.c) $(wildcard ./src/eepp/helper/zlib/*.c) $(wildcard ./src/eepp/helper/libzip/*.c) $(wildcard ./src/eepp/helper/chipmunk/*.c) $(wildcard ./src/eepp/helper/chipmunk/constraints/*.c)
SRCMODULES = $(wildcard ./src/eepp/helper/haikuttf/*.cpp) $(wildcard ./src/eepp/base/*.cpp) $(wildcard ./src/eepp/audio/*.cpp) $(wildcard ./src/eepp/gaming/*.cpp) $(wildcard ./src/eepp/gaming/mapeditor/*.cpp) $(wildcard ./src/eepp/graphics/*.cpp) $(wildcard ./src/eepp/graphics/renderer/*.cpp) $(wildcard ./src/eepp/math/*.cpp) $(wildcard ./src/eepp/system/*.cpp) $(wildcard ./src/eepp/ui/*.cpp) $(wildcard ./src/eepp/ui/tools/*.cpp) $(wildcard ./src/eepp/utils/*.cpp) $(wildcard ./src/eepp/window/*.cpp) $(wildcard ./src/eepp/window/backend/null/*.cpp) $(wildcard ./src/eepp/window/platform/null/*.cpp) $(SDL_BACKEND_SRC) $(ALLEGRO_BACKEND_SRC) $(PLATFORMSRC) $(wildcard ./src/eepp/physics/*.cpp) $(wildcard ./src/eepp/physics/constraints/*.cpp)
OBJHELPERS = $(SRCHELPERS:.c=.o)
OBJMODULES = $(SRCMODULES:.cpp=.o)
ifeq ($(ARCH),)
OBJDIR = obj/$(BUILD_OS)/$(RELEASETYPE)/
else
ifeq ($(BUILD_OS), ios)
OBJDIR = obj/$(BUILD_OS)/$(RELEASETYPE)/$(ARCH)/$(GL_VERSION)/
else
OBJDIR = obj/$(BUILD_OS)/$(RELEASETYPE)/$(ARCH)/
endif
endif
FOBJHELPERS = $(patsubst ./%, $(OBJDIR)%, $(OBJHELPERS) )
FOBJMODULES = $(patsubst ./%, $(OBJDIR)%, $(OBJMODULES) )

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProject>
<!-- Written by Qt Creator 2.5.0, 2012-06-09T05:30:44. -->
<!-- Written by Qt Creator 2.5.0, 2012-06-17T01:40:00. -->
<qtcreator>
<data>
<variable>GenericProjectManager.GenericProject.Toolchain</variable>
@@ -58,9 +58,9 @@
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">GenericProjectManager.GenericTarget</value>
<value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value>
<value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">14</value>
<value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
<value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
<value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">8</value>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
<value type="QString" key="GenericProjectManager.GenericBuildConfiguration.BuildDirectory">/home/programming/projects/EE</value>
<value type="QString" key="ProjectExplorer.BuildCOnfiguration.ToolChain">ProjectExplorer.ToolChain.Gcc:{cfef30df-2a59-45c8-a2ae-8c4d944e506e}</value>

View File

@@ -517,3 +517,19 @@
../../src/eeiv/capp.hpp
../../src/eeiv/eeiv.cpp
../../src/eeiv/capp.cpp
../../src/eepp/graphics/renderer/shaders/primitive.vert
../../src/eepp/graphics/renderer/shaders/primitive.frag
../../src/eepp/graphics/renderer/shaders/pointsprite.vert
../../src/eepp/graphics/renderer/shaders/pointsprite.frag
../../src/eepp/graphics/renderer/shaders/clipped.vert
../../src/eepp/graphics/renderer/shaders/clipped.frag
../../src/eepp/graphics/renderer/shaders/base.vert
../../src/eepp/graphics/renderer/shaders/base.frag
../../src/eepp/graphics/renderer/crenderergles2.cpp
../../include/eepp/graphics/renderer/crenderergles2.hpp
../../include/eepp/ee.hpp
../../include/eepp/declares.hpp
../../include/eepp/base.hpp
../../src/eepp/graphics/renderer/shaders/basegl3.vert
../../src/eepp/graphics/renderer/shaders/basegl3.frag
../../src/examples/external_shader/external_shader.cpp

View File

@@ -0,0 +1 @@
// ADD PREDEFINED MACROS HERE!

View File

@@ -0,0 +1 @@
[General]

535
projects/windows/ee.files Normal file
View File

@@ -0,0 +1,535 @@
../../include/eepp/audio/tsoundmanager.hpp
../../include/eepp/audio/tsoundloader.hpp
../../include/eepp/audio/openal.hpp
../../include/eepp/audio/csoundstream.hpp
../../include/eepp/audio/csoundfileogg.hpp
../../include/eepp/audio/csoundfiledefault.hpp
../../include/eepp/audio/csoundfile.hpp
../../include/eepp/audio/csoundbuffer.hpp
../../include/eepp/audio/csound.hpp
../../include/eepp/audio/cmusic.hpp
../../include/eepp/audio/caudioresource.hpp
../../include/eepp/audio/caudiolistener.hpp
../../include/eepp/audio/caudiodevice.hpp
../../include/eepp/audio/base.hpp
../../src/eepp/audio/openal.cpp
../../src/eepp/audio/csoundstream.cpp
../../src/eepp/audio/csoundfileogg.cpp
../../src/eepp/audio/csoundfiledefault.cpp
../../src/eepp/audio/csoundfile.cpp
../../src/eepp/audio/csoundbuffer.cpp
../../src/eepp/audio/csound.cpp
../../src/eepp/audio/cmusic.cpp
../../src/eepp/audio/caudioresource.cpp
../../src/eepp/audio/caudiolistener.cpp
../../src/eepp/audio/caudiodevice.cpp
../../include/eepp/base/utf.hpp
../../include/eepp/base/string.hpp
../../include/eepp/base/stlcontainers.hpp
../../include/eepp/base/memorymanager.hpp
../../include/eepp/base/debug.hpp
../../include/eepp/base/base.hpp
../../include/eepp/base/allocator.hpp
../../include/eepp/base/utf.inl
../../src/eepp/base/string.cpp
../../src/eepp/base/memorymanager.cpp
../../src/eepp/base/debug.cpp
../../include/eepp/system/tsingleton.hpp
../../include/eepp/system/tresourcemanager.hpp
../../include/eepp/system/tcontainer.hpp
../../include/eepp/system/czip.hpp
../../include/eepp/system/ctimer.hpp
../../include/eepp/system/ctimeelapsed.hpp
../../include/eepp/system/cthread.hpp
../../include/eepp/system/cresourceloader.hpp
../../include/eepp/system/crc4.hpp
../../include/eepp/system/cpak.hpp
../../include/eepp/system/cpackmanager.hpp
../../include/eepp/system/cpack.hpp
../../include/eepp/system/cobjectloader.hpp
../../include/eepp/system/cmutex.hpp
../../include/eepp/system/clog.hpp
../../include/eepp/system/ciostreammemory.hpp
../../include/eepp/system/ciostreamfile.hpp
../../include/eepp/system/ciostream.hpp
../../include/eepp/system/cinifile.hpp
../../include/eepp/system/base.hpp
../../src/eepp/system/czip.cpp
../../src/eepp/system/ctimer.cpp
../../src/eepp/system/ctimeelapsed.cpp
../../src/eepp/system/cthread.cpp
../../src/eepp/system/cresourceloader.cpp
../../src/eepp/system/crc4.cpp
../../src/eepp/system/cpak.cpp
../../src/eepp/system/cpackmanager.cpp
../../src/eepp/system/cpack.cpp
../../src/eepp/system/cobjectloader.cpp
../../src/eepp/system/cmutex.cpp
../../src/eepp/system/clog.cpp
../../src/eepp/system/ciostreammemory.cpp
../../src/eepp/system/ciostreamfile.cpp
../../src/eepp/system/cinifile.cpp
../../src/eepp/system/platform/platformimpl.hpp
../../src/eepp/system/platform/posix/ctimerimpl.hpp
../../src/eepp/system/platform/posix/cthreadimpl.hpp
../../src/eepp/system/platform/posix/cmuteximpl.hpp
../../src/eepp/system/platform/posix/ctimerimpl.cpp
../../src/eepp/system/platform/posix/cthreadimpl.cpp
../../src/eepp/system/platform/posix/cmuteximpl.cpp
../../src/eepp/system/platform/win/ctimerimpl.hpp
../../src/eepp/system/platform/win/cthreadimpl.hpp
../../src/eepp/system/platform/win/cmuteximpl.hpp
../../src/eepp/system/platform/win/ctimerimpl.cpp
../../src/eepp/system/platform/win/cthreadimpl.cpp
../../src/eepp/system/platform/win/cmuteximpl.cpp
../../include/eepp/gaming/maphelper.hpp
../../include/eepp/gaming/ctilelayer.hpp
../../include/eepp/gaming/cobjectlayer.hpp
../../include/eepp/gaming/cmap.hpp
../../include/eepp/gaming/clightmanager.hpp
../../include/eepp/gaming/clight.hpp
../../include/eepp/gaming/clayer.hpp
../../include/eepp/gaming/cisomap.hpp
../../include/eepp/gaming/cgameobjectvirtual.hpp
../../include/eepp/gaming/cgameobjectsprite.hpp
../../include/eepp/gaming/cgameobjectshapeex.hpp
../../include/eepp/gaming/cgameobjectshape.hpp
../../include/eepp/gaming/cgameobject.hpp
../../include/eepp/gaming/base.hpp
../../include/eepp/gaming/mapeditor/cuimapnew.hpp
../../include/eepp/gaming/mapeditor/cuimap.hpp
../../include/eepp/gaming/mapeditor/cuilayernew.hpp
../../include/eepp/gaming/mapeditor/cuigotypenew.hpp
../../include/eepp/gaming/mapeditor/cmapproperties.hpp
../../include/eepp/gaming/mapeditor/cmapeditor.hpp
../../include/eepp/gaming/mapeditor/clayerproperties.hpp
../../include/eepp/gaming/mapeditor/base.hpp
../../src/eepp/gaming/ctilelayer.cpp
../../src/eepp/gaming/cobjectlayer.cpp
../../src/eepp/gaming/cmap.cpp
../../src/eepp/gaming/clightmanager.cpp
../../src/eepp/gaming/clight.cpp
../../src/eepp/gaming/clayer.cpp
../../src/eepp/gaming/cisomap.cpp
../../src/eepp/gaming/cgameobjectvirtual.cpp
../../src/eepp/gaming/cgameobjectsprite.cpp
../../src/eepp/gaming/cgameobjectshapeex.cpp
../../src/eepp/gaming/cgameobjectshape.cpp
../../src/eepp/gaming/cgameobject.cpp
../../src/eepp/gaming/mapeditor/cuimapnew.cpp
../../src/eepp/gaming/mapeditor/cuimap.cpp
../../src/eepp/gaming/mapeditor/cuilayernew.cpp
../../src/eepp/gaming/mapeditor/cuigotypenew.cpp
../../src/eepp/gaming/mapeditor/cmapproperties.cpp
../../src/eepp/gaming/mapeditor/cmapeditor.cpp
../../src/eepp/gaming/mapeditor/clayerproperties.cpp
../../include/eepp/graphics/vbohelper.hpp
../../include/eepp/graphics/renders.hpp
../../include/eepp/graphics/pixelperfect.hpp
../../include/eepp/graphics/packerhelper.hpp
../../include/eepp/graphics/glhelper.hpp
../../include/eepp/graphics/fonthelper.hpp
../../include/eepp/graphics/cvertexbuffervbo.hpp
../../include/eepp/graphics/cvertexbufferogl.hpp
../../include/eepp/graphics/cvertexbuffermanager.hpp
../../include/eepp/graphics/cvertexbuffer.hpp
../../include/eepp/graphics/cttffontloader.hpp
../../include/eepp/graphics/cttffont.hpp
../../include/eepp/graphics/ctexturepackertex.hpp
../../include/eepp/graphics/ctexturepackernode.hpp
../../include/eepp/graphics/ctexturepacker.hpp
../../include/eepp/graphics/ctextureloader.hpp
../../include/eepp/graphics/ctexturegrouploader.hpp
../../include/eepp/graphics/ctexturefontloader.hpp
../../include/eepp/graphics/ctexturefont.hpp
../../include/eepp/graphics/ctexturefactory.hpp
../../include/eepp/graphics/ctexture.hpp
../../include/eepp/graphics/ctextcache.hpp
../../include/eepp/graphics/csprite.hpp
../../include/eepp/graphics/cshapegroupmanager.hpp
../../include/eepp/graphics/cshapegroup.hpp
../../include/eepp/graphics/cshape.hpp
../../include/eepp/graphics/cshaderprogrammanager.hpp
../../include/eepp/graphics/cshaderprogram.hpp
../../include/eepp/graphics/cshader.hpp
../../include/eepp/graphics/cscrollparallax.hpp
../../include/eepp/graphics/cprimitives.hpp
../../include/eepp/graphics/cparticlesystem.hpp
../../include/eepp/graphics/cparticle.hpp
../../include/eepp/graphics/cimage.hpp
../../include/eepp/graphics/cglobalshapegroup.hpp
../../include/eepp/graphics/cglobalbatchrenderer.hpp
../../include/eepp/graphics/cframebufferpbuffer.hpp
../../include/eepp/graphics/cframebuffermanager.hpp
../../include/eepp/graphics/cframebufferfbo.hpp
../../include/eepp/graphics/cframebuffer.hpp
../../include/eepp/graphics/cfontmanager.hpp
../../include/eepp/graphics/cfont.hpp
../../include/eepp/graphics/cconsole.hpp
../../include/eepp/graphics/cbatchrenderer.hpp
../../include/eepp/graphics/base.hpp
../../include/eepp/graphics/renderer/crenderergl3.hpp
../../include/eepp/graphics/renderer/crenderergl.hpp
../../include/eepp/graphics/renderer/cgl.hpp
../../include/eepp/graphics/renderer/base.hpp
../../include/eepp/math/math.hpp
../../include/eepp/math/cmtrand.hpp
../../include/eepp/math/base.hpp
../../src/eepp/math/math.cpp
../../src/eepp/math/cmtrand.cpp
../../include/eepp/physics/settings.hpp
../../include/eepp/physics/physicshelper.hpp
../../include/eepp/physics/moment.hpp
../../include/eepp/physics/cspace.hpp
../../include/eepp/physics/cshapesegment.hpp
../../include/eepp/physics/cshapepolysprite.hpp
../../include/eepp/physics/cshapepoly.hpp
../../include/eepp/physics/cshapecirclesprite.hpp
../../include/eepp/physics/cshapecircle.hpp
../../include/eepp/physics/cshape.hpp
../../include/eepp/physics/cphysicsmanager.hpp
../../include/eepp/physics/cbody.hpp
../../include/eepp/physics/carbiter.hpp
../../include/eepp/physics/base.hpp
../../include/eepp/physics/area.hpp
../../include/eepp/physics/constraints/cslidejoint.hpp
../../include/eepp/physics/constraints/csimplemotor.hpp
../../include/eepp/physics/constraints/crotarylimitjoint.hpp
../../include/eepp/physics/constraints/cratchetjoint.hpp
../../include/eepp/physics/constraints/cpivotjoint.hpp
../../include/eepp/physics/constraints/cpinjoint.hpp
../../include/eepp/physics/constraints/cgroovejoint.hpp
../../include/eepp/physics/constraints/cgearjoint.hpp
../../include/eepp/physics/constraints/cdampedspring.hpp
../../include/eepp/physics/constraints/cdampedrotaryspring.hpp
../../include/eepp/physics/constraints/cconstraint.hpp
../../src/eepp/physics/cspace.cpp
../../src/eepp/physics/cshapesegment.cpp
../../src/eepp/physics/cshapepolysprite.cpp
../../src/eepp/physics/cshapepoly.cpp
../../src/eepp/physics/cshapecirclesprite.cpp
../../src/eepp/physics/cshapecircle.cpp
../../src/eepp/physics/cshape.cpp
../../src/eepp/physics/cphysicsmanager.cpp
../../src/eepp/physics/cbody.cpp
../../src/eepp/physics/carbiter.cpp
../../src/eepp/physics/constraints/cslidejoint.cpp
../../src/eepp/physics/constraints/csimplemotor.cpp
../../src/eepp/physics/constraints/crotarylimitjoint.cpp
../../src/eepp/physics/constraints/cratchetjoint.cpp
../../src/eepp/physics/constraints/cpivotjoint.cpp
../../src/eepp/physics/constraints/cpinjoint.cpp
../../src/eepp/physics/constraints/cgroovejoint.cpp
../../src/eepp/physics/constraints/cgearjoint.cpp
../../src/eepp/physics/constraints/cdampedspring.cpp
../../src/eepp/physics/constraints/cdampedrotaryspring.cpp
../../src/eepp/physics/constraints/cconstraint.cpp
../../include/eepp/ui/uihelper.hpp
../../include/eepp/ui/tuiitemcontainer.hpp
../../include/eepp/ui/cuiwinmenu.hpp
../../include/eepp/ui/cuiwindow.hpp
../../include/eepp/ui/cuitooltip.hpp
../../include/eepp/ui/cuithememanager.hpp
../../include/eepp/ui/cuitheme.hpp
../../include/eepp/ui/cuitextinput.hpp
../../include/eepp/ui/cuitextedit.hpp
../../include/eepp/ui/cuitextbox.hpp
../../include/eepp/ui/cuitabwidget.hpp
../../include/eepp/ui/cuitab.hpp
../../include/eepp/ui/cuisprite.hpp
../../include/eepp/ui/cuispinbox.hpp
../../include/eepp/ui/cuisliderbutton.hpp
../../include/eepp/ui/cuislider.hpp
../../include/eepp/ui/cuiskinstate.hpp
../../include/eepp/ui/cuiskinsimple.hpp
../../include/eepp/ui/cuiskincomplex.hpp
../../include/eepp/ui/cuiskin.hpp
../../include/eepp/ui/cuiseparator.hpp
../../include/eepp/ui/cuiselectbutton.hpp
../../include/eepp/ui/cuiscrollbar.hpp
../../include/eepp/ui/cuiradiobutton.hpp
../../include/eepp/ui/cuipushbutton.hpp
../../include/eepp/ui/cuiprogressbar.hpp
../../include/eepp/ui/cuipopupmenu.hpp
../../include/eepp/ui/cuimessagebox.hpp
../../include/eepp/ui/cuimessage.hpp
../../include/eepp/ui/cuimenusubmenu.hpp
../../include/eepp/ui/cuimenuitem.hpp
../../include/eepp/ui/cuimenucheckbox.hpp
../../include/eepp/ui/cuimenu.hpp
../../include/eepp/ui/cuimanager.hpp
../../include/eepp/ui/cuilistboxitem.hpp
../../include/eepp/ui/cuilistbox.hpp
../../include/eepp/ui/cuigridcell.hpp
../../include/eepp/ui/cuigfx.hpp
../../include/eepp/ui/cuigenericgrid.hpp
../../include/eepp/ui/cuieventmouse.hpp
../../include/eepp/ui/cuieventkey.hpp
../../include/eepp/ui/cuievent.hpp
../../include/eepp/ui/cuidropdownlist.hpp
../../include/eepp/ui/cuidragable.hpp
../../include/eepp/ui/cuicontrolanim.hpp
../../include/eepp/ui/cuicontrol.hpp
../../include/eepp/ui/cuicomplexcontrol.hpp
../../include/eepp/ui/cuicommondialog.hpp
../../include/eepp/ui/cuicombobox.hpp
../../include/eepp/ui/cuicheckbox.hpp
../../include/eepp/ui/cuiborder.hpp
../../include/eepp/ui/cuibackground.hpp
../../include/eepp/ui/cuiaquatheme.hpp
../../include/eepp/ui/base.hpp
../../include/eepp/ui/tools/ctexturegroupshapeeditor.hpp
../../include/eepp/ui/tools/ctexturegroupnew.hpp
../../include/eepp/ui/tools/ctexturegroupeditor.hpp
../../src/eepp/ui/uihelper.cpp
../../src/eepp/ui/cuiwinmenu.cpp
../../src/eepp/ui/cuiwindow.cpp
../../src/eepp/ui/cuitooltip.cpp
../../src/eepp/ui/cuithememanager.cpp
../../src/eepp/ui/cuitheme.cpp
../../src/eepp/ui/cuitextinput.cpp
../../src/eepp/ui/cuitextedit.cpp
../../src/eepp/ui/cuitextbox.cpp
../../src/eepp/ui/cuitabwidget.cpp
../../src/eepp/ui/cuitab.cpp
../../src/eepp/ui/cuisprite.cpp
../../src/eepp/ui/cuispinbox.cpp
../../src/eepp/ui/cuisliderbutton.cpp
../../src/eepp/ui/cuislider.cpp
../../src/eepp/ui/cuiskinstate.cpp
../../src/eepp/ui/cuiskinsimple.cpp
../../src/eepp/ui/cuiskincomplex.cpp
../../src/eepp/ui/cuiskin.cpp
../../src/eepp/ui/cuiseparator.cpp
../../src/eepp/ui/cuiselectbutton.cpp
../../src/eepp/ui/cuiscrollbar.cpp
../../src/eepp/ui/cuiradiobutton.cpp
../../src/eepp/ui/cuipushbutton.cpp
../../src/eepp/ui/cuiprogressbar.cpp
../../src/eepp/ui/cuipopupmenu.cpp
../../src/eepp/ui/cuimessagebox.cpp
../../src/eepp/ui/cuimessage.cpp
../../src/eepp/ui/cuimenusubmenu.cpp
../../src/eepp/ui/cuimenuitem.cpp
../../src/eepp/ui/cuimenucheckbox.cpp
../../src/eepp/ui/cuimenu.cpp
../../src/eepp/ui/cuimanager.cpp
../../src/eepp/ui/cuilistboxitem.cpp
../../src/eepp/ui/cuilistbox.cpp
../../src/eepp/ui/cuigridcell.cpp
../../src/eepp/ui/cuigfx.cpp
../../src/eepp/ui/cuigenericgrid.cpp
../../src/eepp/ui/cuieventmouse.cpp
../../src/eepp/ui/cuieventkey.cpp
../../src/eepp/ui/cuievent.cpp
../../src/eepp/ui/cuidropdownlist.cpp
../../src/eepp/ui/cuidragable.cpp
../../src/eepp/ui/cuicontrolanim.cpp
../../src/eepp/ui/cuicontrol.cpp
../../src/eepp/ui/cuicomplexcontrol.cpp
../../src/eepp/ui/cuicommondialog.cpp
../../src/eepp/ui/cuicombobox.cpp
../../src/eepp/ui/cuicheckbox.cpp
../../src/eepp/ui/cuiborder.cpp
../../src/eepp/ui/cuibackground.cpp
../../src/eepp/ui/cuiaquatheme.cpp
../../src/eepp/ui/tools/ctexturegroupshapeeditor.cpp
../../src/eepp/ui/tools/ctexturegroupnew.cpp
../../src/eepp/ui/tools/ctexturegroupeditor.cpp
../../include/eepp/utils/vector3.hpp
../../include/eepp/utils/vector2.hpp
../../include/eepp/utils/utils.hpp
../../include/eepp/utils/triangle2.hpp
../../include/eepp/utils/string.hpp
../../include/eepp/utils/size.hpp
../../include/eepp/utils/safedatapointer.hpp
../../include/eepp/utils/rect.hpp
../../include/eepp/utils/quad2.hpp
../../include/eepp/utils/polygon2.hpp
../../include/eepp/utils/line2.hpp
../../include/eepp/utils/helper.hpp
../../include/eepp/utils/easing.hpp
../../include/eepp/utils/cwaypoints.hpp
../../include/eepp/utils/cperlinnoise.hpp
../../include/eepp/utils/colors.hpp
../../include/eepp/utils/cinterpolation.hpp
../../include/eepp/utils/base.hpp
../../src/eepp/utils/utils.cpp
../../src/eepp/utils/string.cpp
../../src/eepp/utils/safedatapointer.cpp
../../src/eepp/utils/easing.cpp
../../src/eepp/utils/cwaypoints.cpp
../../src/eepp/utils/cperlinnoise.cpp
../../src/eepp/utils/cinterpolation.cpp
../../include/eepp/window/keycodes.hpp
../../include/eepp/window/joycodes.hpp
../../include/eepp/window/inputhelper.hpp
../../include/eepp/window/inputevent.hpp
../../include/eepp/window/cwindow.hpp
../../include/eepp/window/cview.hpp
../../include/eepp/window/cursorhelper.hpp
../../include/eepp/window/cplatformimpl.hpp
../../include/eepp/window/cjoystickmanager.hpp
../../include/eepp/window/cjoystick.hpp
../../include/eepp/window/cinputtextbuffer.hpp
../../include/eepp/window/cinputfinger.hpp
../../include/eepp/window/cinput.hpp
../../include/eepp/window/cengine.hpp
../../include/eepp/window/ccursormanager.hpp
../../include/eepp/window/ccursor.hpp
../../include/eepp/window/cclipboard.hpp
../../include/eepp/window/cbackend.hpp
../../include/eepp/window/base.hpp
../../src/eepp/window/inputhelper.cpp
../../src/eepp/window/cwindow.cpp
../../src/eepp/window/cview.cpp
../../src/eepp/window/cplatformimpl.cpp
../../src/eepp/window/cjoystickmanager.cpp
../../src/eepp/window/cjoystick.cpp
../../src/eepp/window/cinputtextbuffer.cpp
../../src/eepp/window/cinputfinger.cpp
../../src/eepp/window/cinput.cpp
../../src/eepp/window/cengine.cpp
../../src/eepp/window/ccursormanager.cpp
../../src/eepp/window/ccursor.cpp
../../src/eepp/window/cclipboard.cpp
../../src/eepp/window/backend/SDL/cwindowsdl.hpp
../../src/eepp/window/backend/SDL/cjoysticksdl.hpp
../../src/eepp/window/backend/SDL/cjoystickmanagersdl.hpp
../../src/eepp/window/backend/SDL/cinputsdl.hpp
../../src/eepp/window/backend/SDL/ccursorsdl.hpp
../../src/eepp/window/backend/SDL/ccursormanagersdl.hpp
../../src/eepp/window/backend/SDL/cclipboardsdl.hpp
../../src/eepp/window/backend/SDL/cbackendsdl.hpp
../../src/eepp/window/backend/SDL/base.hpp
../../src/eepp/window/backend/SDL/cwindowsdl.cpp
../../src/eepp/window/backend/SDL/cjoysticksdl.cpp
../../src/eepp/window/backend/SDL/cjoystickmanagersdl.cpp
../../src/eepp/window/backend/SDL/cinputsdl.cpp
../../src/eepp/window/backend/SDL/ccursorsdl.cpp
../../src/eepp/window/backend/SDL/ccursormanagersdl.cpp
../../src/eepp/window/backend/SDL/cclipboardsdl.cpp
../../src/eepp/window/backend/SDL2/cwindowsdl.hpp
../../src/eepp/window/backend/SDL2/cjoysticksdl.hpp
../../src/eepp/window/backend/SDL2/cjoystickmanagersdl.hpp
../../src/eepp/window/backend/SDL2/cinputsdl.hpp
../../src/eepp/window/backend/SDL2/ccursorsdl.hpp
../../src/eepp/window/backend/SDL2/ccursormanagersdl.hpp
../../src/eepp/window/backend/SDL2/cclipboardsdl.hpp
../../src/eepp/window/backend/SDL2/cbackendsdl.hpp
../../src/eepp/window/backend/SDL2/base.hpp
../../src/eepp/window/backend/SDL2/cwindowsdl.cpp
../../src/eepp/window/backend/SDL2/cjoysticksdl.cpp
../../src/eepp/window/backend/SDL2/cjoystickmanagersdl.cpp
../../src/eepp/window/backend/SDL2/cinputsdl.cpp
../../src/eepp/window/backend/SDL2/ccursorsdl.cpp
../../src/eepp/window/backend/SDL2/ccursormanagersdl.cpp
../../src/eepp/window/backend/SDL2/cclipboardsdl.cpp
../../src/eepp/window/backend/allegro5/cwindowal.hpp
../../src/eepp/window/backend/allegro5/cjoystickmanageral.hpp
../../src/eepp/window/backend/allegro5/cjoystickal.hpp
../../src/eepp/window/backend/allegro5/cinputal.hpp
../../src/eepp/window/backend/allegro5/ccursormanageral.hpp
../../src/eepp/window/backend/allegro5/ccursoral.hpp
../../src/eepp/window/backend/allegro5/cclipboardal.hpp
../../src/eepp/window/backend/allegro5/cbackendal.hpp
../../src/eepp/window/backend/allegro5/cwindowal.cpp
../../src/eepp/window/backend/allegro5/cjoystickmanageral.cpp
../../src/eepp/window/backend/allegro5/cjoystickal.cpp
../../src/eepp/window/backend/allegro5/cinputal.cpp
../../src/eepp/window/backend/allegro5/ccursormanageral.cpp
../../src/eepp/window/backend/allegro5/ccursoral.cpp
../../src/eepp/window/backend/allegro5/cclipboardal.cpp
../../src/eepp/window/backend/null/cwindownull.hpp
../../src/eepp/window/backend/null/cjoysticknull.hpp
../../src/eepp/window/backend/null/cjoystickmanagernull.hpp
../../src/eepp/window/backend/null/cinputnull.hpp
../../src/eepp/window/backend/null/ccursornull.hpp
../../src/eepp/window/backend/null/ccursormanagernull.hpp
../../src/eepp/window/backend/null/cclipboardnull.hpp
../../src/eepp/window/backend/null/cbackendnull.hpp
../../src/eepp/window/backend/null/cwindownull.cpp
../../src/eepp/window/backend/null/cjoysticknull.cpp
../../src/eepp/window/backend/null/cjoystickmanagernull.cpp
../../src/eepp/window/backend/null/cinputnull.cpp
../../src/eepp/window/backend/null/ccursornull.cpp
../../src/eepp/window/backend/null/ccursormanagernull.cpp
../../src/eepp/window/backend/null/cclipboardnull.cpp
../../src/eepp/window/platform/null/cnullimpl.hpp
../../src/eepp/window/platform/null/cnullimpl.cpp
../../src/eepp/window/platform/osx/cosximpl.hpp
../../src/eepp/window/platform/osx/cosximpl.cpp
../../src/eepp/window/platform/win/cwinimpl.hpp
../../src/eepp/window/platform/win/ccursorwin.hpp
../../src/eepp/window/platform/win/cwinimpl.cpp
../../src/eepp/window/platform/win/ccursorwin.cpp
../../src/eepp/window/platform/x11/cx11impl.hpp
../../src/eepp/window/platform/x11/ccursorx11.hpp
../../src/eepp/window/platform/x11/cx11impl.cpp
../../src/eepp/window/platform/x11/ccursorx11.cpp
../../src/eepp/window/platform/platformimpl.hpp
../../src/eepp/graphics/pixelperfect.cpp
../../src/eepp/graphics/glhelper.cpp
../../src/eepp/graphics/cvertexbuffervbo.cpp
../../src/eepp/graphics/cvertexbufferogl.cpp
../../src/eepp/graphics/cvertexbuffermanager.cpp
../../src/eepp/graphics/cvertexbuffer.cpp
../../src/eepp/graphics/cttffontloader.cpp
../../src/eepp/graphics/cttffont.cpp
../../src/eepp/graphics/ctexturepackertex.cpp
../../src/eepp/graphics/ctexturepackernode.cpp
../../src/eepp/graphics/ctexturepacker.cpp
../../src/eepp/graphics/ctextureloader.cpp
../../src/eepp/graphics/ctexturegrouploader.cpp
../../src/eepp/graphics/ctexturefontloader.cpp
../../src/eepp/graphics/ctexturefont.cpp
../../src/eepp/graphics/ctexturefactory.cpp
../../src/eepp/graphics/ctexture.cpp
../../src/eepp/graphics/ctextcache.cpp
../../src/eepp/graphics/csprite.cpp
../../src/eepp/graphics/cshapegroupmanager.cpp
../../src/eepp/graphics/cshapegroup.cpp
../../src/eepp/graphics/cshape.cpp
../../src/eepp/graphics/cshaderprogrammanager.cpp
../../src/eepp/graphics/cshaderprogram.cpp
../../src/eepp/graphics/cshader.cpp
../../src/eepp/graphics/cscrollparallax.cpp
../../src/eepp/graphics/cprimitives.cpp
../../src/eepp/graphics/cparticlesystem.cpp
../../src/eepp/graphics/cparticle.cpp
../../src/eepp/graphics/cimage.cpp
../../src/eepp/graphics/cglobalshapegroup.cpp
../../src/eepp/graphics/cglobalbatchrenderer.cpp
../../src/eepp/graphics/cframebufferpbuffer.cpp
../../src/eepp/graphics/cframebuffermanager.cpp
../../src/eepp/graphics/cframebufferfbo.cpp
../../src/eepp/graphics/cframebuffer.cpp
../../src/eepp/graphics/cfontmanager.cpp
../../src/eepp/graphics/cfont.cpp
../../src/eepp/graphics/cconsole.cpp
../../src/eepp/graphics/cbatchrenderer.cpp
../../src/eepp/graphics/renderer/crenderergl3.cpp
../../src/eepp/graphics/renderer/crenderergl.cpp
../../src/eepp/graphics/renderer/cgl.cpp
../../src/examples/empty_window/empty_window.cpp
../../src/test/eetest.hpp
../../src/test/eetest.cpp
../../src/eeiv/capp.hpp
../../src/eeiv/eeiv.cpp
../../src/eeiv/capp.cpp
../../src/eepp/graphics/renderer/shaders/primitive.vert
../../src/eepp/graphics/renderer/shaders/primitive.frag
../../src/eepp/graphics/renderer/shaders/pointsprite.vert
../../src/eepp/graphics/renderer/shaders/pointsprite.frag
../../src/eepp/graphics/renderer/shaders/clipped.vert
../../src/eepp/graphics/renderer/shaders/clipped.frag
../../src/eepp/graphics/renderer/shaders/base.vert
../../src/eepp/graphics/renderer/shaders/base.frag
../../src/eepp/graphics/renderer/crenderergles2.cpp
../../include/eepp/graphics/renderer/crenderergles2.hpp
../../include/eepp/ee.hpp
../../include/eepp/declares.hpp
../../include/eepp/base.hpp
../../src/eepp/graphics/renderer/shaders/basegl3.vert
../../src/eepp/graphics/renderer/shaders/basegl3.frag
../../src/examples/external_shader/external_shader.cpp

View File

@@ -318,6 +318,21 @@ void cInputSDL::Update() {
ProcessEvent( &EEEvent );
}
}
#if EE_PLATFORM == EE_PLATFORM_ANDROID
std::list<cInputFinger*> Finger = GetFingersDown();
if ( Finger.size() ) {
InjectMousePos( Finger.front()->x, Finger.front()->y );
InjectButtonPress( EE_BUTTON_LEFT );
} else {
Finger = GetFingersWasDown();
if ( Finger.size() ) {
InjectButtonRelease( EE_BUTTON_LEFT );
}
}
#endif
}
bool cInputSDL::GrabInput() {

View File

@@ -0,0 +1,212 @@
#include <eepp/ee.hpp>
/// This example is based on the WebGL demo from http://minimal.be/lab/fluGL/
Uint32 ParticlesNum = 30000;
cWindow * win;
cShaderProgram * ShaderProgram;
eeFloat tw;
eeFloat th;
eeFloat aspectRatio;
void videoResize() {
/// Video Resize event will re-setup the 2D projection and states, so we must rebuild them.
aspectRatio = (eeFloat)win->GetWidth() / (eeFloat)win->GetHeight();
tw = (eeFloat)win->GetWidth() / 2;
th = (eeFloat)win->GetHeight() / 2;
eeFloat fieldOfView = 30.0;
eeFloat nearPlane = 1.0;
eeFloat farPlane = 10000.0;
eeFloat top = nearPlane * eetan(fieldOfView * EE_PI / 360.0);
eeFloat bottom = -top;
eeFloat right = top * aspectRatio;
eeFloat left = -right;
eeFloat a = (right + left) / (right - left);
eeFloat b = (top + bottom) / (top - bottom);
eeFloat c = (farPlane + nearPlane) / (farPlane - nearPlane);
eeFloat d = (2 * farPlane * nearPlane) / (farPlane - nearPlane);
eeFloat x = (2 * nearPlane) / (right - left);
eeFloat y = (2 * nearPlane) / (top - bottom);
GLfloat perspectiveMatrix[16] = {
x, 0, a, 0,
0, y, b, 0,
0, 0, c, d,
0, 0, -1, 0
};
/// Load the our default projection
GLi->MatrixMode( GL_PROJECTION );
GLi->LoadMatrixf( perspectiveMatrix );
GLi->MatrixMode( GL_MODELVIEW );
/// eepp enables some this client states by default, and textures by default
GLi->Disable( GL_TEXTURE_2D );
GLi->DisableClientState( GL_TEXTURE_COORD_ARRAY );
GLi->DisableClientState( GL_COLOR_ARRAY );
/// GL_VERTEX_ARRAY is needed, so we keep it enabled
GLi->EnableClientState( GL_VERTEX_ARRAY );
/// Reset the default blend func ( by default eepp use ALPHA_NORMAL )
cTextureFactory::instance()->SetPreBlendFunc( ALPHA_BLENDONE );
/// Set the line width
cGlobalBatchRenderer::instance()->SetLineWidth( 2 );
/// Rebind the Shader
ShaderProgram->Bind();
/// If you want to use the fixed-pipeline renderer you'll need to set up the projection and modelview matrix manually.
/// Or if you want to use another name to the projection matrix or the modelview matrix ( programmable pipelines use
/// dgl_ProjectionMatrix and dgl_ModelViewMatrix by default.
if ( GLv_2 == GLi->Version() ) {
ShaderProgram->SetUniformMatrix( "dgl_ProjectionMatrix", perspectiveMatrix );
/// Get the identity matrix and set it to the modelview matrix
GLfloat modelMatrix[16];
GLi->LoadIdentity();
GLi->GetCurrentMatrix( GL_MODELVIEW_MATRIX, modelMatrix );
ShaderProgram->SetUniformMatrix( "dgl_ModelViewMatrix", modelMatrix );
}
}
EE_MAIN_FUNC int main (int argc, char * argv [])
{
win = cEngine::instance()->CreateWindow( WindowSettings( 960, 640, 32, WindowStyle::Default, "", "eepp - External Shaders" ), ContextSettings( true ) );
if ( win->Created() )
{
cInput * imp = win->GetInput();
/// Disable the automatic shader conversion from fixed-pipeline to programmable-pipeline
cShader::Ensure = false;
std::string fs( "#ifdef GL_ES\n\
precision highp float;\n\
#endif\n\
void main() { gl_FragColor = vec4(0.4, 0.01, 0.08, 0.5); }" );
std::string vs( "#ifdef GL_ES\n\
precision highp float;\n\
#endif\n\
attribute vec3 dgl_Vertex;\n\
uniform mat4 dgl_ProjectionMatrix;\n\
uniform mat4 dgl_ModelViewMatrix;\n\
void main() { gl_Position = dgl_ProjectionMatrix * dgl_ModelViewMatrix * vec4(dgl_Vertex, 1.0); }" );
/// Create the new shader program
ShaderProgram = eeNew( cShaderProgram, ( vs.c_str(), vs.size(), fs.c_str(), fs.size() ) );
/// Set the projection
videoResize();
/// Push a window resize callback the reset the projection when needed
win->PushResizeCallback( cb::Make0( &videoResize ) );
Uint32 i;
eeVector3ff * vertices = eeNewArray( eeVector3ff, ParticlesNum );
eeVector3ff * velocities = eeNewArray( eeVector3ff, ParticlesNum );
for (i = 0; i < ParticlesNum; i++ )
{
vertices[i] = eeVector3ff( 0, 0, 1.83 );
velocities[i] = eeVector3ff( (eeRandf() * 2 - 1)*.05, (eeRandf() * 2 - 1)*.05, .93 + eeRandf()*.02 );
}
while ( win->Running() )
{
imp->Update();
if ( imp->IsKeyDown( KEY_ESCAPE ) )
{
win->Close();
}
eeFloat p;
eeVector2f mf = imp->GetMousePosf();
eeFloat tratio = tw / th;
eeFloat touchX = ( mf.x / tw - 1 ) * tratio;
eeFloat touchY = -( mf.y / th - 1 );
bool touch = imp->MouseLeftPressed();
for( i = 0; i < ParticlesNum; i+=2 )
{
// copy old positions
vertices[i].x = vertices[i+1].x;
vertices[i].y = vertices[i+1].y;
// inertia
velocities[i].x *= velocities[i].z;
velocities[i].y *= velocities[i].z;
// horizontal
p = vertices[i+1].x;
p += velocities[i].x;
if ( p < -aspectRatio ) {
p = -aspectRatio;
velocities[i].x = eeabs(velocities[i].x);
} else if ( p > aspectRatio ) {
p = aspectRatio;
velocities[i].x = -eeabs(velocities[i].x);
}
vertices[i+1].x = p;
// vertical
p = vertices[i+1].y;
p += velocities[i].y;
if ( p < -aspectRatio ) {
p = -aspectRatio;
velocities[i].y = eeabs(velocities[i].y);
} else if ( p > aspectRatio ) {
p = aspectRatio;
velocities[i].y = -eeabs(velocities[i].y);
}
vertices[i+1].y = p;
if ( touch ) {
eeFloat dx = touchX - vertices[i].x;
eeFloat dy = touchY - vertices[i].y;
eeFloat d = eesqrt( dx * dx + dy * dy );
if ( d < 2.f ) {
if ( d < 0.03f ) {
vertices[i+1].x = ( eeRandf() * 2 - 1 ) * aspectRatio;
vertices[i+1].y = eeRandf() * 2 - 1;
velocities[i].x = 0;
velocities[i].y = 0;
} else {
dx /= d;
dy /= d;
d = ( 2 - d ) / 2;
d *= d;
velocities[i].x += dx * d * .01;
velocities[i].y += dy * d * .01;
}
}
}
}
/// VertexPointer assigns values by default to the attribute "dgl_Vertex"
/// ColorPointer to "dgl_FrontColor"
/// TextureCoordPointer to "dgl_MultiTexCoord0"
GLi->VertexPointer( 3, GL_FP, sizeof(eeVector3ff), reinterpret_cast<char*> ( &vertices[0] ), 0 );
/// Draw the lines
GLi->DrawArrays( DM_LINES, 0, ParticlesNum );
win->Display();
}
eeSAFE_DELETE_ARRAY( vertices );
eeSAFE_DELETE_ARRAY( velocities );
}
cEngine::DestroySingleton();
EE::MemoryManager::LogResults();
return 0;
}

View File

@@ -845,7 +845,6 @@ void cEETest::LoadTextures() {
mResLoad.Add( eeNew( cSoundLoader, ( &SndMng, "mysound", PAK, "sound.ogg" ) ) );
//mResLoad.Threaded( false );
mResLoad.Load( cb::Make1( this, &cEETest::OnTextureLoaded ) );
TN.resize(12);
@@ -862,12 +861,7 @@ void cEETest::LoadTextures() {
cShapeGroup * SG = cShapeGroupManager::instance()->GetByName( "tiles" );
for ( i = 0; i < 6; i++ ) {
Uint32 ORTO = TF->Load( MyPath + "data/DungeonFloorCenter" + toStr( i + 1 ) + ".png" );
Graphics::cShape * OrtoShape = cGlobalShapeGroup::instance()->Add( ORTO );
//Tiles[i] = SG->GetByName( toStr( i+1 ) );
Tiles[i] = OrtoShape;
Tiles[i] = SG->GetByName( toStr( i+1 ) );
}
Tiles[6] = SG->Add( TF->LoadFromPack( PAK, "objects/1.png" ), "7" );
@@ -1310,21 +1304,6 @@ void cEETest::Input() {
KM->Update();
JM->Update();
#if EE_PLATFORM == EE_PLATFORM_ANDROID
std::list<cInputFinger*> Finger = KM->GetFingersDown();
if ( Finger.size() ) {
KM->InjectMousePos( Finger.front()->x, Finger.front()->y );
KM->InjectButtonPress( EE_BUTTON_LEFT );
} else {
Finger = KM->GetFingersWasDown();
if ( Finger.size() ) {
KM->InjectButtonRelease( EE_BUTTON_LEFT );
}
}
#endif
Mouse = KM->GetMousePos();
Mousef = eeVector2f( (eeFloat)Mouse.x, (eeFloat)Mouse.y );