summaryrefslogtreecommitdiff
path: root/priv
diff options
context:
space:
mode:
Diffstat (limited to 'priv')
-rw-r--r--priv/templates/Makefile.dtl34
1 files changed, 17 insertions, 17 deletions
diff --git a/priv/templates/Makefile.dtl b/priv/templates/Makefile.dtl
index e168f6c..d3c3767 100644
--- a/priv/templates/Makefile.dtl
+++ b/priv/templates/Makefile.dtl
@@ -17,18 +17,18 @@ 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 -finline-functions -Wall -Wmissing-prototypes
- CXXFLAGS ?= -O3 -arch x86_64 -finline-functions -Wall
- LDFLAGS ?= -arch x86_64 -flat_namespace -undefined suppress
+ CC ?= cc
+ 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
- CXXFLAGS ?= -O3 -finline-functions -Wall
+ CC ?= cc
+ CFLAGS ?= -O3 -std=c99 -finline-functions -Wall -Wmissing-prototypes
+ CXXFLAGS ?= -O3 -finline-functions -Wall
else ifeq ($(UNAME_SYS), Linux)
- CC ?= gcc
- CFLAGS ?= -O3 -std=c99 -finline-functions -Wall -Wmissing-prototypes
- CXXFLAGS ?= -O3 -finline-functions -Wall
+ CC ?= gcc
+ CFLAGS ?= -O3 -std=c99 -finline-functions -Wall -Wmissing-prototypes
+ CXXFLAGS ?= -O3 -finline-functions -Wall
endif
CFLAGS += -fPIC -I $(ERTS_INCLUDE_DIR) -I $(ERL_INTERFACE_INCLUDE_DIR)
@@ -55,20 +55,20 @@ COMPILE_C = $(c_verbose) $(CC) $(CFLAGS) $(CPPFLAGS) -c
COMPILE_CPP = $(cpp_verbose) $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c
$(C_SRC_OUTPUT): $(OBJECTS)
- @mkdir -p $(BASEDIR)/priv/
- $(link_verbose) $(CC) $(OBJECTS) $(LDFLAGS) $(LDLIBS) -o $(C_SRC_OUTPUT)
+ @mkdir -p $(BASEDIR)/priv/
+ $(link_verbose) $(CC) $(OBJECTS) $(LDFLAGS) $(LDLIBS) -o $(C_SRC_OUTPUT)
%.o: %.c
- $(COMPILE_C) $(OUTPUT_OPTION) $<
+ $(COMPILE_C) $(OUTPUT_OPTION) $<
%.o: %.cc
- $(COMPILE_CPP) $(OUTPUT_OPTION) $<
+ $(COMPILE_CPP) $(OUTPUT_OPTION) $<
%.o: %.C
- $(COMPILE_CPP) $(OUTPUT_OPTION) $<
+ $(COMPILE_CPP) $(OUTPUT_OPTION) $<
%.o: %.cpp
- $(COMPILE_CPP) $(OUTPUT_OPTION) $<
+ $(COMPILE_CPP) $(OUTPUT_OPTION) $<
clean:
- @rm $(C_SRC_OUTPUT) $(OBJECTS)
+ @rm -f $(C_SRC_OUTPUT) $(OBJECTS)