Browse Source

plugin/c_src: remove C_SRC_OPTS

We can just LDFLAGS += and whatnot.
Slava Yurin 10 years ago
parent
commit
edb63def75
3 changed files with 5 additions and 9 deletions
  1. 1 3
      README.md
  2. 2 3
      erlang.mk
  3. 2 3
      plugins/c_src.mk

+ 1 - 3
README.md

@@ -278,9 +278,7 @@ You can override the temporary file containing information
 about Erlang's environment by setting the `C_SRC_ENV` variable.
 This file is automatically generated on first run.
 
-Finally you can add extra compiler options using the
-`C_SRC_OPTS` variable. You can also override the defaults
-`CC` and `CFLAGS` if required.
+You can also override the defaults `CC` and `CFLAGS` if required.
 
 Common_test plugin
 ------------------

+ 2 - 3
erlang.mk

@@ -585,7 +585,6 @@ list-templates:
 
 C_SRC_DIR = $(CURDIR)/c_src
 C_SRC_ENV ?= $(C_SRC_DIR)/env.mk
-C_SRC_OPTS ?=
 C_SRC_OUTPUT ?= $(CURDIR)/priv/$(PROJECT).so
 
 # System type and C compiler/flags.
@@ -636,8 +635,8 @@ else
 SOURCES := $(shell find $(C_SRC_DIR) -type f -regex ".*\.\(C\|cc?\|cpp\)")
 OBJECTS = $(addsuffix .o, $(basename $(SOURCES)))
 
-COMPILE_C = $(c_verbose) $(CC) $(CFLAGS) $(CPPFLAGS) $(C_SRC_OPTS) -c
-COMPILE_CPP = $(cpp_verbose) $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(C_SRC_OPTS) -c
+COMPILE_C = $(c_verbose) $(CC) $(CFLAGS) $(CPPFLAGS) -c
+COMPILE_CPP = $(cpp_verbose) $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c
 
 app:: $(C_SRC_ENV) $(C_SRC_OUTPUT)
 

+ 2 - 3
plugins/c_src.mk

@@ -8,7 +8,6 @@
 
 C_SRC_DIR = $(CURDIR)/c_src
 C_SRC_ENV ?= $(C_SRC_DIR)/env.mk
-C_SRC_OPTS ?=
 C_SRC_OUTPUT ?= $(CURDIR)/priv/$(PROJECT).so
 
 # System type and C compiler/flags.
@@ -59,8 +58,8 @@ else
 SOURCES := $(shell find $(C_SRC_DIR) -type f -regex ".*\.\(C\|cc?\|cpp\)")
 OBJECTS = $(addsuffix .o, $(basename $(SOURCES)))
 
-COMPILE_C = $(c_verbose) $(CC) $(CFLAGS) $(CPPFLAGS) $(C_SRC_OPTS) -c
-COMPILE_CPP = $(cpp_verbose) $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(C_SRC_OPTS) -c
+COMPILE_C = $(c_verbose) $(CC) $(CFLAGS) $(CPPFLAGS) -c
+COMPILE_CPP = $(cpp_verbose) $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c
 
 app:: $(C_SRC_ENV) $(C_SRC_OUTPUT)