ports/java/lightweight-java-profiler/files/patch-Makefile
Johannes M Dieterich a77376a1fe new port: java/lightweight-java-profiler
A port of the lightweight-java-profiler (ljp). ljp acts as a bare-bones agentlib to produce profiling stacks that can be digested, e.g., by Brendan Gregg's flamegraph scripts.

Reviewed by:	mat, swills (mentor)
Approved by:	swills (mentor)
Differential Revision:	https://reviews.freebsd.org/D10194
2017-04-01 17:58:59 +00:00

41 lines
1.3 KiB
Text

--- Makefile.orig 2017-03-31 01:58:22 UTC
+++ Makefile
@@ -1,7 +1,7 @@
-SHELL:=/bin/bash
+SHELL:=/usr/bin/env bash
UNAME:=$(shell uname | tr '[A-Z]' '[a-z]')
-BITS?=32
+#BITS?=32
ifeq ($(UNAME), darwin)
READLINK_ARGS:=""
PLATFORM_WARNINGS:=-Weverything -Wno-c++98-compat-pedantic -Wno-padded \
@@ -23,6 +23,13 @@ else ifeq ($(UNAME), linux)
HEADERS:=include
CC=g++
LDFLAGS=-Wl,--fatal-warnings
+else ifeq ($(UNAME), freebsd)
+ READLINK_ARGS:=""
+ PLATFORM_WARNINGS:=-Weverything -Wno-c++98-compat-pedantic -Wno-padded \
+ -Wno-missing-prototypes
+ PLATFORM_COPTS:=-std=c++11
+ HEADERS:=include
+ LDFLAGS=-Wl,-fatal_warnings
endif
JAVA_HOME := $(shell \
@@ -32,11 +39,11 @@ JAVA_HOME := $(shell \
[[ -n "$${JAVA_HOME}" ]] || (echo "Cannot find JAVA_HOME" && exit) ; \
echo $${JAVA_HOME})
AGENT=liblagent.so
-LIBS=-ldl
-BUILD_DIR ?= $(shell mkdir build-$(BITS) 2> /dev/null ; echo build-$(BITS))
+LIBS=-lc
+BUILD_DIR ?= $(shell mkdir build 2> /dev/null ; echo build)
SRC_DIR:=${PWD}/src
OPT?=-O2
-GLOBAL_WARNINGS=-Wall -Werror -Wformat-security -Wno-char-subscripts \
+GLOBAL_WARNINGS=-Wall -Wformat-security -Wno-char-subscripts \
-Wno-sign-compare -Wno-strict-overflow -Wwrite-strings -Wnon-virtual-dtor \
-Woverloaded-virtual
GLOBAL_COPTS=-fdiagnostics-show-option -fno-exceptions \