]> Shamusworld >> Repos - virtualjaguar/blob - compile
No longer needed (use dos2unix or unix2dos! ;-)
[virtualjaguar] / compile
1 #! /bin/sh
2
3 #
4 # Compile script for Virtual Jaguar GCC/SDL Portable Jaguar Emulator
5 # This obviates the need for separate Makefiles for every OS architecture
6 # under the sun...
7 #
8 # by James L. Hammons
9 #
10 # If you have any parameters that you want to pass through to make, then
11 # simply add them to the 'compile' command line as if 'compile' were make.
12 #
13
14 echo
15 echo -n "*** Compiling Virtual Jaguar for "
16
17 # Check the OS type...
18
19 if [ "$OSTYPE" = "msys" ]; then
20
21         echo -n Win32 on MinGW
22
23         SYSTYPE=__GCCWIN32__
24         EXESUFFIX=.exe
25         GLLIB=-lopengl32
26         ICON=vj-ico.o
27         SDLLIBTYPE=--libs
28 #This doesn't seem to make a difference on Win32...
29 #       SDLLIBTYPE=--static-libs
30
31 elif [ "$OSTYPE" = "darwin7.0" ] || [ "$OSTYPE" = "darwin" ]; then
32
33         echo -n Mac OS X
34
35         SYSTYPE=__GCCUNIX__ -D_OSX_
36         EXESUFFIX=
37         GLLIB=
38         ICON=
39         SDLLIBTYPE=--static-libs
40
41 else # *nix
42
43         echo -n generic Unix/Linux
44
45         SYSTYPE=__GCCUNIX__
46         EXESUFFIX=
47         GLLIB=-lGL
48         ICON=
49         SDLLIBTYPE=--libs
50
51 fi
52
53 echo ...
54 echo
55
56 export SYSTYPE EXESUFFIX GLLIB ICON SDLLIBTYPE
57
58 # Yes, you can pass through parameters to make...
59
60 make $@
61
62 if [ $? -eq 0 ]; then
63
64         echo
65         echo "*** Looks like it compiled OK... Give it a whirl!"
66         echo
67
68 fi