diff --git a/.hgignore b/.hgignore new file mode 100644 index 0000000..d791833 --- /dev/null +++ b/.hgignore @@ -0,0 +1,6 @@ +glob:*.dep +glob:*.o +^ag_lua.c$ +^anaglym$ +^sdl_keymap.cc$ +^sdl_keymap.h$ diff --git a/Makefile b/Makefile index 69019f2..df31fc0 100644 --- a/Makefile +++ b/Makefile @@ -1,9 +1,9 @@ WINCHECK := $(shell which msys-1.0.dll >/dev/null 2>&1; if [ $$? -eq 0 ]; then echo MSYS; fi) ifeq ($(strip $(WINCHECK)),) -WINDOWS := 0 +PLATFORM := PLATFORM_LINUX else -WINDOWS := 1 +PLATFORM := PLATFORM_WINDOWS endif TARGET := anaglym @@ -46,7 +46,7 @@ VORBISLIBS := -lvorbisfile TOPLEVEL := $(shell pwd) -ifeq ($(WINDOWS),1) +ifeq ($(PLATFORM),PLATFORM_WINDOWS) GLLIBS := -lopengl32 -lglu32 WINDOWSLIBS := -lmingw32 TARGET := $(TARGET).exe @@ -55,7 +55,7 @@ else GLLIBS := -lGL -lGLU endif -export CPPFLAGS := $(LUAINCLUDE) $(SDLINCLUDE) $(ODEINCLUDE) $(FTGLINCLUDE) -I$(TOPLEVEL) +export CPPFLAGS := $(LUAINCLUDE) $(SDLINCLUDE) $(ODEINCLUDE) $(FTGLINCLUDE) -I$(TOPLEVEL) -D$(PLATFORM) export CFLAGS := $(CPPFLAGS) -O2 -Wall export CXXFLAGS := $(CFLAGS) export LDFLAGS := $(LUALIBS) $(ODELIBS) $(GLLIBS) $(WINDOWSLIBS) $(SDLLIBS) $(FTGLLIBS) $(SMPEGLIBS) $(VORBISLIBS) @@ -116,7 +116,7 @@ dist: all svn export lib $@/lib svn export doc $@/doc cp $(TARGET) $@ -ifeq ($(WINDOWS),1) +ifeq ($(PLATFORM),PLATFORM_WINDOWS) # copy DLLs to distribution directory cp -a $(shell which SDL.dll) $@ cp -a $(shell which SDL_image.dll) $@