tmkwsysrules.sh - plan9port - [fork] Plan 9 from user space | |
git clone git://src.adamsgaard.dk/plan9port | |
Log | |
Files | |
Refs | |
README | |
LICENSE | |
--- | |
tmkwsysrules.sh (1399B) | |
--- | |
1 #!/bin/sh | |
2 | |
3 [ -f $PLAN9/config ] && . $PLAN9/config | |
4 | |
5 if [ "x$X11" = "x" ]; then | |
6 if [ -d /usr/X11R6 ]; then | |
7 X11=/usr/X11R6 | |
8 elif [ -d /usr/local/X11R6 ]; then | |
9 X11=/usr/local/X11R6 | |
10 elif [ -d /usr/X11R7 ]; then | |
11 X11=/usr/X11R7 | |
12 elif [ -d /usr/X ]; then | |
13 X11=/usr/X | |
14 elif [ -d /usr/openwin ]; then # for Sun | |
15 X11=/usr/openwin | |
16 elif [ -d /usr/include/X11 ]; then | |
17 X11=/usr | |
18 elif [ -d /usr/local/include/X11 ]; then | |
19 X11=/usr/local | |
20 else | |
21 X11=noX11dir | |
22 fi | |
23 fi | |
24 | |
25 if [ "x$WSYSTYPE" = "x" ]; then | |
26 if [ "x`uname`" = "xDarwin" ]; then | |
27 if sw_vers | egrep 'ProductVersion: (10\.[0-9]\.|… | |
28 echo 1>&2 'OS X 10.12 and older are not supporte… | |
29 exit 1 | |
30 fi | |
31 WSYSTYPE=mac | |
32 elif [ -d "$X11" ]; then | |
33 WSYSTYPE=x11 | |
34 else | |
35 WSYSTYPE=nowsys | |
36 fi | |
37 fi | |
38 | |
39 if [ "x$WSYSTYPE" = "xx11" -a "x$X11H" = "x" ]; then | |
40 if [ -d "$X11/include" ]; then | |
41 X11H="-I$X11/include" | |
42 else | |
43 X11H="" | |
44 fi | |
45 fi | |
46 | |
47 echo 'WSYSTYPE='$WSYSTYPE | |
48 echo 'X11='$X11 | |
49 echo 'X11H='$X11H | |
50 | |
51 if [ $WSYSTYPE = x11 ]; then | |
52 echo 'CFLAGS=$CFLAGS '$X11H | |
53 echo 'HFILES=$HFILES $XHFILES' | |
54 XO=`ls x11-*.c 2>/dev/null | sed 's/\.c$/.o/'` | |
55 echo 'WSYSOFILES=$WSYSOFILES '$XO | |
56 echo 'WSYSHFILES=x11-inc.h x11-keysym2ucs.h x11-memdraw.h' | |
57 elif [ $WSYSTYPE = mac ]; then | |
58 echo 'WSYSOFILES=$WSYSOFILES mac-draw.o mac-screen.o' | |
59 echo 'WSYSHFILES=' | |
60 echo 'MACARGV=macargv.o' | |
61 elif [ $WSYSTYPE = nowsys ]; then | |
62 echo 'WSYSOFILES=nowsys.o' | |
63 fi |