aboutsummaryrefslogtreecommitdiff
path: root/src/Makefile
diff options
context:
space:
mode:
authormitchell <70453897+667e-11@users.noreply.github.com>2014-03-26 10:15:53 -0400
committermitchell <70453897+667e-11@users.noreply.github.com>2014-03-26 10:15:53 -0400
commitf65b2b2a66f05b20010256ca1d81cc3252ea1471 (patch)
treec7ee3cd4753a9e8a73f9e9d3e8a45f96eb5b36c7 /src/Makefile
parent6304010d93b3cfe43e246dbb49c60d147a366b1b (diff)
downloadtextadept-f65b2b2a66f05b20010256ca1d81cc3252ea1471.tar.gz
textadept-f65b2b2a66f05b20010256ca1d81cc3252ea1471.zip
Include my new "lspawn" module by default for spawning processes.
The `textadept.run` module now uses `spawn()` instead of `io.popen()`. This module replaces the dependency on winapi. Removed experimental `io.popen()` and `os.execute()` hooks. They may be re-implemented later using `spawn()`.
Diffstat (limited to 'src/Makefile')
-rw-r--r--src/Makefile31
1 files changed, 16 insertions, 15 deletions
diff --git a/src/Makefile b/src/Makefile
index c4452619..563fdfe6 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -33,6 +33,9 @@ ifneq (, $(or $(findstring Linux, $(kernel)), $(findstring BSD, $(kernel))))
GTK_LIBS = $(shell PKG_CONFIG_PATH=`pwd`/$(arch)gtk/lib/pkgconfig \
pkg-config --define-variable=prefix=$(arch)gtk \
--libs gtk+-2.0)
+ GLIB_CFLAGS = $(shell PKG_CONFIG_PATH=`pwd`/$(arch)gtk/lib/pkgconfig \
+ pkg-config --define-variable=prefix=$(arch)gtk \
+ --cflags glib-2.0)
else
plat_flag = -DCURSES
CURSES_CFLAGS = -DLIBICONV_STATIC -I$(arch)curses/include
@@ -62,6 +65,9 @@ ifneq (, $(or $(findstring Linux, $(kernel)), $(findstring BSD, $(kernel))))
pkg-config --define-variable=prefix=gtkosx \
--libs gtk+-2.0 gmodule-2.0 gtk-mac-integration) \
-framework Cocoa
+ GLIB_CFLAGS = $(shell PKG_CONFIG_PATH=`pwd`/gtkosx/lib/pkgconfig \
+ pkg-config --define-variable=prefix=gtkosx \
+ --cflags glib-2.0)
else
plat_flag = -DCURSES -D_XOPEN_SOURCE_EXTENDED
CURSES_LIBS = -lncurses
@@ -98,6 +104,7 @@ ifneq (, $(or $(findstring Linux, $(kernel)), $(findstring BSD, $(kernel))))
endif
GTK_CFLAGS = $(shell pkg-config --cflags gtk+-$(gtk_version) gmodule-2.0)
GTK_LIBS = $(shell pkg-config --libs gtk+-$(gtk_version) gmodule-2.0)
+ GLIB_CFLAGS = $(shell pkg-config --cflags glib-2.0)
install_targets = ../textadept ../textadeptjit
else
plat_flag = -DCURSES -D_XOPEN_SOURCE_EXTENDED
@@ -175,16 +182,11 @@ lua_objs = lapi.o lcode.o lctype.o ldebug.o ldo.o ldump.o lfunc.o lgc.o \
lstring.o ltable.o ltm.o lundump.o lvm.o lzio.o \
lauxlib.o lbaselib.o lbitlib.o lcorolib.o ldblib.o liolib.o \
lmathlib.o loadlib.o loslib.o ltablib.o lstrlib.o
-lua_lib_objs = lpeg.o lfs.o
+lua_lib_objs = lpeg.o lfs.o lspawn.o
#lua_lib_objs = lpcap.o lpcode.o lpprint.o lptree.o lpvm.o lfs.o
-luajit_lib_objs = lpegjit.o lfsjit.o
+luajit_lib_objs = lpegjit.o lfsjit.o lspawnjit.o
#luajit_lib_objs = lpcapjit.o lpcodejit.o lpprintjit.o lptreejit.o lpvmjit.o \
# lfsjit.o
-ifeq (win, $(findstring win, $(MAKECMDGOALS)))
- # Compile in winapi module for Windows.
- lua_lib_objs += wutils.o winapi.o
- luajit_lib_objs += wutilsjit.o winapijit.o
-endif
termkey_objs = termkey.o driver-ti.o driver-csi.o
windowman_objs = windowman.o
cdk_objs = binding.o buttonbox.o button.o cdk.o cdk_display.o cdk_objs.o \
@@ -248,9 +250,9 @@ textadeptjit-curses.o: textadept.c
$(lua_objs): %.o: lua/src/%.c
$(CROSS)$(CC) -c $(CFLAGS) $(LUA_CFLAGS) -Ilua/src $< -o $@
$(lua_lib_objs): %.o: lua/src/lib/%.c
- $(CROSS)$(CC) -c $(CFLAGS) $(LUA_CFLAGS) -Ilua/src $< -o $@
+ $(CROSS)$(CC) -c $(CFLAGS) $(LUA_CFLAGS) -Ilua/src $(GLIB_CFLAGS) $< -o $@
$(luajit_lib_objs): %jit.o: lua/src/lib/%.c
- $(CROSS)$(CC) -c $(CFLAGS) $(LUA_CFLAGS) -Iluajit/src $< -o $@
+ $(CROSS)$(CC) -c $(CFLAGS) $(LUA_CFLAGS) -Iluajit/src $(GLIB_CFLAGS) $< -o $@
luajit/src/libluajit.a: ; $(MAKE) -C luajit CC="$(CC) $(CFLAGS)"
luajit/src/lua51.dll:
$(MAKE) -C luajit HOST_CC="$(CC) -m32" CROSS=$(CROSS) TARGET_SYS=Windows
@@ -431,7 +433,7 @@ scintillua_zip = scintillua.zip
lua_tgz = lua-5.2.3.tar.gz
lpeg_tgz = lpeg-0.10.2.tar.gz
lfs_zip = d71c63cdb776f7d25313f8fcd14f07512ba1f83e.zip
-lwinapi_zip = 23dd43141d04d010a9986cca9e5ecb9e598a2899.zip
+lspawn_zip = lspawn.zip
luajit_tgz = LuaJIT-2.0.3.tar.gz
libluajit_tgz = libluajit_2.0.3.x86_64.tgz
gtdialog_zip = gtdialog.zip
@@ -463,19 +465,18 @@ $(lua_tgz): ; wget "http://www.lua.org/ftp/$@"
$(lpeg_tgz): ; wget "http://www.inf.puc-rio.br/~roberto/lpeg/$@"
$(lfs_zip):
wget "https://github.com/keplerproject/luafilesystem/archive/$@" -O $@
-$(lwinapi_zip): ; wget "https://github.com/stevedonovan/winapi/archive/$@" -O $@
+$(lspawn_zip): ; wget "http://foicica.com/hg/lspawn/archive/tip.zip" -O $@
lua: lua.patch | $(lua_tgz)
mkdir $@ && tar xzf $| -C $@ && mv $@/*/* $@
patch -d $@ -N -p1 < $<
-lualibs: lua/src/lib/lpeg lua/src/lib/lfs lua/src/lib/winapi
+lualibs: lua/src/lib/lpeg lua/src/lib/lfs lua/src/lib/lspawn
lua/src/lib/lpeg: | $(lpeg_tgz)
mkdir -p $@ && tar xzf $| -C $@ && mv $@/*/*.c $@/*/*.h $(dir $@)
lua/src/lib/lfs: lfs.patch | $(lfs_zip)
mkdir -p $@ && unzip -d $@ $| && mv $@/*/src/*.c $@/*/src/*.h $(dir $@)
patch -d $(dir $@) -N -p1 < $<
-lua/src/lib/winapi: winapi.patch | $(lwinapi_zip)
- mkdir -p $@ && unzip -d $@ $| && mv $@/*/*.c $@/*/*.h $(dir $@)
- patch -d $(dir $@) -N --binary -p1 < $<
+lua/src/lib/lspawn: | $(lspawn_zip)
+ mkdir -p $@ && unzip -d $@ $| && mv $@/*/*.c $(dir $@)
$(luajit_tgz): ; wget "http://luajit.org/download/$@"
luajit: luajit.patch | $(luajit_tgz)
mkdir $@ && tar xzf $| -C $@ && mv $@/*/* $@