mirror of
https://github.com/chhylp123/hifiasm.git
synced 2026-10-10 06:00:56 +08:00
Merge pull request #1 from lh3/new-mak
New makefile; fixed a compiling error
This commit is contained in:
@@ -1,18 +1,54 @@
|
|||||||
CC=g++
|
CXX= g++
|
||||||
|
CXXFLAGS= -g -O3 -msse4.2 -mpopcnt -fomit-frame-pointer -Winline -Wall
|
||||||
|
CPPFLAGS=
|
||||||
|
INCLUDES=
|
||||||
|
OBJS= Output.o CommandLines.o Process_Read.o Assembly.o kmer.o Hash_Table.o \
|
||||||
|
POA.o Correct.o Levenshtein_distance.o edlib.o Overlaps.o
|
||||||
|
EXE= ccs_assembly
|
||||||
|
LIBS= -lz -lpthread -lm
|
||||||
|
|
||||||
CFLAGS = -w -c -msse4.2 -mpopcnt -fomit-frame-pointer -Winline -O3 -lz
|
ifneq ($(asan),)
|
||||||
LDFLAGS = -lm -lz -lpthread -O3 -mpopcnt -msse4.2 -lz -w
|
CXXFLAGS+=-fsanitize=address
|
||||||
|
LIBS+=-fsanitize=address
|
||||||
|
endif
|
||||||
|
|
||||||
SOURCES = main.cpp Output.cpp CommandLines.cpp Process_Read.cpp Assembly.cpp kmer.cpp Hash_Table.cpp POA.cpp Correct.cpp Levenshtein_distance.cpp edlib.cpp Overlaps.cpp
|
.SUFFIXES:.cpp .o
|
||||||
OBJECTS = $(SOURCES:.c=.o)
|
.PHONY:all clean depend
|
||||||
EXECUTABLE = ccs_assembly
|
|
||||||
|
|
||||||
|
.cpp.o:
|
||||||
|
$(CXX) -c $(CXXFLAGS) $(CPPFLAGS) $(INCLUDES) $< -o $@
|
||||||
|
|
||||||
all: $(SOURCES) $(EXECUTABLE)
|
all:$(EXE)
|
||||||
$(EXECUTABLE): $(OBJECTS)
|
|
||||||
$(CC) $(OBJECTS) -o $@ $(LDFLAGS)
|
$(EXE):$(OBJS) main.o
|
||||||
|
$(CXX) $(CXXFLAGS) $^ -o $@ $(LIBS)
|
||||||
|
|
||||||
.c.o:
|
|
||||||
$(CC) $(CFLAGS) $< -o $@
|
|
||||||
clean:
|
clean:
|
||||||
rm -f *.o *~ \#* ccs_assembly
|
rm -fr gmon.out *.o a.out $(EXE) *~ *.a *.dSYM
|
||||||
|
|
||||||
|
depend:
|
||||||
|
(LC_ALL=C; export LC_ALL; makedepend -Y -- $(CPPFLAGS) $(DFLAGS) -- *.cpp)
|
||||||
|
|
||||||
|
# DO NOT DELETE
|
||||||
|
|
||||||
|
Assembly.o: Assembly.h Process_Read.h kseq.h Overlaps.h kvec.h kdq.h
|
||||||
|
Assembly.o: CommandLines.h kmer.h Hash_Table.h khash.h POA.h Correct.h
|
||||||
|
Assembly.o: Levenshtein_distance.h Output.h
|
||||||
|
CommandLines.o: CommandLines.h ketopt.h
|
||||||
|
Correct.o: Correct.h Hash_Table.h khash.h kmer.h Process_Read.h kseq.h
|
||||||
|
Correct.o: Overlaps.h kvec.h kdq.h CommandLines.h Levenshtein_distance.h
|
||||||
|
Correct.o: POA.h edlib.h Assembly.h
|
||||||
|
Hash_Table.o: Hash_Table.h khash.h kmer.h Process_Read.h kseq.h Overlaps.h
|
||||||
|
Hash_Table.o: kvec.h kdq.h CommandLines.h Correct.h Levenshtein_distance.h
|
||||||
|
Hash_Table.o: POA.h ksort.h
|
||||||
|
Levenshtein_distance.o: Levenshtein_distance.h
|
||||||
|
Output.o: Output.h CommandLines.h
|
||||||
|
Overlaps.o: Overlaps.h kvec.h kdq.h ksort.h Process_Read.h kseq.h
|
||||||
|
Overlaps.o: CommandLines.h
|
||||||
|
POA.o: POA.h Hash_Table.h khash.h kmer.h Process_Read.h kseq.h Overlaps.h
|
||||||
|
POA.o: kvec.h kdq.h CommandLines.h Correct.h Levenshtein_distance.h
|
||||||
|
Process_Read.o: Process_Read.h kseq.h Overlaps.h kvec.h kdq.h CommandLines.h
|
||||||
|
edlib.o: edlib.h
|
||||||
|
kmer.o: kmer.h Process_Read.h kseq.h Overlaps.h kvec.h kdq.h CommandLines.h
|
||||||
|
main.o: CommandLines.h Process_Read.h kseq.h Overlaps.h kvec.h kdq.h
|
||||||
|
main.o: Assembly.h Levenshtein_distance.h edlib.h
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
#define __STDC_LIMIT_MACROS
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include "Overlaps.h"
|
#include "Overlaps.h"
|
||||||
#include "ksort.h"
|
#include "ksort.h"
|
||||||
|
|||||||
@@ -37,6 +37,14 @@
|
|||||||
#define KS_SEP_LINE 2 // line separator: "\n" (Unix) or "\r\n" (Windows)
|
#define KS_SEP_LINE 2 // line separator: "\n" (Unix) or "\r\n" (Windows)
|
||||||
#define KS_SEP_MAX 2
|
#define KS_SEP_MAX 2
|
||||||
|
|
||||||
|
#ifndef klib_unused
|
||||||
|
#if (defined __clang__ && __clang_major__ >= 3) || (defined __GNUC__ && __GNUC__ >= 3)
|
||||||
|
#define klib_unused __attribute__ ((__unused__))
|
||||||
|
#else
|
||||||
|
#define klib_unused
|
||||||
|
#endif
|
||||||
|
#endif /* klib_unused */
|
||||||
|
|
||||||
#define __KS_TYPE(type_t) \
|
#define __KS_TYPE(type_t) \
|
||||||
typedef struct __kstream_t { \
|
typedef struct __kstream_t { \
|
||||||
unsigned char *buf; \
|
unsigned char *buf; \
|
||||||
@@ -65,7 +73,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
#define __KS_GETC(__read, __bufsize) \
|
#define __KS_GETC(__read, __bufsize) \
|
||||||
static inline int ks_getc(kstream_t *ks) \
|
static inline klib_unused int ks_getc(kstream_t *ks) \
|
||||||
{ \
|
{ \
|
||||||
if (ks_err(ks)) return -3; \
|
if (ks_err(ks)) return -3; \
|
||||||
if (ks->is_eof && ks->begin >= ks->end) return -1; \
|
if (ks->is_eof && ks->begin >= ks->end) return -1; \
|
||||||
@@ -231,7 +239,7 @@ typedef struct __kstring_t {
|
|||||||
__KSEQ_BASIC(SCOPE, type_t) \
|
__KSEQ_BASIC(SCOPE, type_t) \
|
||||||
__KSEQ_READ(SCOPE)
|
__KSEQ_READ(SCOPE)
|
||||||
|
|
||||||
#define KSEQ_INIT(type_t, __read) KSEQ_INIT2(static, type_t, __read)
|
#define KSEQ_INIT(type_t, __read) KSEQ_INIT2(static klib_unused, type_t, __read)
|
||||||
|
|
||||||
#define KSEQ_DECLARE(type_t) \
|
#define KSEQ_DECLARE(type_t) \
|
||||||
__KS_TYPE(type_t) \
|
__KS_TYPE(type_t) \
|
||||||
|
|||||||
Reference in New Issue
Block a user