rpg-x2-rpgxef/Makefile

68 lines
1.4 KiB
Makefile
Raw Permalink Normal View History

2012-05-05 11:49:28 +00:00
# option
RPGXDIRDEFAULT="/c/Program Files/Raven/Star Trek Voyager Elite Force/RPG-X2"
RPGXDIRYOUNG="/d/games/eliteforce/build-engine/RPG-X2"
# determine arch and platform
ARCH=$(shell uname -m | sed -e s/i.86/i386/)
PLATFORM=$(shell uname|sed -e s/_.*//|tr '[:upper:]' '[:lower:]')
# cross compiling
2012-08-04 08:05:27 +00:00
ifneq ($(PLATFORM), mingw32)
ifeq ($(TARGET), win32)
ARCH=x86
PLATFORM=mingw32
endif
ifeq ($(TARGET), win64)
2012-08-04 08:05:27 +00:00
ARCH=x64
PLATFORM=mingw32
endif
2012-08-04 08:05:27 +00:00
else
#we are compiling on windows
ARCH=x86
endif
2012-05-05 11:49:28 +00:00
# set extension
ifeq ($(PLATFORM), mingw32)
EXT=dll
else
EXT=so
endif
#default
default: all
# makes all shared libraries
all:
make -C game
make -C cgame
make -C ui
# cleans up everthing
clean:
make clean -C game
make clean -C cgame
make clean -C ui
# cleans all and makes all shared libs
allclean:
clean
all
# install shared libs (NOTE: $(RPGXDIRXXX) has to be exported in the shell as variable)
install:
mv game/qagame$(ARCH).$(EXT) $(RPGXDIRDEFAULT)
mv cgame/cgame$(ARCH).$(EXT) $(RPGXDIRDEFAULT)
mv ui/ui$(ARCH).$(EXT) $(RPGXDIRDEFAULT)
installyoung:
mv game/qagame$(ARCH).$(EXT) $(RPGXDIRYOUNG)
mv cgame/cgame$(ARCH).$(EXT) $(RPGXDIRYOUNG)
mv ui/ui$(ARCH).$(EXT) $(RPGXDIRYOUNG)
pack:
cp game/qagame$(ARCH).$(EXT) .
cp cgame/cgame$(ARCH).$(EXT) .
cp ui/ui$(ARCH).$(EXT) .
tar -czvpf release_$(PLATFORM)_$(ARCH).tar.gz qagame$(ARCH).$(EXT) cgame$(ARCH).$(EXT) ui$(ARCH).$(EXT)