2 Commits

Author SHA1 Message Date
b11748eac8 Cleaner installation 2019-03-27 16:07:12 +01:00
ed56cb1d6b Now compiling in one single library 2019-03-27 09:00:48 +01:00
11 changed files with 56 additions and 118 deletions

56
Makefile Executable file
View File

@ -0,0 +1,56 @@
PREFIX=/usr/local
SOURCES = libfasta/fasta_header_parser.c \
libfasta/fasta_seq_writer.c \
libfasta/fasta_header_handler.c \
libfasta/header_mem_handler.c \
libfasta/sequence.c \
libfile/fileHandling.c \
liblcs/sse_banded_LCS_alignment.c \
liblcs/upperband.c \
libutils/utilities.c \
libutils/debug.c
SRCS=$(SOURCES)
OBJECTS= $(patsubst %.c,%.o,$(SOURCES))
LIBFILE = libsuma.a
RANLIB = ranlib
CC=gcc
LDFLAGS=
CFLAGS = -O3 -w
default: all
all: $(LIBFILE)
%.o: %.c
$(CC) $(CFLAGS) -c -o $@ $< $(LIB)
libfasta/fasta_header_parser.c: libfasta/fasta_header_parser.l
flex -Pheader_yy -t $< > $@
libfasta/dic_parser.c: libfasta/dic_parser.l
lex -Phashtable_yy -t $< > $@
clean:
rm -rf $(OBJECTS) $(LIBFILE)
$(LIBFILE): $(OBJECTS)
ar -cr $@ $?
$(RANLIB) $@
install: all
install -d $(DESTDIR)$(PREFIX)/lib/
install -m 644 $(LIBFILE) $(DESTDIR)$(PREFIX)/lib/
install -d $(DESTDIR)$(PREFIX)/include/
for lib in libfasta liblcs libsse libutils libfile ; do \
install -d $(DESTDIR)$(PREFIX)/include/$$lib ; \
cp $$lib/*.h $(DESTDIR)$(PREFIX)/include/$$lib ; \
done

View File

@ -1,10 +0,0 @@
CC=gcc
LDFLAGS=
CFLAGS = -O3 -w
default: all
%.o: %.c
$(CC) $(CFLAGS) -c -o $@ $< $(LIB)

BIN
libfasta/.DS_Store vendored

Binary file not shown.

View File

@ -1,33 +0,0 @@
SOURCES = fasta_header_parser.c \
fasta_seq_writer.c \
fasta_header_handler.c \
header_mem_handler.c \
sequence.c
SRCS=$(SOURCES)
OBJECTS= $(patsubst %.c,%.o,$(SOURCES))
LIBFILE = libfasta.a
RANLIB = ranlib
include ../global.mk
all: $(LIBFILE)
fasta_header_parser.c: fasta_header_parser.l
flex -Pheader_yy -t $< > $@
dic_parser.c: dic_parser.l
lex -Phashtable_yy -t $< > $@
clean:
rm -rf $(OBJECTS) $(LIBFILE)
rm -f *.a
$(LIBFILE): $(OBJECTS)
ar -cr $@ $?
$(RANLIB) $@

BIN
libfile/.DS_Store vendored

Binary file not shown.

View File

@ -1,25 +0,0 @@
SOURCES = fileHandling.c
SRCS=$(SOURCES)
OBJECTS= $(patsubst %.c,%.o,$(SOURCES))
LIBFILE= libfile.a
RANLIB=ranlib
include ../global.mk
all: $(LIBFILE)
clean:
rm -rf $(OBJECTS) $(LIBFILE)
rm -f *.P
rm -f *.a
$(LIBFILE): $(OBJECTS)
ar -cr $@ $?
$(RANLIB) $@

BIN
liblcs/.DS_Store vendored

Binary file not shown.

View File

@ -1,25 +0,0 @@
SOURCES = sse_banded_LCS_alignment.c \
upperband.c
SRCS=$(SOURCES)
OBJECTS= $(patsubst %.c,%.o,$(SOURCES))
LIBFILE= liblcs.a
RANLIB=ranlib
include ../global.mk
all: $(LIBFILE)
clean:
rm -rf $(OBJECTS) $(LIBFILE)
rm -f *.P
rm -f *.a
$(LIBFILE): $(OBJECTS)
ar -cr $@ $?
$(RANLIB) $@

BIN
libsse/.DS_Store vendored

Binary file not shown.

BIN
libutils/.DS_Store vendored

Binary file not shown.

View File

@ -1,25 +0,0 @@
SOURCES = utilities.c \
debug.c
SRCS=$(SOURCES)
OBJECTS= $(patsubst %.c,%.o,$(SOURCES))
LIBFILE= libutils.a
RANLIB=ranlib
include ../global.mk
all: $(LIBFILE)
clean:
rm -rf $(OBJECTS) $(LIBFILE)
rm -f *.P
rm -f *.a
$(LIBFILE): $(OBJECTS)
ar -cr $@ $?
$(RANLIB) $@