Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Fetching contributors…
Cannot retrieve contributors at this time
140 lines (97 sloc) 5.05 KB
GCC = /usr/bin/gcc
GPP = /usr/bin/g++
LD = /usr/bin/g++
export LC_ALL:=C
OBJ= main.o base64.o global.o console.o process.o net.o fs.o buffer.o http.o gd.o ncurses.o sem.o logfile.o v8.o md5.o sqlite3.o xhrhelper.o curl.o ssh2.o sftp.o memcached.o ftplib.o ftp.o editline.o popen.o linenoise.o cairo.o expat.o async.o time.o mysql.o
CFLAGS = -fexceptions -fomit-frame-pointer -fdata-sections -ffunction-sections -fno-strict-aliasing -fvisibility=hidden -Wall -W -Wno-unused-function -Wno-unused-parameter -Wnon-virtual-dtor -m64 -O3 -fomit-frame-pointer -fdata-sections -ffunction-sections -ansi -fno-strict-aliasing
V8DIR = v8-read-only
V8LIB_DIR = $(V8DIR)/out/x64.release
V8= $(V8LIB_DIR)/libv8_base.a $(V8LIB_DIR)/libv8_snapshot.a $(V8LIB_DIR)/libv8.dylib
V8LIBS = -L$(V8LIB_DIR) -lv8
MYSQL = $(CURDIR)/mysql-5.1.63
JPEG = $(CURDIR)/jpeg-8b
PNG = $(CURDIR)/libpng-1.2.50
FREETYPE = $(CURDIR)/freetype-2.4.10
GD2 = $(CURDIR)/libgd2_2.0.36~rc1~dfsg.orig
MM = $(CURDIR)/mm-1.4.2
CURL = $(CURDIR)/curl-7.21.6
SSH2 = $(CURDIR)/libssh2-1.2.8
MEMCACHED = $(CURDIR)/libmemcached-0.44
CAIRO = $(CURDIR)/cairo-1.10.2
LIBDIR = $(CURDIR)/osx_dependencies
$(LIBDIR)/lib/mysql/libmysqlclient.a \
$(LIBDIR)/lib/libcurl.a \
$(LIBDIR)/lib/libmm.a \
$(LIBDIR)/lib/libfreetype.a \
$(LIBDIR)/lib/libgd.a \
$(LIBDIR)/lib/libjpeg.a \
$(LIBDIR)/lib/libpng.a \
$(LIBDIR)/lib/libmemcached.a \
%.o: %.cpp SilkJS.h Makefile
g++ $(CFLAGS) -c -I/usr/X11/include -I$(CURDIR)/osx_dependencies/include -I$(MYSQL)/include -I$(SSH2)/include -Iv8-read-only/include -o $*.o $*.cpp
SilkJS: $(V8DIR) $(V8) $(DEPENDENCIES) $(OBJ) SilkJS.h Makefile
$(LD) -rdynamic -o silkjs $(OBJ) $(STATICLIBS) $(V8LIBS) -lncurses -lpthread -lsqlite3 -L/usr/X11/lib -lcairo -lexpat -lz -lssl -lcrypto -lpng -lfreetype -lxpm -liconv -lfontconfig -ldl -lsasl2 -lbz2 -Wl,-rpath,/usr/local/silkjs/src/v8,-rpath,$(V8LIB_DIR)
@sudo mkdir -p /usr/local/bin
sudo chgrp admin /usr/local /usr/local/bin
sudo chmod g+rwx /usr/local /usr/local/bin
install: SilkJS perms
@rm -rf /usr/local/silkjs/builtin /usr/local/silkjs/bin /usr/local/silkjs/httpd /usr/local/silkjs/lib /usr/local/silkjs/modules /usr/local/silkjs/walkthrough /usr/local/silkjs/src
@mkdir -p /usr/local/bin /usr/local/silkjs /usr/local/silkjs/src /usr/local/silkjs/src/v8 /usr/local/silkjs/projects /usr/local/silkjs/contrib
cp -rp ../builtin ../examples ../httpd ../lib ../modules ../walkthrough /usr/local/silkjs
cp ../src/*.cpp ../src/*.h /usr/local/silkjs/src
cp -rp $(V8DIR)/include $(V8) /usr/local/silkjs/src/v8
install_name_tool -id "@rpath/libv8.dylib" /usr/local/silkjs/src/v8/libv8.dylib
mv /usr/local/silkjs/examples /usr/local/silkjs/bin
chmod 755 /usr/local/silkjs/bin/* /usr/local/silkjs/httpd/main.js
cp silkjs /usr/local/silkjs/bin
install_name_tool -change $(CURDIR)/$(V8LIB_DIR)/libv8.dylib @rpath/libv8.dylib /usr/local/silkjs/bin/silkjs
ln -sf /usr/local/silkjs/bin/silkjs /usr/local/bin
ln -sf /usr/local/silkjs/httpd/main.js /usr/local/bin/httpd-silk.js
@rm -rf /usr/local/silkjs /usr/local/bin/httpd-silk.js /usr/local/bin/silkjs
rm -rf silkjs *.o
rm -rf silkjs *.o $(DEPENDENCIES) $(V8DIR) $(LIBDIR)
release: silkjs
tar czvfp ~/silkjs.tgz silkjs examples httpd lib
$(OBJ): SilkJS.h Makefile
echo "svn checkout"
svn checkout v8-read-only
cd $(V8DIR) && svn update && make dependencies && GYP_GENERATORS=make make GYPFLAGS="-Dcomponent=shared_library" -j 4 x64.release $(V8VERSION)
# cd $(V8DIR) && scons -j 4 arch=x64
tar xzvfp dependencies/mysql-5.1.63.tar.gz
cd $(MYSQL) && ./configure --prefix $(LIBDIR) --without-bench --without-server && make && make install
tar xzvfp dependencies/libmemcached_0.44.orig.tar.gz
cd $(MEMCACHED) && ./configure --prefix $(LIBDIR) CFLAGS=-fPIC --disable-shared && make && make install
tar xzvfp dependencies/libjpeg8_8b.orig.tar.gz
cd $(JPEG) && ./configure --prefix $(LIBDIR) && make && make install
tar xzvfp dependencies/libpng-1.2.50.tar.gz
cd $(PNG) && ./configure --prefix $(LIBDIR) && make && make install
tar xzvfp dependencies/freetype-2.4.10.tar.gz
cd $(FREETYPE) && ./configure --prefix $(LIBDIR) && make && make install
tar xzvfp dependencies/libgd2_2.0.36~rc1~dfsg.orig.tar.gz
cd $(GD2) && ./configure --prefix $(LIBDIR) --with-freetype=$(LIBDIR) --with-png=$(LIBDIR) --with-jpeg=$(LIBDIR) && LC_ALL=C make && make install
tar xzvfp dependencies/mm_1.4.2.orig.tar.gz
cd $(MM) && ./configure --prefix $(LIBDIR) && make && make install
tar xzvfp dependencies/curl_7.21.6.orig.tar.gz
cd $(CURL) && ./configure --prefix $(LIBDIR) --disable-ldap && make && make install
tar xzvfp dependencies/libssh2_1.2.8.orig.tar.gz
cd $(SSH2) && ./configure --prefix $(LIBDIR) && make && make install
cd $(LIBDIR)/include && tar xzvfp $(CURDIR)/dependencies/cairo-includes.tar.gz
Jump to Line
Something went wrong with that request. Please try again.