-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
67 lines (56 loc) · 1.37 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# 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
ifneq ($(PLATFORM), mingw32)
ifeq ($(TARGET), win32)
ARCH=x86
PLATFORM=mingw32
endif
ifeq ($(TARGET), win64)
ARCH=x64
PLATFORM=mingw32
endif
else
#we are compiling on windows
ARCH=x86
endif
# 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)