1## ----------------------------------------------------------------------- 2## 3## Copyright 2001-2009 H. Peter Anvin - All Rights Reserved 4## Copyright 2009-2010 Intel Corporation; author: H. Peter Anvin 5## 6## This program is free software; you can redistribute it and/or modify 7## it under the terms of the GNU General Public License as published by 8## the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, 9## Boston MA 02110-1301, USA; either version 2 of the License, or 10## (at your option) any later version; incorporated herein by reference. 11## 12## ----------------------------------------------------------------------- 13 14## 15## Lua Makefile 16## 17 18VPATH = $(SRC) 19include $(MAKEDIR)/elf.mk 20 21LNXLIBS = 22 23# Temporarily allow warnings not being treated as errors 24#GCCWARN += -Wno-error 25 26CFLAGS += -DSYSLINUX 27MODULES = lua.c32 28MODULES += cpu.c32 29MODULES += dhcp.c32 30MODULES += dmi.c32 31MODULES += lfs.c32 32MODULES += pci.c32 33MODULES += syslinux.c32 34MODULES += vesa.c32 35MODULES += cmenu.c32 36TESTFILES = 37 38OBJS = lua.o 39 40LIBLUA = liblua.c32 41 42LIBLUA_OBJS := lapi.o lcode.o lctype.o ldebug.o ldo.o ldump.o lfunc.o 43LIBLUA_OBJS += lgc.o llex.o lmem.o lobject.o lopcodes.o lparser.o 44LIBLUA_OBJS += lstate.o lstring.o ltable.o ltm.o lundump.o lvm.o lzio.o 45 46LIBLUA_OBJS += lauxlib.o lbaselib.o lbitlib.o lcorolib.o ldblib.o liolib.o 47LIBLUA_OBJS += loslib.o lstrlib.o ltablib.o loadlib.o linit.o 48 49CFLAGS += -DLUA_ANSI 50 51all: $(MODULES) $(TESTFILES) 52 53liblua.elf : $(LIBLUA_OBJS) 54 $(LD) $(LDFLAGS) -shared -soname $(patsubst %.elf,%.c32,$(@F)) \ 55 -o $@ $^ 56 57lua.elf : $(OBJS) $(LIBLUA) $(C_LIBS) 58 $(LD) $(LDFLAGS) -o $@ $^ 59 60cmenu.o : CFLAGS += -I$(com32)/cmenu/libmenu 61cmenu.elf : $(objdir)/com32/cmenu/libmenu/libmenu.c32 62 63tidy dist: 64 rm -f *.o *.lo *.lst *.elf .*.d *.tmp 65 66clean: tidy 67 rm -f *.lnx 68 69spotless: clean 70 rm -f *.lss *.c32 *.com 71 rm -f *~ \#* 72 73install: 74 75-include .*.d 76