components/lua/patches/1.Makefile.patch
author Mike Sullivan <Mike.Sullivan@Oracle.COM>
Mon, 11 Mar 2013 10:38:09 -0700
branchs11-update
changeset 2520 ceec631e74d1
parent 115 c360825c3a3f
child 990 6bfca1239ccb
child 4226 efcbdc9d6dd8
permissions -rw-r--r--
Close of build 10.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
97
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
     1
--- lua-5.1.4/Makefile.orig	Mon Aug 11 17:40:48 2008
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
     2
+++ lua-5.1.4/Makefile	Fri Feb 18 13:00:25 2011
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
     3
@@ -5,15 +5,17 @@
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
     4
 # == CHANGE THE SETTINGS BELOW TO SUIT YOUR ENVIRONMENT =======================
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
     5
 
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
     6
 # Your platform. See PLATS for possible values.
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
     7
-PLAT= none
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
     8
+PLAT= solaris
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
     9
 
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
    10
 # Where to install. The installation starts in the src and doc directories,
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
    11
 # so take care if INSTALL_TOP is not an absolute path.
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
    12
-INSTALL_TOP= /usr/local
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
    13
+INSTALL_TOP= $(ROOT)/usr
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
    14
 INSTALL_BIN= $(INSTALL_TOP)/bin
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
    15
 INSTALL_INC= $(INSTALL_TOP)/include
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
    16
 INSTALL_LIB= $(INSTALL_TOP)/lib
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
    17
-INSTALL_MAN= $(INSTALL_TOP)/man/man1
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
    18
+INSTALL_MAN= $(INSTALL_TOP)/share/man/man1
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
    19
+INSTALL_DOC= $(INSTALL_TOP)/share/doc/lua
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
    20
+INSTALL_TEST= $(INSTALL_TOP)/demo/lua/test
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
    21
 #
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
    22
 # You probably want to make INSTALL_LMOD and INSTALL_CMOD consistent with
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
    23
 # LUA_ROOT, LUA_LDIR, and LUA_CDIR in luaconf.h (and also with etc/lua.pc).
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
    24
@@ -22,9 +24,9 @@
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
    25
 
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
    26
 # How to install. If your install program does not support "-p", then you
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
    27
 # may have to run ranlib on the installed liblua.a (do "make ranlib").
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
    28
-INSTALL= install -p
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
    29
-INSTALL_EXEC= $(INSTALL) -m 0755
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
    30
-INSTALL_DATA= $(INSTALL) -m 0644
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
    31
+INSTALL= ginstall -p
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
    32
+INSTALL_EXEC= $(INSTALL) -m 0555
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
    33
+INSTALL_DATA= $(INSTALL) -m 0444
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
    34
 #
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
    35
 # If you don't have install you can use cp instead.
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
    36
 # INSTALL= cp -p
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
    37
@@ -38,13 +40,15 @@
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
    38
 # == END OF USER SETTINGS. NO NEED TO CHANGE ANYTHING BELOW THIS LINE =========
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
    39
 
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
    40
 # Convenience platforms targets.
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
    41
-PLATS= aix ansi bsd freebsd generic linux macosx mingw posix solaris
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
    42
+PLATS= solaris
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
    43
 
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
    44
 # What to install.
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
    45
 TO_BIN= lua luac
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
    46
-TO_INC= lua.h luaconf.h lualib.h lauxlib.h ../etc/lua.hpp
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
    47
-TO_LIB= liblua.a
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
    48
+TO_INC= lua.h luaconf.h lualib.h lauxlib.h
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
    49
+TO_LIB= liblua.so
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
    50
 TO_MAN= lua.1 luac.1
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
    51
+TO_DOC= amazon.gif contents.html cover.png logo.gif lua.css lua.html luac.html manual.css manual.html readme.html
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
    52
+TO_TEST= bisect.lua cf.lua echo.lua env.lua factorial.lua fib.lua fibfor.lua globals.lua hello.lua life.lua luac.lua printf.lua readonly.lua sieve.lua sort.lua table.lua trace-calls.lua trace-globals.lua xd.lua
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
    53
 
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
    54
 # Lua version and release.
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
    55
 V= 5.1
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
    56
@@ -55,16 +59,18 @@
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
    57
 $(PLATS) clean:
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
    58
 	cd src && $(MAKE) [email protected]
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
    59
 
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
    60
+check:  test
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
    61
 test:	dummy
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
    62
 	src/lua test/hello.lua
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
    63
 
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
    64
 install: dummy
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
    65
