aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2014-11-25 00:49:39 +0200
committerLoïc Hoguin <[email protected]>2014-11-25 00:49:39 +0200
commit78df4508a2e43ddc1676e27dd2f8267ccae3f9d6 (patch)
treeeecbe2376186d60a9bf702b8a105a2782bb74e81
parent18b73d5212d7dd88ff68ce845389be07921b6346 (diff)
parentdb19cffe3deedaebfd1bd1de824dcd3d8bd7b144 (diff)
downloaderlang.mk-78df4508a2e43ddc1676e27dd2f8267ccae3f9d6.tar.gz
erlang.mk-78df4508a2e43ddc1676e27dd2f8267ccae3f9d6.tar.bz2
erlang.mk-78df4508a2e43ddc1676e27dd2f8267ccae3f9d6.zip
Merge branch 'jj1bdx-c_src-find-fix' of git://github.com/jj1bdx/erlang.mk
-rw-r--r--erlang.mk7
-rw-r--r--plugins/c_src.mk7
2 files changed, 8 insertions, 6 deletions
diff --git a/erlang.mk b/erlang.mk
index 8226e30..df98cc1 100644
--- a/erlang.mk
+++ b/erlang.mk
@@ -592,8 +592,9 @@ C_SRC_OUTPUT ?= $(CURDIR)/priv/$(PROJECT).so
UNAME_SYS := $(shell uname -s)
ifeq ($(UNAME_SYS), Darwin)
CC ?= cc
- CFLAGS ?= -O3 -std=c99 -arch x86_64 -flat_namespace -undefined suppress -finline-functions -Wall -Wmissing-prototypes
- CXXFLAGS ?= -O3 -arch x86_64 -flat_namespace -undefined suppress -finline-functions -Wall
+ CFLAGS ?= -O3 -std=c99 -arch x86_64 -finline-functions -Wall -Wmissing-prototypes
+ CXXFLAGS ?= -O3 -arch x86_64 -finline-functions -Wall
+ LDFLAGS ?= -arch x86_64 -flat_namespace -undefined suppress
else ifeq ($(UNAME_SYS), FreeBSD)
CC ?= cc
CFLAGS ?= -O3 -std=c99 -finline-functions -Wall -Wmissing-prototypes
@@ -632,7 +633,7 @@ clean::
$(MAKE) -C $(C_SRC_DIR) clean
else
-SOURCES := $(shell find $(C_SRC_DIR) -type f -regex ".*\.\(C\|cc?\|cpp\)")
+SOURCES := $(shell find $(C_SRC_DIR) -type f \( -name "*.c" -o -name "*.C" -o -name "*.cc" -o -name "*.cpp" \))
OBJECTS = $(addsuffix .o, $(basename $(SOURCES)))
COMPILE_C = $(c_verbose) $(CC) $(CFLAGS) $(CPPFLAGS) -c
diff --git a/plugins/c_src.mk b/plugins/c_src.mk
index 734f13a..7c1fd2e 100644
--- a/plugins/c_src.mk
+++ b/plugins/c_src.mk
@@ -15,8 +15,9 @@ C_SRC_OUTPUT ?= $(CURDIR)/priv/$(PROJECT).so
UNAME_SYS := $(shell uname -s)
ifeq ($(UNAME_SYS), Darwin)
CC ?= cc
- CFLAGS ?= -O3 -std=c99 -arch x86_64 -flat_namespace -undefined suppress -finline-functions -Wall -Wmissing-prototypes
- CXXFLAGS ?= -O3 -arch x86_64 -flat_namespace -undefined suppress -finline-functions -Wall
+ CFLAGS ?= -O3 -std=c99 -arch x86_64 -finline-functions -Wall -Wmissing-prototypes
+ CXXFLAGS ?= -O3 -arch x86_64 -finline-functions -Wall
+ LDFLAGS ?= -arch x86_64 -flat_namespace -undefined suppress
else ifeq ($(UNAME_SYS), FreeBSD)
CC ?= cc
CFLAGS ?= -O3 -std=c99 -finline-functions -Wall -Wmissing-prototypes
@@ -55,7 +56,7 @@ clean::
$(MAKE) -C $(C_SRC_DIR) clean
else
-SOURCES := $(shell find $(C_SRC_DIR) -type f -regex ".*\.\(C\|cc?\|cpp\)")
+SOURCES := $(shell find $(C_SRC_DIR) -type f \( -name "*.c" -o -name "*.C" -o -name "*.cc" -o -name "*.cpp" \))
OBJECTS = $(addsuffix .o, $(basename $(SOURCES)))
COMPILE_C = $(c_verbose) $(CC) $(CFLAGS) $(CPPFLAGS) -c