*.o
*.vlog
+*.dylib
/npm-debug.log
/.idea/workspace.xml
/tcejdb/tcumttest
/tcejdb/tcutest
/tcejdb/tcejdb.pc
+
/tcejdb/nbproject/private
+/tcejdb/static
/tcejdb/check.in
/tcejdb/check.out
/tcejdb/casket*
'-L../tcejdb',
'-Wl,-Bstatic -ltcejdb',
'-Wl,-Bdynamic',
- '-lz -lrt -lpthread -lm -lc'
+ '-lz -lpthread -lm -lc'
]
}],
- ],
+ [ 'OS=="mac"', {
+ 'defines': ['_DARWIN_USE_64_BIT_INODE=1'],
+ 'cflags': [ '-Wall', '-pedantic'],
+ 'cflags_cc!' : [ '-fno-exceptions' ],
+ 'xcode_settings': {
+ 'GCC_ENABLE_CPP_EXCEPTIONS':'YES',
+ 'OTHER_CFLAGS': [
+ '-fsigned-char', '-pthread', '-Wno-variadic-macros', '-fexceptions'
+ ],
+ 'OTHER_LDFLAGS': [
+ '-Wl,-search_paths_first',
+ '-L./tcejdb/static',
+ '-ltcejdb -lz -lpthread -lm -lc'
+ ]
+ }
+ }]
+ ],
'include_dirs' : ['tcejdb'],
},
UnlockFile(hf, 0, 0, li.LowPart, li.HighPart);
}
#endif
-#ifdef __unix
-
+#if defined __unix || defined __APPLE__
static void __flockfile(FILE *stream) {
flockfile(stream);
}
#include <vector>
#include <sstream>
-#include <hash_set>
#include <locale.h>
-
+#include <ext/hash_set>
using namespace node;
using namespace v8;
clean :
- rm -rf $(LIBRARYFILES) $(LIBOBJFILES) $(COMMANDFILES) $(CGIFILES) \
+ rm -rf $(LIBRARYFILES) $(LIBOBJFILES) $(COMMANDFILES) $(CGIFILES) static \
*.o a.out tokyocabinet_all.c check.in check.out gmon.out *.vlog words.tsv \
casket casket-* casket.* *.tch *.tcb *.tcf *.tct *.idx.* *.wal *~ hoge moge tako ika
make -C ./testejdb clean
./tctmgr importtsv casket words.tsv
-.PHONY : all clean install check
+.PHONY : all clean install check check-ejdb
libtcejdb.a : $(LIBOBJFILES)
$(AR) $(ARFLAGS) $@ $(LIBOBJFILES)
+ mkdir -p ./static
+ cp ./libtcejdb.a ./static
libtcejdb.so.$(LIBVER).$(LIBREV).0 : $(LIBOBJFILES)
CFLAGS = -std=c99 -Wall -fPIC -pedantic -fsigned-char -g -O0
LDFLAGS = -L. -L..
CMDLDFLAGS =
-LIBS = -lz -lrt -lpthread -lm -lc -lcunit
-RUNENV = LD_LIBRARY_PATH=.:..
+LIBS = -lz -lpthread -lm -lc -lcunit
+RUNENV = LD_LIBRARY_PATH=.:..;DYLD_LIBRARY_PATH=.:..
TESTS = t1 t2 t3