You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

62 lines
2.8 KiB

Index: Makefile
--- Makefile.orig 2018-11-01 15:07:53.000000000 +0100
+++ Makefile 2018-11-01 15:12:08.590174000 +0100
@@ -1,5 +1,5 @@
REPO ?= actordb
-PKG_REVISION ?= $(shell git describe --tags)
+PKG_REVISION ?= 0
PKG_BUILD = 1
BASE_DIR = $(shell pwd)
ERLANG_BIN = $(shell dirname $(shell which erl))
@@ -7,19 +7,9 @@
OVERLAY_VARS ?=
uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo not')
-ifeq ($(uname_S),Darwin)
- SHELLCMD = gcc c_src/cmdshell.c -I/usr/local/opt/readline/include/ /usr/local/opt/readline/lib/libreadline.a -lncurses -o priv/cmdshell
-else ifeq ($(shell cat /etc/redhat-release | cut -d' ' -f1),CentOS)
- SHELLCMD = gcc c_src/cmdshell.c -lreadline -lncurses -o priv/cmdshell
-else
- SHELLCMD = gcc c_src/cmdshell.c -static -Wl,-Bdynamic,-lgcc_s,-Bstatic -lreadline -lncurses -ltinfo -o priv/cmdshell
-endif
+SHELLCMD = $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) c_src/cmdshell.c -lreadline -lncurses -o priv/cmdshell
-ifeq ($(uname_S),Darwin)
- TOOLCMD = gcc deps/actordb_driver/c_src/tool.c deps/actordb_driver/c_src/mdb.c deps/actordb_driver/c_src/midl.c deps/actordb_driver/c_src/lz4.c -D_TESTAPP_=1 -DMDB_MAXKEYSIZE=0 -DSQLITE_DEFAULT_PAGE_SIZE=4096 -DSQLITE_DEFAULT_WAL_AUTOCHECKPOINT=0 -o actordb_tool
-else
- TOOLCMD = gcc deps/actordb_driver/c_src/tool.c deps/actordb_driver/c_src/mdb.c deps/actordb_driver/c_src/midl.c deps/actordb_driver/c_src/lz4.c -D_TESTAPP_=1 -DMDB_MAXKEYSIZE=0 -DSQLITE_DEFAULT_PAGE_SIZE=4096 -DSQLITE_DEFAULT_WAL_AUTOCHECKPOINT=0 -lpthread -ldl -o actordb_tool
-endif
+TOOLCMD = $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) deps/actordb_driver/c_src/tool.c deps/actordb_driver/c_src/mdb.c deps/actordb_driver/c_src/midl.c deps/actordb_driver/c_src/lz4.c -D_TESTAPP_=1 -DMDB_MAXKEYSIZE=0 -DSQLITE_DEFAULT_PAGE_SIZE=4096 -DSQLITE_DEFAULT_WAL_AUTOCHECKPOINT=0 -lpthread -o actordb_tool
$(if $(ERLANG_BIN),,$(warning "Warning: No Erlang found in your path, this will probably not work"))
@@ -76,7 +66,7 @@
# Last tag: actordb-1.1.0pre1
# Commits since tag: 27
# Hash of commit: g1170096
-REPO_TAG := $(shell git describe --tags)
+REPO_TAG := 00000000
# Split off repo name
# Changes to 1.0.3 or 1.1.0pre1-27-g1170096 from example above
@@ -153,7 +143,6 @@
distdir/$(CLONEDIR)/$(MANIFEST_FILE):
- $(if $(REPO_TAG), $(call get_dist_deps), $(error "You can't generate a release tarball from a non-tagged revision. Run 'git checkout <tag>', then 'make dist'"))
distdir/$(PKG_ID): distdir/$(CLONEDIR)/$(MANIFEST_FILE)
$(call build_clean_dir)
Index: c_src/cmdshell.c
--- c_src/cmdshell.c.orig 2018-11-01 15:07:53.000000000 +0100
+++ c_src/cmdshell.c 2018-11-01 15:11:10.662217000 +0100
@@ -10,9 +10,7 @@
#endif
#include <fcntl.h>
#include <errno.h>
-#ifdef __linux__
#include <signal.h>
-#endif
#include <readline/readline.h>
#include <readline/history.h>
#include <curses.h>