Debian Codegraph @

game7/configure

raw
1 #!/bin/bash
2
3 #
4 # Modification History
5 #
6 # 2006-June-27 Jason Rohrer
7 # Copied/modified from Transcend project. Dropped a platforms that were only
8 # nominally supported.
9 #
10
11
12 while [ -z "$platformSelection" ]
13 do
14 echo "select platform:"
15
16 echo " 1 -- GNU/Linux"
17 echo " 2 -- MacOSX"
18 echo " 3 -- Win32 using MinGW"
19 echo " q -- quit"
20
21 echo ""
22 echo -n "> "
23
24 read platformSelection
25
26
27 if [ "$platformSelection" = "q" ]
28 then
29 exit
30 fi
31
32
33 # use ASCII comparison.
34
35 if [[ "$platformSelection" > "3" ]]
36 then
37 platformSelection=""
38 fi
39
40 if [[ "$platformSelection" < "1" ]]
41 then
42 platformSelection=""
43 fi
44
45 done
46
47
48 # use partial makefiles from minorGems project
49 makefileMinorGems="../minorGems/build/Makefile.minorGems"
50 makefileMinorGemsTargets="../minorGems/build/Makefile.minorGems_targets"
51
52
53
54 platformName="Generic"
55 platformMakefile="generic"
56
57
58
59 case "$platformSelection" in
60
61
62 "1" )
63 platformName="GNU/Linux"
64 platformMakefile="Makefile.GnuLinux"
65 ;;
66
67
68 "2" )
69 platformName="MacOSX"
70 platformMakefile="Makefile.MacOSX"
71 ;;
72
73
74 "3" )
75 platformName="Win32 MinGW"
76 platformMakefile="Makefile.MinGW"
77 ;;
78
79
80 esac
81
82
83
84 rm -f Makefile.temp
85 echo "# Auto-generated by game7/configure for the $platformName platform. Do not edit manually." > Makefile.temp
86
87 rm -f gameSource/Makefile
88 cat Makefile.temp $platformMakefile Makefile.common $makefileMinorGems gameSource/Makefile.all $makefileMinorGemsTargets > gameSource/Makefile
89
90
91 rm Makefile.temp
92
93
94
95 exit