-	cd src && $(MKDIR) $(INSTALL_BIN) $(INSTALL_INC) $(INSTALL_LIB) $(INSTALL_MAN) $(INSTALL_LMOD) $(INSTALL_CMOD)
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
    66
+	cd src && $(MKDIR) $(INSTALL_BIN) $(INSTALL_INC) $(INSTALL_LIB) $(INSTALL_DOC) $(INSTALL_MAN) $(INSTALL_TEST)
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
    67
 	cd src && $(INSTALL_EXEC) $(TO_BIN) $(INSTALL_BIN)
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
    68
 	cd src && $(INSTALL_DATA) $(TO_INC) $(INSTALL_INC)
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
    69
-	cd src && $(INSTALL_DATA) $(TO_LIB) $(INSTALL_LIB)
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
    70
+	cd src && $(INSTALL_EXEC) $(TO_LIB) $(INSTALL_LIB)
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
    71
 	cd doc && $(INSTALL_DATA) $(TO_MAN) $(INSTALL_MAN)
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
    72
-
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
    73
+	cd doc && $(INSTALL_DATA) $(TO_DOC) $(INSTALL_DOC)
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
    74
+	cd test && $(INSTALL_DATA) $(TO_TEST) $(INSTALL_TEST)
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
    75
 ranlib:
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
    76
 	cd src && cd $(INSTALL_LIB) && $(RANLIB) $(TO_LIB)
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
    77
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
    78
--- lua-5.1.4/src/Makefile.orig	Sat Jan 19 11:37:58 2008
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
    79
+++ lua-5.1.4/src/Makefile	Wed Feb 16 15:43:24 2011
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
    80
@@ -4,25 +4,24 @@
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
    81
 
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
    82
 # == CHANGE THE SETTINGS BELOW TO SUIT YOUR ENVIRONMENT =======================
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
    83
 
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
    84
-# Your platform. See PLATS for possible values.
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
    85
-PLAT= none
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
    86
-
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
    87
-CC= gcc
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
    88
-CFLAGS= -O2 -Wall $(MYCFLAGS)
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
    89
+CC=$(CC)
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
    90
+CFLAGS= -xO3 -Xc -Kpic $(MYCFLAGS)
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
    91
+FLAG_SPARC:sh=	if [ ${MACH64} = "sparcv9" ]; then echo -xcode=pic13; fi
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
    92
+CFLAGS= $(FLAG_SPARC)
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
    93
 AR= ar rcu
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
    94
 RANLIB= ranlib
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
    95
 RM= rm -f
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
    96
-LIBS= -lm $(MYLIBS)
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
    97
+LIBS= -lm -lc $(MYLIBS)
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
    98
 
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
    99
 MYCFLAGS=
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
   100
-MYLDFLAGS=
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
   101
+MYLDFLAGS= -zdefs -ztext
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
   102
 MYLIBS=
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
   103
 
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
   104
 # == END OF USER SETTINGS. NO NEED TO CHANGE ANYTHING BELOW THIS LINE =========
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
   105
 
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
   106
-PLATS= aix ansi bsd freebsd generic linux macosx mingw posix solaris
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
   107
+PLATS= solaris
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
   108
 
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
   109
-LUA_A=	liblua.a
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
   110
+LUA_SO=	liblua.so
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
   111
 CORE_O=	lapi.o lcode.o ldebug.o ldo.o ldump.o lfunc.o lgc.o llex.o lmem.o \
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
   112
 	lobject.o lopcodes.o lparser.o lstate.o lstring.o ltable.o ltm.o  \
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
   113
 	lundump.o lvm.o lzio.o
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
   114
@@ -36,10 +35,10 @@
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
   115
 LUAC_O=	luac.o print.o
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
   116
 
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
   117
 ALL_O= $(CORE_O) $(LIB_O) $(LUA_O) $(LUAC_O)
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
   118
-ALL_T= $(LUA_A) $(LUA_T) $(LUAC_T)
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
   119
-ALL_A= $(LUA_A)
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
   120
+ALL_T= $(LUA_SO) $(LUA_T) $(LUAC_T)
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
   121
+ALL_A= $(LUA_SO)
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
   122
 
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
   123
-default: $(PLAT)
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
   124
+default: solaris
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
   125
 
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
   126
 all:	$(ALL_T)
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
   127
 
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
   128
@@ -47,15 +46,15 @@
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
   129
 
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
   130
 a:	$(ALL_A)
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
   131
 
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
   132
-$(LUA_A): $(CORE_O) $(LIB_O)
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
   133
-	$(AR) [email protected] $?
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
   134
