1 # Your system. Expands to 'GNU/Linux' or 'Cygwin'
2 SYSTEM = $(shell uname)
4 ifneq ($(SYSTEM), Linux)
5 ifneq ($(SYSTEM), Darwin)
6 SYSTEM = $(shell uname -o)
13 # Plugins: static or dynamic
14 USE_BUILTIN_PLUGINS=no
20 ifeq ($(SYSTEM), Msys)
22 # LFW support Lua 5.1 only
37 # Current graphviz version
38 GVVERSION = $(shell dot -V 2>&1 | cut -d " " -f 5)
39 ifeq ($(SYSTEM), Msys)
41 GVLIB=$(GVROOT)/lib/graphviz
44 ifeq ($(SYSTEM), Darwin)
50 GVINC=$(GVROOT)/include
52 # Root of Lua Installation
53 ifeq ($(SYSTEM), Msys)
54 INSTALL_ROOT=/c/usr/local
56 INSTALL_ROOT=/usr/local
58 INSTALL_SHARE=$(INSTALL_ROOT)/share/lua/$(LV)
59 INSTALL_LIB=$(INSTALL_ROOT)/lib/lua/$(LV)
60 INSTALL_DOC=$(INSTALL_ROOT)/share/doc/$(MODULE)
64 INSTALL_EXEC = $(INSTALL) -m 0755
65 INSTALL_DATA = $(INSTALL) -m 0644
66 INSTALL_COPY = cp -p -r
68 # == YOU PROBABLY DO NOT NEED TO CHANGE ANYTHING BELOW =======================
70 # Platform specific differences
72 ifeq ($(SYSTEM), Msys)
89 ifeq ($(SYSTEM), Darwin)
90 # Lua installation for Darwin
93 LUABIN=$(LUA)/bin/lua$V
94 LUAINC=$(LUA)/include/lua/$(LV)
98 # Lua installation for Linux (Debian)
100 LUAINC=$(LUA)/include/lua$(LV)
101 LUABIN=$(LUA)/bin/lua$(LV)
110 # Downward compatibility
113 # Current Version of LuaGRAPH
116 #LuaGRAPH module frontend
117 LUAGRAPH=graph$(LV).lua
120 LUAGRAPH_SO=graph.$(EXT).$(VERSION)
121 LUAGRAPH_WIN32=luagraph51-2.0.0-2
124 TESTLUA=test/test$(LV).lua
125 # Compiler and Linker
126 DEF = $(DEFCOMPAT) -DSYSTEM='"$(SYSTEM)"' -DGVVERSION='"$(GVVERSION)"' $(PLATFORM)
133 CFLAGS=-I$(LUAINC) -I$(GVINC) $(DEF) -Wall $(OPT)
135 ifeq (Darwin, $(SYSTEM))
136 LDFLAGS= $(OPT) -dynamiclib -undefined dynamic_lookup -L$(LUALIB) -L$(GVLIB)
137 LIBS += -lgvc -lcgraph -lcdt -lpathplan -lltdl
139 ifeq (Linux, $(SYSTEM))
141 LDFLAGS= $(OPT) -shared -L$(LUALIB)
142 LIBS += -lgvc -lcgraph -lcdt -lpathplan -lltdl
144 ifeq (Msys, $(SYSTEM))
145 CFLAGS += -mwin32 -I$(GVINC)
146 LDFLAGS= -O -shared -L$(GVLIB) -L$(LUALIB)
147 ifeq ($(USE_BUILTIN_PLUGINS), yes)
148 CFLAGS += -DUSE_BUILTIN_PLUGINS
149 LIBS += -lgvc -lcdt -lpathplan -lltdl -lcgraph -lgvplugin_dot_layout -lgvplugin_neato_layout -lgvplugin_core -lgvplugin_gd -lgvplugin_pango
151 LIBS += -lgvc -lcdt -lpathplan -lltdl -lcgraph
159 EXPORTDIR = $(HOME)/exports
160 DISTNAME = $(MODULE)-$(VERSION)
161 DISTARCH = $(DISTNAME).tar.gz
162 CVSMODULE = lua/lua-$(LV)/modules/$(MODULE)
163 SVNMODULE = $(MODULE)-$(VERSION)