diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57cf263 --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +Makefile +src/libelfmaster.o +src/libelfmaster.a +src/libelfmaster.so +build/libelfmaster.build diff --git a/src/Makefile.in b/src/Makefile.in index 202afab..c5e2eca 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -5,17 +5,20 @@ include @BUILD_DIR@/build/libelfmaster.build TARGET_DIR=$(BUILD_DIR)/src SDIR=$(SRC_DIR)/src INCLUDE_DIR=$(SRC_DIR)/include -CFLAGS+=-ggdb -O2 +CFLAGS+=-ggdb -O2 -I$(INCLUDE_DIR) HEADERS=$(INCLUDE_DIR)/*.h OBJECTS=libelfmaster.o internal.o -all: libelfmaster.a +all: libelfmaster.a libelfmaster.so libelfmaster.a: $(OBJECTS) rm -f $(TARGET_DIR)/libelfmaster.a ar rcs $(TARGET_DIR)/libelfmaster.a $(OBJECTS) +libelfmaster.so: $(OBJECTS) + $(CC) $(CFLAGS) $(OBJECTS) -shared -o $(TARGET_DIR)/libelfmaster.so + libelfmaster.o: $(SDIR)/libelfmaster.c $(HEADERS) $(CC) $(CFLAGS) -c -o $(TARGET_DIR)/libelfmaster.o $(SDIR)/libelfmaster.c diff --git a/src/internal.c b/src/internal.c index 9d5f8fa..151d911 100644 --- a/src/internal.c +++ b/src/internal.c @@ -11,9 +11,10 @@ #include #include -#include "../include/libelfmaster.h" -#include "../include/internal.h" -#include "../include/misc.h" +#include "libelfmaster.h" +#include "internal.h" +#include "misc.h" + bool elf_error_set(elf_error_t *error, const char *fmt, ...) diff --git a/src/libelfmaster.c b/src/libelfmaster.c index e49e815..df26bf0 100644 --- a/src/libelfmaster.c +++ b/src/libelfmaster.c @@ -11,7 +11,7 @@ #include #include -#include "../include/libelfmaster.h" +#include "libelfmaster.h" #include "misc.h" #include "internal.c"