Skip to content

Commit

Permalink
Merge pull request #19 from esl/feature/fix-cflags
Browse files Browse the repository at this point in the history
use and append existing compile flags
  • Loading branch information
deadtrickster authored Sep 9, 2019
2 parents 1a6ee7b + 53325de commit b852fdc
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 9 deletions.
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ install: 'true'
otp_release:
- 20.0
- 19.0
- 18.0
addons:
apt:
packages:
Expand Down
12 changes: 6 additions & 6 deletions c_src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,18 @@ MEMTEST_OUTPUT ?= $(CURDIR)/../_build/memory_test
UNAME_SYS := $(shell uname -s)
ifeq ($(UNAME_SYS), Darwin)
CXX ?= c++
CXXFLAGS ?= -O3 -arch x86_64 -finline-functions
LDFLAGS ?= -arch x86_64 -flat_namespace -undefined suppress
CXXFLAGS += -O3 -arch x86_64 -finline-functions
LDFLAGS += -arch x86_64 -flat_namespace -undefined suppress
PSOURCES = prometheus_process_info_macos.cc
else ifeq ($(UNAME_SYS), FreeBSD)
CXX ?= c++
CXXEFLAGS ?= -D__STANDALONE_TEST__ -std=c++11 -Wall
CXXFLAGS ?= -O3 -finline-functions
CXXEFLAGS += -D__STANDALONE_TEST__ -std=c++11 -Wall
CXXFLAGS += -O3 -finline-functions
PSOURCES = prometheus_process_info_freebsd.cc
else ifeq ($(UNAME_SYS), Linux)
CXX ?= g++
CXXEFLAGS ?= -D__STANDALONE_TEST__ -std=c++11 -Wall
CXXFLAGS ?= -O3 -finline-functions
CXXEFLAGS += -D__STANDALONE_TEST__ -std=c++11 -Wall
CXXFLAGS += -O3 -finline-functions
PSOURCES = prometheus_process_info_linux.cc
endif

Expand Down
5 changes: 3 additions & 2 deletions mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ defmodule PrometheusProcessCollector.Mixfile do
app: :prometheus_process_collector,
version: "1.4.3",
compilers: [:elixir_make] ++ Mix.compilers(),
# make_cwd: "c_src",
make_cwd: "c_src",
description: description(),
package: package(),
deps: deps()
Expand Down Expand Up @@ -49,7 +49,8 @@ defmodule PrometheusProcessCollector.Mixfile do

defp deps do
[
{:prometheus, "~> 4.0"}
{:prometheus, "~> 4.0"},
{:elixir_make, "~> 0.6", runtime: false}
]
end
end
1 change: 1 addition & 0 deletions mix.lock
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
%{
"elixir_make": {:hex, :elixir_make, "0.6.0", "38349f3e29aff4864352084fc736fa7fa0f2995a819a737554f7ebd28b85aaab", [:mix], [], "hexpm"},
"prometheus": {:hex, :prometheus, "4.2.2", "a830e77b79dc6d28183f4db050a7cac926a6c58f1872f9ef94a35cd989aceef8", [:mix, :rebar3], [], "hexpm"},
}

0 comments on commit b852fdc

Please sign in to comment.