Debian Codegraph @

src/main/c/Makefile

raw ◀ ▶
Source reconstructed at patch state 1 of 2 — not the installed (fully patched) source.
2 Debian patches touch this file
1 ifeq ($(JAVA_HOME),)
2 $(error $$(JAVA_HOME) is not defined)
3 endif
4
5 JNI_INCLUDE_DIRS=$(addprefix -I,$(shell find $(JAVA_HOME)/include -type d))
6 CFLAGS=-ggdb -O2 -Wall -fPIC $(JNI_INCLUDE_DIRS)
7 CC=gcc
8
9 #OS-dependent extension lookup
10 LIB_EXT=so
11
12 JNI_BASE_NAME=org_broadinstitute_hellbender_utils_bwa_BwaMemIndex
13
14 all: libbwa.$(LIB_EXT)
15
16 libbwa.$(LIB_EXT): $(JNI_BASE_NAME).o jnibwa.o bwaComponent/libbwa.a
17 $(CC) -ggdb -dynamiclib -shared -o $@ $^ -lm -lz -lpthread
18
19 bwaComponent:
20 sed -i.bak -e's/\(LOBJS=.*\)/\1 bwtindex.o rle.o rope.o bwt.o is.o/g' bwaComponent/Makefile
21
22 bwaComponent/libbwa.a: bwaComponent
23 $(MAKE) CFLAGS="$(CFLAGS)" -C bwaComponent libbwa.a
24
25 $(JNI_BASE_NAME).o: $(JNI_BASE_NAME).c jnibwa.h bwaComponent
26
27 jnibwa.o: jnibwa.c jnibwa.h bwaComponent
28
29 clean:
30 rm -rf bwaComponent *.o *.$(LIB_EXT)
31
32 .PHONY: all clean