diff options
-rw-r--r-- | c_src/Makefile | 10 | ||||
-rw-r--r-- | src/mysqlerl_connection.erl | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/c_src/Makefile b/c_src/Makefile index 29eec47..c976202 100644 --- a/c_src/Makefile +++ b/c_src/Makefile @@ -12,9 +12,9 @@ MYSQLLIBS = $(MYSQLPREFIX)/lib/libmysqlclient.a CFLAGS = -g -Wall -Werror $(MYSQLINCS) $(ERLINCS) LDFLAGS = $(MYSQLLIBS) $(ERLLIBS) -PRIVDIR = ../priv +BINDIR = ../priv/bin -BINS = $(PRIVDIR)/mysqlerl +BINS = $(BINDIR)/mysqlerl OBJS = io.o log.o msg.o mysqlerl.o all: $(BINS) @@ -22,8 +22,8 @@ all: $(BINS) clean: rm -rf *.o $(BINS) -$(PRIVDIR)/mysqlerl: $(PRIVDIR) $(OBJS) +$(BINDIR)/mysqlerl: $(BINDIR) $(OBJS) $(CC) -o $@ $(OBJS) $(LDFLAGS) -$(PRIVDIR): - mkdir -p $(PRIVDIR) +$(BINDIR): + mkdir -p $(BINDIR) diff --git a/src/mysqlerl_connection.erl b/src/mysqlerl_connection.erl index aa49c7e..362b807 100644 --- a/src/mysqlerl_connection.erl +++ b/src/mysqlerl_connection.erl @@ -60,7 +60,7 @@ helper() -> PrivDir when is_list(PrivDir) -> ok; {error, bad_name} -> PrivDir = filename:join(["..", "priv"]) end, - filename:join([PrivDir, "mysqlerl"]). + filename:nativename(filename:join([PrivDir, "bin", "mysqlerl"])). port_ref(Sup) -> [{mysqlerl_port, Ref, worker, _}] = supervisor:which_children(Sup), |