12 ifeq ($(ARCH
), aarch64
)
18 ifeq ($(ARCH
), ppc64le
)
31 SLIBJVMTI
=libjvmti.so.
$(VERSION
).
$(REVISION
).
$(AGE
)
32 VLIBJVMTI
=libjvmti.so.
$(VERSION
)
33 SLDFLAGS
=-shared
-Wl
,-soname
-Wl
,$(VLIBJVMTI
)
36 # The following works at least on fedora 23, you may need the next
37 # line for other distros.
38 ifeq (,$(wildcard /usr
/sbin
/update-java-alternatives
))
39 JDIR
=$(shell alternatives
--display java | tail
-1 | cut
-d
' ' -f
5 | sed
's%/jre/bin/java.%%g')
41 JDIR
=$(shell /usr
/sbin
/update-java-alternatives
-l | head
-1 | cut
-d
' ' -f
3)
44 # -lrt required in 32-bit mode for clock_gettime()
46 INCDIR
=-I
$(JDIR
)/include -I
$(JDIR
)/include/linux
50 SRCS
=libjvmti.c jvmti_agent.c
53 OPT
=-O2
-g
-Werror
-Wall
55 CFLAGS
=$(INCDIR
) $(OPT
)
60 $(CC
) $(CFLAGS
) -c
$*.c
62 $(CC
) -fPIC
-DPIC
$(CFLAGS
) -c
$*.c
-o
$*.lo
64 $(OBJS
) $(SOBJS
): Makefile jvmti_agent.h ..
/util
/jitdump.h
66 $(SLIBJVMTI
): $(SOBJS
)
67 $(CC
) $(CFLAGS
) $(SLDFLAGS
) -o
$@
$(SOBJS
) $(LIBS
)
68 $(LN
) $@ libjvmti.
$(SOLIBEXT
)
71 $(RM
) -f
*.o
*.so.
* *.so
*.lo
74 -mkdir
-p
$(DESTDIR
)/lib
75 install -m
755 $(SLIBJVMTI
) $(DESTDIR
)/lib
/
76 (cd
$(DESTDIR
)/lib
; $(LN
) $(SLIBJVMTI
) $(VLIBJVMTI
))
77 (cd
$(DESTDIR
)/lib
; $(LN
) $(SLIBJVMTI
) libjvmti.
$(SOLIBEXT
))
80 .SUFFIXES
: .c .S .o .lo