Skip to content

Commit acc8d6f

Browse files
committed
Add "install" target in Makefile
1 parent bce7ee0 commit acc8d6f

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

Makefile

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,8 @@ else
127127
PLATFORM_NATWIN_SRC_FILES = agg_platform_support_x11.cpp
128128
endif
129129

130+
GRAPH_LUA_SRC = graph/init.lua graph/contour.lua
131+
130132
HOST_CP = cp
131133
HOST_RM = rm -f
132134
CP_REL = cp --parents
@@ -166,6 +168,14 @@ $(LIBNATWIN_SO): $(NATWIN_OBJ_FILES) $(LIBGRAPH_SO)
166168
$(CC) -shared $(NATWIN_OBJ_FILES) -o $@ $(LIBS) -L. -lgraphcore -lsupc++
167169
strip --strip-unneeded $@
168170

171+
install: $(TARGETS)
172+
mkdir -p $(LUA_PATH)
173+
mkdir -p $(LUA_DLLPATH)
174+
cp $(LIBGRAPH_SO) $(LUA_DLLPATH)/graphcore.so
175+
cp $(LIBNATWIN_SO) $(LUA_DLLPATH)/natwin.so
176+
ln -s $(LUA_DLLPATH)/graphcore.so $(SYSTEM_LIBPATH)/libgraphcore.so
177+
$(CP_REL) $(GRAPH_LUA_SRC) $(LUA_PATH)
178+
169179
clean:
170180
$(HOST_RM) *.o *.so *.dll $(TARGETS)
171181

0 commit comments

Comments
 (0)