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/graphviz
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 -Wno-comment -Wno-error=implicit-function-declaration $(OPT)
134 #CFLAGS=-I$(LUAINC) -I$(GVINC) $(DEF) -Wno-error=implicit-function-declaration $(OPT)
136 ifeq (Darwin, $(SYSTEM))
137 LDFLAGS= $(OPT) -dynamiclib -undefined dynamic_lookup -L$(LUALIB) -L$(GVLIB)
138 LIBS += -lgvc -lcgraph -lcdt -lpathplan -lltdl
140 ifeq (Linux, $(SYSTEM))
142 LDFLAGS= $(OPT) -shared -L$(LUALIB)
143 LIBS += -lgvc -lcgraph -lcdt -lpathplan -lltdl
145 ifeq (Msys, $(SYSTEM))
146 CFLAGS += -mwin32 -I$(GVINC)
147 LDFLAGS= -O -shared -L$(GVLIB) -L$(LUALIB)
148 ifeq ($(USE_BUILTIN_PLUGINS), yes)
149 CFLAGS += -DUSE_BUILTIN_PLUGINS
150 LIBS += -lgvc -lcdt -lpathplan -lltdl -lcgraph -lgvplugin_dot_layout -lgvplugin_neato_layout -lgvplugin_core -lgvplugin_gd -lgvplugin_pango
152 LIBS += -lgvc -lcdt -lpathplan -lltdl -lcgraph
160 EXPORTDIR = $(HOME)/exports
161 DISTNAME = $(MODULE)-$(VERSION)
162 DISTARCH = $(DISTNAME).tar.gz
163 CVSMODULE = lua/lua-$(LV)/modules/$(MODULE)
164 SVNMODULE = $(MODULE)-$(VERSION)