Permalink
Browse files

Merge pull request #4 from kaushiks/master

Makefile fixes
  • Loading branch information...
2 parents 0fe7ca1 + 89e703a commit 1f00f90e2e02c5227f54b81a6a50488264ab1638 @mariusae mariusae committed Feb 1, 2013
Showing with 6 additions and 5 deletions.
  1. +6 −5 Makefile
View
11 Makefile
@@ -2,21 +2,22 @@ CC=gcc
OS=$(shell uname -s | tr '[A-Z]' '[a-z]')
ifeq ("$(OS)", "darwin")
-JAVA_HOME=$(shell /usr/libexec/java_home)
-JAVA_HEADERS=/System/Library/Frameworks/JavaVM.framework/Versions/A/Headers
-#JAVA_HEADERS=/Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Headers/
+JAVA_HOME?=$(shell /usr/libexec/java_home)
+JAVA_HEADERS?=/System/Library/Frameworks/JavaVM.framework/Versions/A/Headers
+#JAVA_HEADERS?=/Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Headers/
+PLATFORM_LDFLAGS=-mimpure-text
endif
ifeq ("$(OS)", "linux")
-JAVA_HOME=/usr/java/default/
+JAVA_HOME?=/usr/java/default/
JAVA_HEADERS=$(JAVA_HOME)/include -I$(JAVA_HOME)/include/linux
endif
CFLAGS=-Ijava_crw_demo -fno-strict-aliasing \
-fPIC -fno-omit-frame-pointer -W -Wall -Wno-unused -Wno-parentheses \
-I$(JAVA_HEADERS) -Iinclude
LDFLAGS=-fno-strict-aliasing -fPIC -fno-omit-frame-pointer \
- -static-libgcc -mimpure-text -shared
+ -static-libgcc -shared $(PLATFORM_LDFLAGS)
all: libgcprof.jnilib GcProf.class

0 comments on commit 1f00f90

Please sign in to comment.