add BSD license
[philodendron.git] / lang_ext / lua / Makefile
blobb3a2dd8901f08a264843b98dafc3f7cc4129a761
2 CFLAGS=-Wall -g -O6 -std=c99
3 EXTS=bc_read_stream.so gazelle.so
5 all: $(EXTS)
7 clean:
8 rm -f $(EXTS) bc_read_stream.o gazelle.o
10 .PHONY: all clean
12 bc_read_stream.o: bc_read_stream.c ../../runtime/bc_read_stream.h
13 gcc $(CFLAGS) -o bc_read_stream.o -c bc_read_stream.c -I../../runtime -I/usr/include/lua5.1
15 gazelle.o: gazelle.c ../../runtime/bc_read_stream.h ../../runtime/interpreter.h
16 gcc $(CFLAGS) -o gazelle.o -c gazelle.c -I../../runtime -I/usr/include/lua5.1
18 ifeq ($(shell uname), Darwin)
20 bc_read_stream.so: ../../runtime/bc_read_stream.o bc_read_stream.o
21 gcc -o bc_read_stream.so -undefined dynamic_lookup -bundle bc_read_stream.o ../../runtime/bc_read_stream.o
23 gazelle.so: ../../runtime/interpreter.o ../../runtime/bc_read_stream.o ../../runtime/load_grammar.o gazelle.o
24 gcc -o gazelle.so -undefined dynamic_lookup -bundle gazelle.o ../../runtime/bc_read_stream.o ../../runtime/interpreter.o ../../runtime/load_grammar.o
26 else
28 bc_read_stream.so: ../../runtime/bc_read_stream.o bc_read_stream.o
29 gcc -o bc_read_stream.so -shared bc_read_stream.o ../../runtime/bc_read_stream.o
31 gazelle.so: ../../runtime/interpreter.o ../../runtime/bc_read_stream.o ../../runtime/load_grammar.o gazelle.o
32 gcc -o gazelle.so -shared gazelle.o ../../runtime/bc_read_stream.o ../../runtime/interpreter.o ../../runtime/load_grammar.o
34 endif