diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 35 |
1 files changed, 17 insertions, 18 deletions
@@ -1,21 +1,21 @@ | |||
1 | #this file builds lua-term \o/ | 1 | #this file builds lua-term \o/ |
2 | 2 | ||
3 | LUA_VER := 5.1 | 3 | LUA_VER ?= 5.1 |
4 | LUA_DIR := /usr | 4 | LUA_DIR ?= /usr |
5 | LUA_LIBDIR := $(LUA_DIR)/lib/lua/$(LUA_VER)/term | 5 | LUA_LIBDIR := $(LUA_DIR)/lib/lua/$(LUA_VER)/term |
6 | LUA_INC := $(LUA_DIR)/include/lua$(LUA_VER) | 6 | LUA_INC := $(LUA_DIR)/include/lua$(LUA_VER) |
7 | LUA_SHARE := $(LUA_DIR)/share/lua/$(LUA_VER)/term | 7 | LUA_SHARE := $(LUA_DIR)/share/lua/$(LUA_VER)/term |
8 | CWARNS := -Wall -pedantic | 8 | CWARNS := -Wall -pedantic |
9 | CFLAGS := $(CWARNS) -ansi -O3 -I$(LUA_INC) -fPIC | 9 | CFLAGS := $(CWARNS) -ansi -O3 -I$(LUA_INC) -fPIC |
10 | LIB_OPTION := -shared | 10 | LIB_OPTION := -shared |
11 | 11 | ||
12 | SONAME := core.so | 12 | SONAME := core.so |
13 | SONAMEV := $(SONAME).1 | 13 | SONAMEV := $(SONAME).1 |
14 | LIBRARY := $(SONAMEV).0.1 | 14 | LIBRARY := $(SONAMEV).0.1 |
15 | SRC := core.c | 15 | SRC := core.c |
16 | OBJ := $(patsubst %.c, %.o, $(SRC)) | 16 | OBJ := $(patsubst %.c, %.o, $(SRC)) |
17 | 17 | ||
18 | FILES := term/init.lua term/cursor.lua term/colors.lua | 18 | FILES := term/init.lua term/cursor.lua term/colors.lua |
19 | 19 | ||
20 | all: $(LIBRARY) $(SONAMEV) $(SONAME) | 20 | all: $(LIBRARY) $(SONAMEV) $(SONAME) |
21 | 21 | ||
@@ -27,7 +27,7 @@ $(SONAME): | |||
27 | 27 | ||
28 | $(LIBRARY): $(OBJ) | 28 | $(LIBRARY): $(OBJ) |
29 | $(CC) $(CFLAGS) $(LIB_OPTION) -o $(LIBRARY) $(OBJ) -lc | 29 | $(CC) $(CFLAGS) $(LIB_OPTION) -o $(LIBRARY) $(OBJ) -lc |
30 | 30 | ||
31 | install: | 31 | install: |
32 | mkdir -p $(LUA_LIBDIR) | 32 | mkdir -p $(LUA_LIBDIR) |
33 | cp $(SONAME) $(LUA_LIBDIR) | 33 | cp $(SONAME) $(LUA_LIBDIR) |
@@ -36,4 +36,3 @@ install: | |||
36 | 36 | ||
37 | clean: | 37 | clean: |
38 | $(RM) $(LIBRARY) $(SONAMEV) $(SONAME) *.o | 38 | $(RM) $(LIBRARY) $(SONAMEV) $(SONAME) *.o |
39 | |||