#CC=gcc
BBMAP_CPPFLAGS=-I"$(JAVA_HOME)/include" -I"$(JAVA_HOME)/include/linux"
BBMAP_CFLAGS=-O3 -Wall -std=c99 -fPIC
BBMAP_LDFLAGS=-O3 -Wall -std=c99 -fPIC -shared
OBJ=BandedAlignerJNI.o MultiStateAligner11tsJNI.o BBMergeOverlapper.o

%.o: %.c
	$(CC) $(BBMAP_CPPFLAGS) $(CPPFLAGS) $(BBMAP_CFLAGS) $(CFLAGS) -c -o $@ $<

libbbtoolsjni.so: $(OBJ)
	$(CC) -o $@ $^ $(BBMAP_LDFLAGS) $(LDFLAGS)

.PHONY: clean

clean:
	rm -f *.o *~ core libbbtoolsjni.so
