aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile35
1 files changed, 17 insertions, 18 deletions
diff --git a/Makefile b/Makefile
index aaa1f34..3847bf4 100644
--- a/Makefile
+++ b/Makefile
@@ -1,21 +1,21 @@
1#this file builds lua-term \o/ 1#this file builds lua-term \o/
2 2
3LUA_VER ?= 5.1 3LUA_VER ?= 5.1
4LUA_DIR ?= /usr 4LUA_DIR ?= /usr
5LUA_LIBDIR := $(LUA_DIR)/lib/lua/$(LUA_VER)/term 5LUA_LIBDIR := $(LUA_DIR)/lib/lua/$(LUA_VER)/term
6LUA_INC := $(LUA_DIR)/include/lua$(LUA_VER) 6LUA_INC := $(LUA_DIR)/include/lua$(LUA_VER)
7LUA_SHARE := $(LUA_DIR)/share/lua/$(LUA_VER)/term 7LUA_SHARE := $(LUA_DIR)/share/lua/$(LUA_VER)/term
8CWARNS := -Wall -pedantic 8CWARNS := -Wall -pedantic
9CFLAGS := $(CWARNS) -ansi -O3 -I$(LUA_INC) -fPIC 9CFLAGS := $(CWARNS) -ansi -O3 -I$(LUA_INC) -fPIC
10LIB_OPTION := -shared 10LIB_OPTION := -shared
11 11
12SONAME := core.so 12SONAME := core.so
13SONAMEV := $(SONAME).1 13SONAMEV := $(SONAME).1
14LIBRARY := $(SONAMEV).0.1 14LIBRARY := $(SONAMEV).0.1
15SRC := core.c 15SRC := core.c
16OBJ := $(patsubst %.c, %.o, $(SRC)) 16OBJ := $(patsubst %.c, %.o, $(SRC))
17 17
18FILES := term/init.lua term/cursor.lua term/colors.lua 18FILES := term/init.lua term/cursor.lua term/colors.lua
19 19
20all: $(LIBRARY) $(SONAMEV) $(SONAME) 20all: $(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
31install: 31install:
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
37clean: 37clean:
38 $(RM) $(LIBRARY) $(SONAMEV) $(SONAME) *.o 38 $(RM) $(LIBRARY) $(SONAMEV) $(SONAME) *.o
39