Debian Codegraph @

src/main/c/Makefile

raw symbols ◀ ▶
Source reconstructed at patch state 1 of 3 — not the installed (fully patched) source.
3 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=-g -O2 -Wall -fPIC $(JNI_INCLUDE_DIRS)
7 CC=gcc
8
9 #OS-dependent extension lookup
10 UNAME := $(shell uname)
11 ifeq ($(UNAME),Darwin)
12 LIB_EXT=Darwin.dylib
13 else
14 LIB_EXT=Linux.so
15 endif
16
17 FERMI_LITE_COMMIT=562638112b7992f4d7a243ccd9ab2b3bd08c6b08
18 JNI_BASE_NAME=org_broadinstitute_hellbender_utils_fermi_FermiLiteAssembler
19
20 all: libfml.$(LIB_EXT)
21
22 libfml.$(LIB_EXT): $(JNI_BASE_NAME).o fermi-lite/libfml.a
23 $(CC) -dynamiclib -shared -o $@ $^ -lm -lz -lpthread
24
25 fermi-lite:
26 git clone https://github.com/lh3/fermi-lite && cd fermi-lite && git checkout $(FERMI_LITE_COMMIT) && echo '#define FML_COMMIT "'$(FERMI_LITE_COMMIT)'"' > fml_commit.h
27
28 fermi-lite/libfml.a: fermi-lite
29 $(MAKE) CFLAGS="$(CFLAGS)" -C fermi-lite libfml.a
30
31 $(JNI_BASE_NAME).o: $(JNI_BASE_NAME).c fermi-lite/libfml.a
32
33 test: test.o fermi-lite/libfml.a
34 $(CC) -o $@ $^ -lm -lz -lpthread
35
36 clean:
37 rm -rf fermi-lite *.o *.$(LIB_EXT)
38
39 .PHONY: all clean