Thu, 25 Feb 2010 14:51:39 +0000
Makefile: Reduce optimisation to -O2 from -O3
74
8f1e69d846c1
Makefile: Make makefile a bit more generic
Dwayne Bent <dbb.1@liqd.org>
parents:
73
diff
changeset
|
1 | # Utilities |
8f1e69d846c1
Makefile: Make makefile a bit more generic
Dwayne Bent <dbb.1@liqd.org>
parents:
73
diff
changeset
|
2 | INSTALL = install |
8f1e69d846c1
Makefile: Make makefile a bit more generic
Dwayne Bent <dbb.1@liqd.org>
parents:
73
diff
changeset
|
3 | INSTALL_PROGRAM = $(INSTALL) |
8f1e69d846c1
Makefile: Make makefile a bit more generic
Dwayne Bent <dbb.1@liqd.org>
parents:
73
diff
changeset
|
4 | INSTALL_DATA = $(INSTALL) -m 644 |
8f1e69d846c1
Makefile: Make makefile a bit more generic
Dwayne Bent <dbb.1@liqd.org>
parents:
73
diff
changeset
|
5 | |
8f1e69d846c1
Makefile: Make makefile a bit more generic
Dwayne Bent <dbb.1@liqd.org>
parents:
73
diff
changeset
|
6 | # Flags |
88
0e346184aa9d
Makefile: Reduce optimisation to -O2 from -O3
Matthew Wild <mwild1@gmail.com>
parents:
86
diff
changeset
|
7 | CFLAGS = -O2 -c -Wall -fpic |
86
72cd8cb9b184
Makefile: Remove debug flags from compilation/linking
Matthew Wild <mwild1@gmail.com>
parents:
74
diff
changeset
|
8 | LDFLAGS = -shared |
74
8f1e69d846c1
Makefile: Make makefile a bit more generic
Dwayne Bent <dbb.1@liqd.org>
parents:
73
diff
changeset
|
9 | |
8f1e69d846c1
Makefile: Make makefile a bit more generic
Dwayne Bent <dbb.1@liqd.org>
parents:
73
diff
changeset
|
10 | # Directories |
73
e9b909b391c3
Makefile: Added basic Makefile for standard make
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
11 | LUA_INC_DIR=/usr/include/lua5.1 |
e9b909b391c3
Makefile: Added basic Makefile for standard make
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
12 | LUA_LIB_DIR=/usr/lib |
e9b909b391c3
Makefile: Added basic Makefile for standard make
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
13 | |
e9b909b391c3
Makefile: Added basic Makefile for standard make
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
14 | INSTALL_DIR_LUA=/usr/share/lua/5.1 |
e9b909b391c3
Makefile: Added basic Makefile for standard make
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
15 | INSTALL_DIR_BIN=/usr/lib/lua/5.1 |
e9b909b391c3
Makefile: Added basic Makefile for standard make
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
16 | |
74
8f1e69d846c1
Makefile: Make makefile a bit more generic
Dwayne Bent <dbb.1@liqd.org>
parents:
73
diff
changeset
|
17 | # Files |
8f1e69d846c1
Makefile: Make makefile a bit more generic
Dwayne Bent <dbb.1@liqd.org>
parents:
73
diff
changeset
|
18 | LUA_LIB = lua5.1 |
8f1e69d846c1
Makefile: Make makefile a bit more generic
Dwayne Bent <dbb.1@liqd.org>
parents:
73
diff
changeset
|
19 | LIB = core.so |
73
e9b909b391c3
Makefile: Added basic Makefile for standard make
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
20 | |
e9b909b391c3
Makefile: Added basic Makefile for standard make
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
21 | all: |
74
8f1e69d846c1
Makefile: Make makefile a bit more generic
Dwayne Bent <dbb.1@liqd.org>
parents:
73
diff
changeset
|
22 | $(CC) $(CFLAGS) -Iinclude -I$(LUA_INC_DIR) src/*.c |
8f1e69d846c1
Makefile: Make makefile a bit more generic
Dwayne Bent <dbb.1@liqd.org>
parents:
73
diff
changeset
|
23 | $(CC) $(LDFLAGS) -o $(LIB) *.o -L$(LUA_LIB_DIR) -l$(LUA_LIB) -levent |
73
e9b909b391c3
Makefile: Added basic Makefile for standard make
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
24 | |
74
8f1e69d846c1
Makefile: Make makefile a bit more generic
Dwayne Bent <dbb.1@liqd.org>
parents:
73
diff
changeset
|
25 | install: all |
8f1e69d846c1
Makefile: Make makefile a bit more generic
Dwayne Bent <dbb.1@liqd.org>
parents:
73
diff
changeset
|
26 | $(INSTALL_DATA) -D lua/luaevent.lua $(DESTDIR)$(INSTALL_DIR_LUA)/luaevent.lua |
8f1e69d846c1
Makefile: Make makefile a bit more generic
Dwayne Bent <dbb.1@liqd.org>
parents:
73
diff
changeset
|
27 | $(INSTALL_PROGRAM) -D $(LIB) $(DESTDIR)$(INSTALL_DIR_BIN)/luaevent/$(LIB) |
73
e9b909b391c3
Makefile: Added basic Makefile for standard make
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
28 | |
e9b909b391c3
Makefile: Added basic Makefile for standard make
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
29 | clean: |
e9b909b391c3
Makefile: Added basic Makefile for standard make
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
30 | rm *.so |
e9b909b391c3
Makefile: Added basic Makefile for standard make
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
31 | rm *.o |
e9b909b391c3
Makefile: Added basic Makefile for standard make
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
32 |