Skip to content

Commit

Permalink
Merge pull request #58 from dvanliere/master
Browse files Browse the repository at this point in the history
Two minor fixes to improve bash scripts on OSX.
  • Loading branch information
edenhill committed Jan 9, 2014
2 parents 80a9d7a + 975caa0 commit 9c9c8b0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
9 changes: 5 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

LIBNAME=librdkafka
LIBVER=1

Expand Down Expand Up @@ -30,7 +29,9 @@ CFLAGS+=-DSG
#LDFLAGS += -pg

LDFLAGS+= -g
ifneq ($(shell uname -o),Cygwin)
UNAME_S := $(shell uname -s)
CYGWIN := $(UNAME 1 6)
ifneq ($(CYGWIN), CYGWIN)
LDFLAGS+=-fPIC
CFLAGS+=-fPIC
endif
Expand All @@ -46,12 +47,12 @@ libs: $(LIBNAME).so.$(LIBVER) $(LIBNAME).a CONFIGURATION.md


$(LIBNAME).so.$(LIBVER): $(OBJS)
@(if [ "`uname -s`" = "Linux" -o "`uname -o`" = "Cygwin" ]; then \
@(if [ $(UNAME_S) = "Linux" -o $(CYGWIN) = CYGWIN ]; then \
$(CC) $(LDFLAGS) \
-shared -Wl,-soname,$@ \
-Wl,--version-script=librdkafka.lds \
$(OBJS) -o $@ -lpthread -lrt -lz -lc ; \
elif [ "`uname -s`" = "Darwin" ]; then \
elif [ $(UNAME_S) = "Darwin" ]; then \
$(CC) $(LDFLAGS) \
$(OBJS) -dynamiclib -o $@ -lpthread -lz -lc ; \
fi)
Expand Down
8 changes: 4 additions & 4 deletions tests/run-test.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#!/bin/bash
#

RED='\e[31m'
GREEN='\e[32m'
CYAN='\e[36m'
CCLR='\e[0m'
RED='\033[31m'
GREEN='\033[32m'
CYAN='\033[36m'
CCLR='\033[0m'

if [ -z "$1" ]; then
echo "Usage: $0 <00xx-...test> [modes..]"
Expand Down

0 comments on commit 9c9c8b0

Please sign in to comment.