Commit de4699b0 authored by Lukáš Marek's avatar Lukáš Marek

Mac OS and LLVM/clang fixes

parent 742cb4e7
......@@ -11,13 +11,17 @@ SOURCES=dislreagent.c
# Object files needed to create library
OBJECTS=$(SOURCES:%.c=%.o)
# Library name and options needed to build it
UNAME := $(shell uname)
ifeq ($(UNAME), Linux)
LIBRARY=lib$(LIBNAME).so
endif
ifeq ($(UNAME), Darwin)
JNI_OS=linux
else ifeq ($(UNAME), Darwin)
LIBRARY=lib$(LIBNAME).jnilib
JNI_OS=darwin
else
$(error error: unsupported operating system: $(UNAME))
endif
......@@ -31,7 +35,7 @@ COMMON_FLAGS+= -W -Wall -Wextra -O3 -Wno-unused-parameter -lpthread
CFLAGS += $(COMMON_FLAGS)
CFLAGS += -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/linux
CFLAGS += -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/$(JNI_OS)
# add debugging output
ifneq ($(DEBUG),)
......
......@@ -15,10 +15,10 @@
#include <endian.h>
#endif
// GCC has known bug where it does not work always correctly
#ifndef __STDC_IEC_559__
#error "Requires IEEE 754 floating point!"
#endif
// Disabled check to make it compile under OS X with clang/LLVM.
//#ifndef __STDC_IEC_559__
//#error "Requires IEEE 754 floating point!"
//#endif
#include "../src-agent-c/jvmtihelper.h"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment