I have the following makefile (for c++)
LDLIBS=$(shell root-config --libs)
INCLUDE= -I/Library/Java/JavaVirtualMachines/jdk1.8.0_51.jdk/Contents/Home/include \
-I/Library/Java/JavaVirtualMachines/jdk1.8.0_51.jdk/Contents/Home/include/darwin \
foo: foo.o
$(CXX) -shared -fPIC $(LDLIBS) $(INCLUDE) -o foo.o foo.cpp
foo.cpp has the following includes
#include <jvmti.h>
If I run the "g++ -shared -fPIC -I..."
command manually, it'll produce the foo.o
as expected.
But when I run make
, I'll get this error
$ make
c++ -c -o foo.o foo.cpp
lib_track_npe.cpp:1:10: fatal error: 'jvmti.h' file not found
#include <jvmti.h>
^
1 error generated.
make: *** [foo.o] Error 1
Could someone please tell me what I did wrong in the makefile?
Thanks