####################################################################### # User configuration goes here # Uncomment the particular line according to your platform PLATFORM = linux #PLATFORM = macosx #PLATFORM = mingw # If Pd is in an unusual place, put -I/path/to m_pd.h here: PDINCLUDE = #PDINCLUDE = -I$(HOME)/include #PDINCLUDE = -I/opt/puredata/include #PDINCLUDE = -I/Applications/Pd-0.41-4.app/Contents/Resources/src # End of user configuration ####################################################################### # which Pd external to build lua_src = src/lua.c lua_linux = src/lua.pd_linux lua_macosx = src/lua.pd_darwin lua_mingw = src/lua.dll # how to build a Pd external # FIXME: Windows? CFLAGS_linux = -shared LIBS_linux = CFLAGS_macosx = -bundle -undefined suppress -flat_namespace LIBS_macosx = CFLAGS_mingw = -export_dynamic -shared LIBS_mingw = pd.dll # Lua setup ##LUA = lua-5.1.3 ##LUATGZ = $(LUA).tar.gz ##LUAURL = http://www.lua.org/ftp/$(LUATGZ) ##LUAI = -I$(LUA)/include/ ##LUAL = $(LUA)/lib/liblua.a ##CFLAGS = -ansi -pedantic -Wall -O2 -fPIC $(LUAI) $(PDINCLUDE) # LuaJIT setup LUA = LuaJIT-1.1.4 LUATGZ = $(LUA).tar.gz LUAURL = http://luajit.org/download/$(LUATGZ) LUAI = -I$(LUA)/src/ LUAL = $(LUA)/src/liblua.a CFLAGS = -ansi -pedantic -Wall -O2 -fPIC $(LUAI) $(PDINCLUDE) # build default: $(lua_$(PLATFORM)) # clean up clean: rm -f $(lua_$(PLATFORM)) # install install: echo "TODO" # compile $(lua_$(PLATFORM)): $(lua_src) $(LUA)/build.stamp gcc $(CFLAGS) $(CFLAGS_$(PLATFORM)) -o $(lua_$(PLATFORM)) $(lua_src) $(LUAL) $(LIBS_$(PLATFORM)) # get Lua: download, unpack, compile, install locally $(LUA)/build.stamp: $(LUA)/unpack.stamp make -C $(LUA) $(PLATFORM) local touch $(LUA)/build.stamp $(LUA)/unpack.stamp: $(LUATGZ) tar xzf $(LUATGZ) touch $(LUA)/unpack.stamp $(LUATGZ): wget $(LUAURL)