Commit bfa323f1 authored by jkvis's avatar jkvis

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
RELEASE = -O3 -DNDEBUG
SOURCES = $(shell find src/ -name '*.c')
OBJECTS = $(SOURCES:.c=.o)
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)
$(TARGET): $(LIBS) $(OBJECTS)
$(MAKE) -wC lib/
ar rcsT $@ $(LIBS) $(OBJECTS)
tests: libgesa.a
tests: $(TARGET)
$(MAKE) -wC tests/
clean:
rm -f $(OBJECTS) $(DEPS) libgesa.a
rm -f $(OBJECTS) $(DEPS) $(TARGET)
-include $(DEPS)
......
......@@ -33,7 +33,7 @@ typedef struct
} GESA; // GESA
// 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,
......
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