blob: b2883227abb472b78355c670844b97a5851c9643 (
plain) (
tree)
|
|
SHELL := /bin/bash
BUILD_DIR := $(CURDIR)/build
INC_PATH := $(LUA_BINDIR)/../include/
OBJS :=
LIBS :=
LUA_LIBS := init.lua
INCLUDE := -I $(LUA_INCDIR) -I $(INC_PATH) -DLUA_USE_APICHECK
SUBDIR := src
OBJ_DIR := $(BUILD_DIR)/objs
LUA_DIR = $(INST_LUADIR)/speech_utils
OBJS := $(addprefix $(OBJ_DIR)/,$(OBJS))
LIBS := $(addprefix $(INST_LIBDIR)/,$(LIBS))
OBJ_SUBDIR := $(addprefix $(OBJ_DIR)/,$(SUBDIR))
LUA_SUBDIR := $(addprefix $(LUA_DIR)/,$(SUBDIR))
LUA_LIBS := $(addprefix $(LUA_DIR)/,$(LUA_LIBS))
LIB_PATH := $(LUA_BINDIR)/../lib
build: $(OBJ_DIR) $(OBJ_SUBDIR) $(OBJS)
install: $(LUA_DIR) $(LUA_SUBDIR) $(LUA_LIBS) $(LIBS)
$(OBJ_DIR) $(LUA_DIR) $(OBJ_SUBDIR) $(LUA_SUBDIR):
-mkdir -p $@
$(LUA_DIR)/%.lua: %.lua
cp $< $@
$(OBJ_DIR)/%.o: %.c
gcc -o $@ -c $< -g $(INCLUDE) -fPIC
clean:
-rm $(OBJ_DIR)/src/*.o
|