-	$(RANLIB) [email protected]
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
   135
+$(LUA_SO): $(CORE_O) $(LIB_O)
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
   136
+	$(CC) -o $(LUA_SO) -G -h $(LUA_SO) $(CFLAGS) $(MYLDFLAGS) $(CORE_O) \
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
   137
+	$(LIB_O) $(LIBS)
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
   138
 
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
   139
-$(LUA_T): $(LUA_O) $(LUA_A)
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
   140
-	$(CC) -o [email protected] $(MYLDFLAGS) $(LUA_O) $(LUA_A) $(LIBS)
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
   141
+$(LUA_T): $(LUA_O) $(LUA_SO)
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
   142
+	$(CC) -o [email protected] $(MYLDFLAGS) $(LUA_O) $(LUA_SO) $(LIBS)
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
   143
 
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
   144
-$(LUAC_T): $(LUAC_O) $(LUA_A)
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
   145
-	$(CC) -o [email protected] $(MYLDFLAGS) $(LUAC_O) $(LUA_A) $(LIBS)
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
   146
+$(LUAC_T): $(LUAC_O) $(LUA_SO)
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
   147
+	$(CC) -o [email protected] $(MYLDFLAGS) $(LUAC_O) $(LUA_SO) $(LIBS)
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
   148
 
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
   149
 clean:
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
   150
 	$(RM) $(ALL_T) $(ALL_O)
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
   151
@@ -74,46 +73,8 @@
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
   152
 	@echo "MYLDFLAGS = $(MYLDFLAGS)"
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
   153
 	@echo "MYLIBS = $(MYLIBS)"
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
   154
 
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
   155
-# convenience targets for popular platforms
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
   156
-
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
   157
-none:
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
   158
-	@echo "Please choose a platform:"
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
   159
-	@echo "   $(PLATS)"
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
   160
-
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
   161
-aix:
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
   162
-	$(MAKE) all CC="xlc" CFLAGS="-O2 -DLUA_USE_POSIX -DLUA_USE_DLOPEN" MYLIBS="-ldl" MYLDFLAGS="-brtl -bexpall"
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
   163
-
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
   164
-ansi:
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
   165
-	$(MAKE) all MYCFLAGS=-DLUA_ANSI
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
   166
-
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
   167
-bsd:
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
   168
-	$(MAKE) all MYCFLAGS="-DLUA_USE_POSIX -DLUA_USE_DLOPEN" MYLIBS="-Wl,-E"
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
   169
-
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
   170
-freebsd:
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
   171
-	$(MAKE) all MYCFLAGS="-DLUA_USE_LINUX" MYLIBS="-Wl,-E -lreadline"
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
   172
-
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
   173
-generic:
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
   174
-	$(MAKE) all MYCFLAGS=
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
   175
-
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
   176
-linux:
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
   177
-	$(MAKE) all MYCFLAGS=-DLUA_USE_LINUX MYLIBS="-Wl,-E -ldl -lreadline -lhistory -lncurses"
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
   178
-
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
   179
-macosx:
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
   180
-	$(MAKE) all MYCFLAGS=-DLUA_USE_LINUX MYLIBS="-lreadline"
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
   181
-# use this on Mac OS X 10.3-
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
   182
-#	$(MAKE) all MYCFLAGS=-DLUA_USE_MACOSX
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
   183
-
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
   184
-mingw:
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
   185
-	$(MAKE) "LUA_A=lua51.dll" "LUA_T=lua.exe" \
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
   186
-	"AR=$(CC) -shared -o" "RANLIB=strip --strip-unneeded" \
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
   187
-	"MYCFLAGS=-DLUA_BUILD_AS_DLL" "MYLIBS=" "MYLDFLAGS=-s" lua.exe
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
   188
-	$(MAKE) "LUAC_T=luac.exe" luac.exe
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
   189
-
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
   190
-posix:
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
   191
-	$(MAKE) all MYCFLAGS=-DLUA_USE_POSIX
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
   192
-
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
   193
 solaris:
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
   194
-	$(MAKE) all MYCFLAGS="-DLUA_USE_POSIX -DLUA_USE_DLOPEN" MYLIBS="-ldl"
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
   195
+	$(MAKE) all MYCFLAGS="-DLUA_USE_POSIX -DLUA_USE_DLOPEN -D__EXTENSIONS__" MYLIBS="-ldl"
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
   196
 
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
   197
 # list targets that do not create files (but not all makes understand .PHONY)
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
   198
 .PHONY: all $(PLATS) default o a clean depend echo none
c27cb2d7067c 7020451 Move lua to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
   199