Browse code

fix Makefile for new embedded samtools source

Michael Lawrence authored on 01/03/2019 19:37:40
Showing1 changed files

... ...
@@ -27,7 +27,6 @@ DFLAGS = -D_USE_KNETFILE -D_FILE_OFFSET_BITS=64 \
27 27
   -Dabort=_samtools_abort
28 28
 
29 29
 PKG_CPPFLAGS += -I$(INCLUDE_DIR)
30
-PKG_CFLAGS += -g -O3 $(DFLAGS)
31 30
 PKG_LIBS += $(GSTRUCT_LIB) $(SAMTOOLS_LIB) -lz
32 31
 
33 32
 SHLIB = gmapR.so
... ...
@@ -39,6 +38,9 @@ $(SHLIB): $(OBJECTS) $(GSTRUCT_LIB)
39 38
 
40 39
 $(OBJECTS): $(GSTRUCT_INCLUDE_DIR) $(OBJECTS:%.o=%.c)
41 40
 
41
+samtools/%.o: samtools/%.c
42
+	$(CC) $(ALL_CPPFLAGS) $(ALL_CFLAGS) $(DFLAGS) -c $< -o $@
43
+
42 44
 $(GSTRUCT_LIB) $(GSTRUCT_INCLUDE_DIR): gstruct
43 45
 
44 46
 $(SAMTOOLS_LIB): $(BAMOBJ)
... ...
@@ -69,6 +71,5 @@ clean:
69 71
 	for dir in $(SUBDIRS); do \
70 72
 	  $(MAKE) -C $$dir distclean; \
71 73
 	done
72
-	rm -rf samtools $(PREFIX)
73 74
 	rm -f *.o *.so *.dll
74 75