Commit bfa323f1 authored by jkvis's avatar jkvis
Browse files

Added debug and release builds

parent 3dcf8dc5
CC = gcc
CFLAGS = -O3 -march=native
CPPFLAGS = -Iinclude/ -Ilib/sais-lite-lcp/ -DNDEBUG -Wall -Wextra -pedantic
CFLAGS = -march=native
CPPFLAGS = -Iinclude/ -Ilib/sais-lite-lcp/ -Wall -Wextra -pedantic
DEBUG = -O0 -ggdb3
SOURCES = $(shell find src/ -name '*.c')
DEPS = $(OBJECTS:.o=.d)
LIBS = $(shell find lib/ -name '*.a')
TARGET = libgesa.a
.PHONY: clean tests
.PHONY: all debug clean release tests
libgesa.a: $(LIBS) $(OBJECTS)
all: debug
debug: CFLAGS += $(DEBUG)
debug: $(TARGET)
release: CFLAGS += $(RELEASE)
release: $(TARGET)
$(MAKE) -wC lib/
ar rcsT $@ $(LIBS) $(OBJECTS)
tests: libgesa.a
tests: $(TARGET)
$(MAKE) -wC tests/
rm -f $(OBJECTS) $(DEPS) libgesa.a
rm -f $(OBJECTS) $(DEPS) $(TARGET)
-include $(DEPS)
......@@ -33,7 +33,7 @@ typedef struct
// Creates a GESA from a single string
// Creates a GESA from a single string that *must* be '\0' terminated
// On success it returns 0
int GESA_create(GESA* const gesa,
GESA_char_t const* const string,
Supports Markdown
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