Fri, 16 Dec 2011 23:21:28 +0000
Initial commit with my changes.
Originally imported from yaml-2.0.tar.gz: http://files.luaforge.net/releases/yaml/yaml/0.2/yaml-0.2.tar.gz
0
3ebc0316f54f
Initial commit with my changes.
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
1 | # Default installation prefix |
3ebc0316f54f
Initial commit with my changes.
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
2 | PREFIX=/usr |
3ebc0316f54f
Initial commit with my changes.
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
3 | |
3ebc0316f54f
Initial commit with my changes.
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
4 | # System's libraries directory (where binary libraries are installed) |
3ebc0316f54f
Initial commit with my changes.
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
5 | LUA_LIBDIR=$(PREFIX)/lib/lua/5.1 |
3ebc0316f54f
Initial commit with my changes.
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
6 | |
3ebc0316f54f
Initial commit with my changes.
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
7 | # System's lua directory (where Lua libraries are installed) |
3ebc0316f54f
Initial commit with my changes.
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
8 | LUA_DIR=$(PREFIX)/share/lua/5.1 |
3ebc0316f54f
Initial commit with my changes.
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
9 | |
3ebc0316f54f
Initial commit with my changes.
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
10 | LUAINC=$(PREFIX)/include/lua5.1 |
3ebc0316f54f
Initial commit with my changes.
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
11 | LUALIB=$(PREFIX)/lib |
3ebc0316f54f
Initial commit with my changes.
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
12 | |
3ebc0316f54f
Initial commit with my changes.
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
13 | CC=gcc |
3ebc0316f54f
Initial commit with my changes.
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
14 | # -fexceptions is necessary if your Lua was built with a C++ compiler and |
3ebc0316f54f
Initial commit with my changes.
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
15 | # uses exceptions internally; can be removed |
3ebc0316f54f
Initial commit with my changes.
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
16 | CFLAGS=-O2 -Wall $(INC) -shared -fPIC -fexceptions |
3ebc0316f54f
Initial commit with my changes.
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
17 | LDFLAGS=-shared -L$(LUALIB) -lyaml |
3ebc0316f54f
Initial commit with my changes.
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
18 | INC=-I$(LUAINC) |
3ebc0316f54f
Initial commit with my changes.
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
19 | |
3ebc0316f54f
Initial commit with my changes.
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
20 | OBJS=lyaml.o b64.o |
3ebc0316f54f
Initial commit with my changes.
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
21 | |
3ebc0316f54f
Initial commit with my changes.
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
22 | all: yaml.so |
3ebc0316f54f
Initial commit with my changes.
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
23 | |
3ebc0316f54f
Initial commit with my changes.
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
24 | install: |
3ebc0316f54f
Initial commit with my changes.
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
25 | cp -f yaml.so $(LUA_LIBDIR) |
3ebc0316f54f
Initial commit with my changes.
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
26 | |
3ebc0316f54f
Initial commit with my changes.
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
27 | uninstall: |
3ebc0316f54f
Initial commit with my changes.
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
28 | rm -f $(LUA_LIBDIR)/yaml.so |
3ebc0316f54f
Initial commit with my changes.
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
29 | |
3ebc0316f54f
Initial commit with my changes.
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
30 | yaml.so: $(OBJS) |
3ebc0316f54f
Initial commit with my changes.
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
31 | $(CC) -o $@ $(LDFLAGS) $(OBJS) |
3ebc0316f54f
Initial commit with my changes.
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
32 | |
3ebc0316f54f
Initial commit with my changes.
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
33 | clean: |
3ebc0316f54f
Initial commit with my changes.
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
34 | rm -f $(OBJS) yaml.so core core.* a.out |