added PLATFORM definition in Makefile, added .hgignore

This commit is contained in:
Josh Holtrop 2010-12-19 00:11:33 -05:00
parent 7b057bcf86
commit 9e6bb1b22d
2 changed files with 11 additions and 5 deletions

6
.hgignore Normal file
View File

@ -0,0 +1,6 @@
glob:*.dep
glob:*.o
^ag_lua.c$
^anaglym$
^sdl_keymap.cc$
^sdl_keymap.h$

View File

@ -1,9 +1,9 @@
WINCHECK := $(shell which msys-1.0.dll >/dev/null 2>&1; if [ $$? -eq 0 ]; then echo MSYS; fi) WINCHECK := $(shell which msys-1.0.dll >/dev/null 2>&1; if [ $$? -eq 0 ]; then echo MSYS; fi)
ifeq ($(strip $(WINCHECK)),) ifeq ($(strip $(WINCHECK)),)
WINDOWS := 0 PLATFORM := PLATFORM_LINUX
else else
WINDOWS := 1 PLATFORM := PLATFORM_WINDOWS
endif endif
TARGET := anaglym TARGET := anaglym
@ -46,7 +46,7 @@ VORBISLIBS := -lvorbisfile
TOPLEVEL := $(shell pwd) TOPLEVEL := $(shell pwd)
ifeq ($(WINDOWS),1) ifeq ($(PLATFORM),PLATFORM_WINDOWS)
GLLIBS := -lopengl32 -lglu32 GLLIBS := -lopengl32 -lglu32
WINDOWSLIBS := -lmingw32 WINDOWSLIBS := -lmingw32
TARGET := $(TARGET).exe TARGET := $(TARGET).exe
@ -55,7 +55,7 @@ else
GLLIBS := -lGL -lGLU GLLIBS := -lGL -lGLU
endif 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 CFLAGS := $(CPPFLAGS) -O2 -Wall
export CXXFLAGS := $(CFLAGS) export CXXFLAGS := $(CFLAGS)
export LDFLAGS := $(LUALIBS) $(ODELIBS) $(GLLIBS) $(WINDOWSLIBS) $(SDLLIBS) $(FTGLLIBS) $(SMPEGLIBS) $(VORBISLIBS) export LDFLAGS := $(LUALIBS) $(ODELIBS) $(GLLIBS) $(WINDOWSLIBS) $(SDLLIBS) $(FTGLLIBS) $(SMPEGLIBS) $(VORBISLIBS)
@ -116,7 +116,7 @@ dist: all
svn export lib $@/lib svn export lib $@/lib
svn export doc $@/doc svn export doc $@/doc
cp $(TARGET) $@ cp $(TARGET) $@
ifeq ($(WINDOWS),1) ifeq ($(PLATFORM),PLATFORM_WINDOWS)
# copy DLLs to distribution directory # copy DLLs to distribution directory
cp -a $(shell which SDL.dll) $@ cp -a $(shell which SDL.dll) $@
cp -a $(shell which SDL_image.dll) $@ cp -a $(shell which SDL_image.dll) $@