aboutsummaryrefslogtreecommitdiffstats
path: root/com32/lua/src/Makefile
blob: 09edaba1b04ad230a9fcdb9a853fd55a0bfa50d9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
## -----------------------------------------------------------------------
##
##   Copyright 2001-2009 H. Peter Anvin - All Rights Reserved
##   Copyright 2009-2010 Intel Corporation; author: H. Peter Anvin
##
##   This program is free software; you can redistribute it and/or modify
##   it under the terms of the GNU General Public License as published by
##   the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
##   Boston MA 02110-1301, USA; either version 2 of the License, or
##   (at your option) any later version; incorporated herein by reference.
##
## -----------------------------------------------------------------------

##
## Lua Makefile
##

VPATH = $(SRC)
include $(MAKEDIR)/elf.mk

LNXLIBS	   = 

# Temporarily allow warnings not being treated as errors
#GCCWARN	  += -Wno-error

CFLAGS    += -DSYSLINUX
MODULES	  = lua.c32
TESTFILES =

OBJS	  = lua.o

LIBLUA    = liblua.c32

LIBLUA_OBJS := lapi.o lcode.o lctype.o ldebug.o ldo.o ldump.o lfunc.o
LIBLUA_OBJS += lgc.o llex.o lmem.o lobject.o lopcodes.o lparser.o
LIBLUA_OBJS += lstate.o lstring.o ltable.o ltm.o lundump.o lvm.o lzio.o

LIBLUA_OBJS += lauxlib.o lbaselib.o lbitlib.o lcorolib.o ldblib.o liolib.o
LIBLUA_OBJS += loslib.o lstrlib.o ltablib.o loadlib.o linit.o

CFLAGS += -DLUA_ANSI

all: $(MODULES) $(TESTFILES)

liblua.elf : $(LIBLUA_OBJS)
	$(LD) $(LDFLAGS) -shared -soname $(patsubst %.elf,%.c32,$(@F)) \
		-o $@ $^

lua.elf : $(OBJS) $(LIBLUA) $(C_LIBS)
	$(LD) $(LDFLAGS) -o $@ $^

tidy dist:
	rm -f *.o *.lo *.lst *.elf .*.d *.tmp

clean: tidy
	rm -f *.lnx

spotless: clean
	rm -f *.lss *.c32 *.com
	rm -f *~ \#*

install:

-include .*.d