Commit e59a2cd6 authored by jkvis's avatar jkvis

Testing library builds

parent 46a361d0
CC = gcc
CFLAGS = -O0 -march=native
CPPFLAGS = -Wall -Wextra -Iinclude/ -Ilib/sais-lite-lcp/
CFLAGS = -O3 -march=native
CPPFLAGS = -Iinclude/ -Ilib/sais-lite-lcp/ -Wall -Wextra -pedantic
SOURCES = $(shell find src/ -name '*.c')
OBJECTS = $(SOURCES:.c=.o)
DEPS = $(OBJECTS:.o=.d)
LIBS = sais-lite-lcp
LIBS = $(shell find lib/ -name '*.a')
.PHONY: clean
libgesa.a: lib/lib$(LIBS).a $(OBJECTS)
ar rcs $@ $<
libgesa.a: $(LIBS) $(OBJECTS)
$(MAKE) -wC lib/
ar rcsT $@ $(LIBS) $(OBJECTS)
clean:
rm -f $(OBJECTS) $(DEPS) libgesa.a
lib/lib$(LIBS).a:
$(MAKE) -wC lib/
-include $(DEPS)
%.o: %.c
......
CC = gcc
CFLAGS = -O3 -fomit-frame-pointer -funroll-loops -march=native
CPPFLAGS = -I. -DNDEBUG -Wall -Wextra
CPPFLAGS = -I. -DNDEBUG -Wall -Wextra -pedantic
TARGETS = sais-lite-lcp
SOURCES = sais-lite-lcp/sais.c
OBJECTS = $(SOURCES:.c=.o)
......@@ -9,7 +9,7 @@ DEPS = $(OBJECTS:.o=.d)
.PHONY: clean
lib$(TARGETS:./%=%).a: $(OBJECTS)
ar rcs $@ $<
ar rcsT $@ $<
clean:
rm -f $(OBJECTS) $(DEPS) lib$(TARGETS:./%=%).a
......
Subproject commit 858b175b0a26508bc493ee203b45a61b8d882c06
Subproject commit a31f364be1103bd55918ea38855901064d077dd5
#include <cstdio>
#include <cstdlib>
#include "../include/gesa.h"
int main(int, char* [])
{
static char const* const string = "test me";
GESA test;
if (GESA_create(&test, (GESA_char_t*) string, 9) != 0)
{
fprintf(stderr, "Error GESA_create()\n");
return EXIT_FAILURE;
} // if
printf("%s\n", test.string[0]);
return EXIT_SUCCESS;
} // main
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment