Commit 0cd7bf14 authored by jkvis's avatar jkvis

Added support for archaic name mangling (mac os)

parent 524ac86c
......@@ -11,7 +11,7 @@ DEPS = $(OBJECTS:.o=.d)
TARGET = libgesa.a
CC = gcc
CFLAGS = -march=native
CFLAGS = -march=native -fno-leading-underscore
CPPFLAGS = $(addprefix -I, $(INC_DIR) $(LIB_INC)) -Wall -Wextra -pedantic
.PHONY: all clean clean_all debug libs release tests
......
Subproject commit 0824607d24c8eed1d91421a85e8610215becd1d1
Subproject commit 34158d51f2a478821a6c28d47a396112597eef96
......@@ -11,7 +11,7 @@ TARGETS = $(filter ./test_%, $(OBJECTS))
SHARED = $(filter-out $(TARGETS), $(OBJECTS))
CC = gcc
CFLAGS = -march=native -O0 -DDEBUG -ggdb3
CFLAGS = -march=native -fno-leading-underscore -O0 -DDEBUG -ggdb3
CPPFLAGS = $(addprefix -I, $(INC_DIR)) -Wall -Wextra -pedantic
.PHONY: all clean run_tests
......@@ -22,7 +22,7 @@ run_tests: all
@ - $(foreach T, $(TARGETS:.o=.out), ./$T;)
clean:
rm -f $(OBJECTS) $(DEPS) $(TARGETS:.o=)
rm -f $(OBJECTS) $(DEPS) $(TARGETS:.o=.out)
$(TARGETS:.o=.out): $(SHARED)
$(CC) $(CFLAGS) $(CPPFLAGS) $(@:.out=.o) $^ $(addprefix -L, $(LIB_DIR)) $(addprefix -l, $(LIB_NAME:lib%.a=%) $(LIB_NAME:lib%.a=%)) -o $@
......
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include "../include/gesa.h"
int main(int argc, char* argv[])
{
(void) argc;
(void) argv;
static char const* const string = "test me";
GESA test;
if (GESA_create(&test, (GESA_char_t*) string, 8) != 0)
{
fprintf(stderr, "Error GESA_create()\n");
return EXIT_FAILURE;
} // if
printf("%s\n", test.string[0]);
GESA_destroy(&test, GESA_KEEP_STRINGS);
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