Skip to content

Commit

Permalink
More build fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
radare authored and trufae committed Nov 23, 2022
1 parent 04cec56 commit a33f538
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 14 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ src/libsdb.so*
src/libsdb.dylib
src/sdb
src/sdb_version.h
include/sdb/version.h
memcache/cmds
memcache/cmds.h
memcache/mcsdbc
Expand Down
2 changes: 1 addition & 1 deletion bindings/nodejs/nan/binding.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"sources": [ "sdb.cc" ],
"include_dirs": [
"<!(node -e \"require('nan')\")",
"./lib/sdb/src"
"./lib/sdb/include"
],
"dependencies": [
"./lib/sdb.gyp:libsdb"
Expand Down
2 changes: 1 addition & 1 deletion bindings/nodejs/nan/dist.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ rm -rf node_modules
npm install
rm -rf lib/sdb
git clone ../../../ lib/sdb
make -C lib/sdb src/sdb_version.h
make -C lib/sdb include/sdb/version.h
rm -rf lib/sdb/.git*
npm publish
2 changes: 1 addition & 1 deletion bindings/nodejs/nan/lib/sdb.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"sdb/src/ns.c",
"sdb/src/num.c",
"sdb/src/query.c",
"sdb/src/sdb_version.h",
"sdb/include/sdb/version.h",
"sdb/src/util.c",
]
}
Expand Down
11 changes: 6 additions & 5 deletions bindings/nodejs/nan/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"test.js",
"lib/sdb.gyp",
"lib/sdb/config.mk",
"lib/sdb/src/sdb_version.h",
"lib/sdb/include/sdb/version.h",
"lib/sdb/src/array.c",
"lib/sdb/src/base64.c",
"lib/sdb/src/buffer.c",
Expand All @@ -37,15 +37,16 @@
"lib/sdb/src/cdb.h",
"lib/sdb/src/cdb_make.c",
"lib/sdb/src/cdb_make.h",
"lib/sdb/src/config.h",
"lib/sdb/include/sdb/config.h",
"lib/sdb/src/disk.c",
"lib/sdb/src/fmt.c",
"lib/sdb/src/ht.c",
"lib/sdb/src/ht_uu.c",
"lib/sdb/src/ht_uu.h",
"lib/sdb/include/sdb/ht_uu.h",
"lib/sdb/src/ht_up.c",
"lib/sdb/src/ht_up.h",
"lib/sdb/include/sdb/ht_up.h",
"lib/sdb/src/ht_pp.c",
"lib/sdb/src/ht_pp.h",
"lib/sdb/include/sdb/ht_pp.h",
"lib/sdb/src/journal.c",
"lib/sdb/src/json.c",
"lib/sdb/src/json/Makefile",
Expand Down
2 changes: 1 addition & 1 deletion bindings/python/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ sdbsrc:
git clone ../.. sdbsrc-git
mv sdbsrc-git/src sdbsrc
rm -rf sdbsrc-git
cp ../../src/sdb_version.h sdbsrc
cp -f ../../include/sdb/version.h sdbsrc

test t:
python test.py
Expand Down
10 changes: 5 additions & 5 deletions src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ include ../config.mk
OBJ=cdb.o buffer.o cdb_make.o ls.o ht.o ht_uu.o sdb.o num.o base64.o match.o
OBJ+=json.o ns.o lock.o util.o disk.o query.o array.o fmt.o journal.o text.o
OBJ+=dict.o ht_pp.o ht_up.o ht_pu.o set.o diff.o
CFLAGS+=-I../include
CXXFLAGS+=-I../include
SDB_CFLAGS+=-I../include
SDB_CXXFLAGS+=-I../include
SOBJ=$(subst .o,.o.o,${OBJ})
WITHPIC?=1
BIN=sdb${EXT_EXE}
Expand Down Expand Up @@ -78,22 +78,22 @@ mrproper clean:
ifneq ($(SILENT),)
@echo LD $<
endif
$(CC) $(LDFLAGS) -c $(CFLAGS) -o $@ $<
$(CC) $(LDFLAGS) -c $(CFLAGS) $(SDB_CFLAGS) -o $@ $<

S=$

%.o: %.c
ifneq ($(SILENT),)
@echo CC $<
endif
$(CC) -c ${CPPFLAGS} ${CFLAGS} ${CFLAGS_SHARED} -o $@ $<
$(CC) -c ${CPPFLAGS} ${CFLAGS} $(SDB_CFLAGS) ${CFLAGS_SHARED} -o $@ $<

%.o.o: %.c
ifneq ($(SILENT),)
@echo CC PIC $<
endif
@mv `echo $<|sed -e 's,\.c$S,\.d,g'` $<.tmp 2>/dev/null || true
$(CC) -c ${CPPFLAGS} ${CFLAGS} ${CFLAGS_SHARED} -o $@ $<
$(CC) -c ${CPPFLAGS} ${CFLAGS} $(SDB_CFLAGS) ${CFLAGS_SHARED} -o $@ $<
@mv `echo $<|sed -e 's,\.c$S,\.d,g'` `echo $<|sed -e 's,\.c$S,\._d,g'` 2>/dev/null || true
@mv $<.tmp `echo $<|sed -e 's,\.c$S,\.d,g'` 2>/dev/null ||true

Expand Down

0 comments on commit a33f538

Please sign in to comment.