summaryrefslogtreecommitdiff
path: root/makefile
blob: f9628942a9960cbf0c255ee3398fd980c8c9547f (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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# $Id: makefile,v 1.12 1995/02/02 19:02:03 roberto Exp $
# Compilation parameters
CC = gcc
CFLAGS = -I/usr/5include -Wall -Wmissing-prototypes -Wshadow -ansi -O2

#CC = acc
#CFLAGS = -fast -I/usr/5include

AR = ar
ARFLAGS	= rvl

# Aplication modules
LUAMOD =	\
	parser 	\
	lex	\
	opcode	\
	hash	\
	table	\
	inout	\
	tree    \
	fallback\
	mem

LIBMOD = 	\
	iolib	\
	strlib	\
	mathlib

LUAOBJS	= $(LUAMOD:%=%.o)

LIBOBJS	= $(LIBMOD:%=%.o)

lua : lua.o lua.a lualib.a
	$(CC) $(CFLAGS) -o $@ lua.c lua.a lualib.a -lm

lua.a : parser.c $(LUAOBJS)
	$(AR) $(ARFLAGS) $@  $?
	ranlib lua.a

lualib.a : $(LIBOBJS)
	$(AR) $(ARFLAGS) $@  $?
	ranlib $@

liblua.so.1.0 : lua.o
	ld -o liblua.so.1.0 $(LUAOBJS)

%.o	: %.c
	$(CC) $(CFLAGS) -c -o $@ $<


parser.c : lua.stx
	yacc++ -d lua.stx ; mv -f y.tab.c parser.c ; mv -f y.tab.h parser.h

clear	:
	rcsclean
	rm -f *.o
	rm -f parser.c parser.h
	co lua.h lualib.h

% : RCS/%,v
	co $@


fallback.o : fallback.c mem.h fallback.h opcode.h lua.h types.h tree.h inout.h 
hash.o : hash.c mem.h opcode.h lua.h types.h tree.h hash.h inout.h table.h 
inout.o : inout.c mem.h opcode.h lua.h types.h tree.h hash.h inout.h table.h 
iolib.o : iolib.c mem.h lua.h lualib.h 
lex.o : lex.c tree.h types.h table.h opcode.h lua.h inout.h parser.h ugly.h 
lua.o : lua.c lua.h lualib.h 
mathlib.o : mathlib.c lualib.h lua.h 
mem.o : mem.c mem.h lua.h 
opcode.o : opcode.c mem.h opcode.h lua.h types.h tree.h hash.h inout.h table.h \
  fallback.h 
strlib.o : strlib.c mem.h lua.h lualib.h 
table.o : table.c mem.h opcode.h lua.h types.h tree.h hash.h inout.h table.h \
  fallback.h 
tree.o : tree.c mem.h lua.h tree.h types.h table.h opcode.h 
parser.o : parser.c mem.h opcode.h lua.h types.h tree.h hash.h inout.h table.h