2 # WARNING! SHITTY CODE!
5 defines
="-DSGAME_SHOTS_IPU -DWIZARD -DLOCAL_SAVES"
6 cflags
="-Wno-narrowing -Isrc/felib"
13 if [ "z$2" != "z" ]; then
14 pkg-config
--silence-errors $1 --atleast-version=$2
16 pkg-config
--silence-errors $1
18 if [ "$?" = "0" ]; then
19 cflags
="${cflags} `pkg-config $1 --cflags`"
20 lflags
="${lflags} `pkg-config $1 --libs`"
21 #echo "MSG: package '$1' found"
24 #echo "MSG: no package '$1'"
32 # $3: use gcc if not empty
36 obj
=`basename $2 .cpp`
37 obj
=`basename $obj .c`
41 objects
="${objects} ${obj}"
42 gcc
-pipe -c -O2 -Wall -Isrc/game
${defines} ${cflags} -o ${obj} "$1/$2"
43 if [ "$?" != "0" ]; then
44 echo "FATAL: compilation failed!"
52 g
++ -pipe -s -o ivan
${objects} ${lflags}
53 if [ "$?" != "0" ]; then
54 echo "FATAL: linking failed!"
61 if [ "$have_package" != "tan" ]; then
62 echo "FATAL: you need SDL development package installed, version 1.2 or above!"
66 find_package SDL_mixer
1.2
67 if [ "$have_package" != "tan" ]; then
68 echo "MSG: no SDL_mixer package found, sound disabled"
69 defines
="${defines} -DDISABLE_SOUND"
71 echo "MSG: sound support enabled"
74 find_package imlib2
1.4
75 if [ "$have_package" = "tan" ]; then
76 defines
="${defines} -DHAVE_IMLIB2"
77 echo "MSG: imlib2 found"
81 if [ "$have_package" = "tan" ]; then
82 defines
="${defines} -DUSE_ZLIB"
83 echo "MSG: compressed saves enabled"
86 #find_package libpng 1.5
87 #if [ "$have_package" = "tan" ]; then
88 # defines="${defines} -DHAVE_LIBPNG"
92 mkdir _build
2>/dev
/null
94 compile src
/felib bitmap.cpp
95 compile src
/felib config.cpp
96 compile src
/felib error.cpp
97 compile src
/felib feio.cpp
98 compile src
/felib felist.cpp
99 compile src
/felib femain.cpp
100 compile src
/felib femath.cpp
101 compile src
/felib festring.cpp
102 compile src
/felib fetime.cpp
103 compile src
/felib graphics.cpp
104 compile src
/felib hscore.cpp
105 compile src
/felib rawbit.cpp
106 compile src
/felib fesave.cpp
107 compile src
/felib whandler.cpp
108 compile src
/felib regex.c
110 compile src
/game actset.cpp
111 compile src
/game areaset.cpp
112 compile src
/game charset.cpp
113 compile src
/game charsset.cpp
114 compile src
/game
command.cpp
115 compile src
/game coreset.cpp
116 compile src
/game dataset.cpp
117 compile src
/game dungeon.cpp
118 compile src
/game game.cpp
119 compile src
/game godset.cpp
120 compile src
/game iconf.cpp
121 compile src
/game id.cpp
122 compile src
/game igraph.cpp
123 compile src
/game itemset.cpp
124 compile src
/game levelset.cpp
125 compile src
/game main.cpp
126 compile src
/game materset.cpp
127 compile src
/game message.cpp
128 compile src
/game object.cpp
129 compile src
/game roomset.cpp
130 compile src
/game
script.cpp
131 compile src
/game slotset.cpp
132 compile src
/game trapset.cpp
133 compile src
/game wmapset.cpp
134 compile src
/game wskill.cpp