Skip to content

Commit

Permalink
update to pdlua 16
Browse files Browse the repository at this point in the history
Update CMakeLists.txt
  • Loading branch information
porres committed Sep 13, 2024
1 parent 00c661d commit 67bc151
Show file tree
Hide file tree
Showing 224 changed files with 4,777 additions and 8,927 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@ file(GLOB extra_files
set(lua_resources
${CMAKE_CURRENT_SOURCE_DIR}/Source/Audio/scope3d~.pd_lua
${CMAKE_CURRENT_SOURCE_DIR}/Source/Control/lua/pd.lua
${CMAKE_CURRENT_SOURCE_DIR}/Source/Control/lua/luadoc/hello.lua
${CMAKE_CURRENT_SOURCE_DIR}/Source/Control/lua/luadoc/hello.pd_lua
${CMAKE_CURRENT_SOURCE_DIR}/Source/Control/lua/pdlua/hello.lua
${CMAKE_CURRENT_SOURCE_DIR}/Source/Control/lua/pdlua/hello.pd_lua
)

file(GLOB merda_files "${CMAKE_CURRENT_SOURCE_DIR}/Abstractions/Merda/Modules/*")
Expand Down
60 changes: 60 additions & 0 deletions Source/Control/lua/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# -*- mode: makefile-gmake -*-

# This needs GNU make.

# You may want to set these if you have the Pd include files in a
# non-standard location, and/or want to install the external in a
# custom directory.

#PDINCLUDEDIR = /usr/include/pd
#PDLIBDIR = /usr/lib/pd/extra

# No need to edit anything below this line, usually.

lib.name = pdlua

pdlua_version := $(shell git describe --tags 2>/dev/null)

luasrc = $(wildcard lua/onelua.c)

PKG_CONFIG ?= pkg-config

ifeq ($(luasrc),)
# compile with installed liblua
$(info ++++ NOTE: using installed lua)
luaflags = $(shell $(PKG_CONFIG) --cflags lua)
lualibs = $(shell $(PKG_CONFIG) --libs lua)
else
# compile with Lua submodule
$(info ++++ NOTE: using lua submodule)
luaflags = -DMAKE_LIB -Ilua
define forDarwin
luaflags += -DLUA_USE_MACOSX
endef
define forLinux
luaflags += -DLUA_USE_LINUX
endef
define forWindows
luaflags += -DLUA_USE_WINDOWS
endef
endif

cflags = ${luaflags} -DPDLUA_VERSION="$(pdlua_version)"

pdlua.class.sources := pdlua.c $(luasrc)
pdlua.class.ldlibs := $(lualibs)

datafiles = pd.lua $(wildcard pdlua*-help.pd)

PDLIBBUILDER_DIR=.
include $(PDLIBBUILDER_DIR)/Makefile.pdlibbuilder

install: installplus

pdx_files = $(addprefix ./pdlua/tutorial/examples/, pdx.lua pd-remote.el pd-remote.pd)

installplus:
$(INSTALL_DIR) -v "$(installpath)"
cp -r ./pdlua/ "${installpath}"/pdlua
cp pdlua-meta.pd "${installpath}"
cp $(pdx_files) "${installpath}"
Loading

0 comments on commit 67bc151

Please sign in to comment.