Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable compilation on aarch64 Linux #924

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions Makefile.simde
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,18 @@ PROG_EXTRA= sdust minimap2-lite
LIBS= -lm -lz -lpthread



ifneq ($(arm_neon),) # if arm_neon is defined
SSE2_CFLAG= -D__SSE2__
SSE4_1_CFLAG= $(SSE2_CFLAG) -D__SSE4_1__
ifeq ($(aarch64),) #if aarch64 is not defined
CFLAGS+=-D_FILE_OFFSET_BITS=64 -mfpu=neon -fsigned-char
else #if aarch64 is defined
CFLAGS+=-D_FILE_OFFSET_BITS=64 -fsigned-char
endif
else
SSE2_CFLAG= -msse2
SSE4_1_CFLAG= -msse4.1
endif

ifneq ($(asan),)
Expand Down Expand Up @@ -49,16 +55,16 @@ sdust:sdust.c kalloc.o kalloc.h kdq.h kvec.h kseq.h ketopt.h sdust.h
$(CC) -D_SDUST_MAIN $(CFLAGS) $< kalloc.o -o $@ -lz

ksw2_ll_simde.o:ksw2_ll_sse.c ksw2.h kalloc.h
$(CC) -c $(CFLAGS) -msse2 $(CPPFLAGS) $(INCLUDES) $< -o $@
$(CC) -c $(CFLAGS) $(SSE2_CFLAG) $(CPPFLAGS) $(INCLUDES) $< -o $@

ksw2_extz2_simde.o:ksw2_extz2_sse.c ksw2.h kalloc.h
$(CC) -c $(CFLAGS) -msse4.1 $(CPPFLAGS) $(INCLUDES) $< -o $@
$(CC) -c $(CFLAGS) $(SSE4_1_CFLAG) $(CPPFLAGS) $(INCLUDES) $< -o $@

ksw2_extd2_simde.o:ksw2_extd2_sse.c ksw2.h kalloc.h
$(CC) -c $(CFLAGS) -msse4.1 $(CPPFLAGS) $(INCLUDES) $< -o $@
$(CC) -c $(CFLAGS) $(SSE4_1_CFLAG) $(CPPFLAGS) $(INCLUDES) $< -o $@

ksw2_exts2_simde.o:ksw2_exts2_sse.c ksw2.h kalloc.h
$(CC) -c $(CFLAGS) -msse4.1 $(CPPFLAGS) $(INCLUDES) $< -o $@
$(CC) -c $(CFLAGS) $(SSE4_1_CFLAG) $(CPPFLAGS) $(INCLUDES) $< -o $@

# other non-file targets

Expand Down