Skip to content

Commit

Permalink
modify GNU Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
puritys committed May 22, 2015
1 parent 8fcf1fe commit e4c39f3
Show file tree
Hide file tree
Showing 8 changed files with 89 additions and 17 deletions.
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ gyp-test:
node-gyp build
# sudo cp build/Release/nodejs-phplike.node /usr/local/lib/node_modules/phplike/node_modules/phplike.node

test: mocha

mocha:
mocha tests/*.js
mocha tests/mysql/*.js
Expand Down
24 changes: 22 additions & 2 deletions src/cpp/Makefile
Original file line number Diff line number Diff line change
@@ -1,2 +1,22 @@
all:
xxxxxxxxx
.PHONY: basic curl exec md5 xml socket

all: basic curl exec md5 socket
#xml

basic:
cd basic/src && make

curl:
cd curl/src && make

exec:
cd exec/src && make

md5:
cd md5/src && make

xml:
cd xml/src && make

socket:
cd socket/src && make
4 changes: 2 additions & 2 deletions src/cpp/basic/src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ CXXFILE= string.cc
SO = phplikeCppBasic


include ../../../conf/Makefile_so.global
include ../../../../conf/Makefile_so.global
all:
sudo cp phplikeCppCurl.so /usr/local/lib/node/libphplikeCppBasic.so
sudo cp phplikeCppBasic.so /usr/local/lib/node/libphplikeCppBasic.so



Expand Down
2 changes: 1 addition & 1 deletion src/cpp/curl/src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ CXXFILE= util.cc phplikeCppCurl.cc
SO = phplikeCppCurl


include ../../../conf/Makefile_so.global
include ../../../../conf/Makefile_so.global
all:
sudo cp phplikeCppCurl.so /usr/local/lib/node/libphplikeCppCurl.so

Expand Down
3 changes: 1 addition & 2 deletions src/cpp/exec/src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ LIBS= -std=gnu++0x
extlib =
CXXFILE= exec.cc
SO = exec
#include ../../../conf/Makefile_exe_nodejs.global
include ../../../conf/Makefile_so.global
include ../../../../conf/Makefile_so.global
all:
sudo cp exec.so /usr/local/lib/node/libexec.so

Expand Down
16 changes: 16 additions & 0 deletions src/cpp/md5/src/Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
SRC_PATH=$(shell pwd)
CC=g++
CFLAGS= -L/usr/lib -I/usr/lib
LIBS=
#-lcurlpp -I./curlpp/include/
extlib =
CXXFILE= md5.cc
SO = phplikeCppMd5


include ../../../../conf/Makefile_so.global
all:
# sudo cp phplikeCppBasic.so /usr/local/lib/node/libphplikeCppBasic.so




ifneq (, $(CYGWIN_PATH))
M_CYGWIN_PATH=$(CYGWIN_PATH)
Expand Down
8 changes: 4 additions & 4 deletions src/cpp/socket/src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ CFLAGS= -L/usr/lib -I/usr/lib
LIBS= -lcurl
#-lcurlpp -I./curlpp/include/
extlib =
CXXFILE= phplikeSocket.cc
SO = phplikeSocket
CXXFILE= socket.cc
SO = phplikeCppSocket


include ../../../conf/Makefile_so.global
include ../../../../conf/Makefile_so.global
all:
# sudo cp phplikeCppCurl.so /usr/local/lib/node/libphplikeCppCurl.so
# sudo cp phplikeCppSocket.so /usr/local/lib/node/libphplikeCppSocket.so



Expand Down
47 changes: 41 additions & 6 deletions src/cpp/xml/src/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,41 @@
all: xmltest
xmltest: xmltest.cpp tinyxml2.cpp tinyxml2.h
test: clean xmltest
./xmltest
clean:
rm -f *.o xmltest
SRC_PATH=$(shell pwd)
CC=g++
CFLAGS= -L/usr/lib -I/usr/lib
LIBS=
extlib =
CXXFILE= tinyxml2.cpp
SO = phplikeCppXml


include ../../../../conf/Makefile_so.global

all:
echo " xxxxxxx"


ifneq (, $(CYGWIN_PATH))
M_CYGWIN_PATH=$(CYGWIN_PATH)
else
M_CYGWIN_PATH=C:/cygwin64
endif

CWD=`echo $(M_CYGWIN_PATH)$(shell pwd) | sed 's/\//\\\/g'`



gyp:
node-gyp configure --CWD=$(CWD)
node-gyp build

gyp-ins:
gmake gyp
# sudo cp build/Release/phplikeCppCurl.$(soExt) /usr/local/lib/node/libphplikeCppCurl.$(soExt)
# sudo ldconfig
#sudo cp build/Release/obj.target/phplikeCppCurl/phplikeCppCurl.o /usr/local/lib/node/libphplikeCppCurl.so


#xmltest: xmltest.cpp tinyxml2.cpp tinyxml2.h
#test: clean xmltest
# ./xmltest
#clean:
# rm -f *.o xmltest

0 comments on commit e4c39f3

Please sign in to comment.