From c2fbc32f1639d62b226ec34d2cf5dde13b121593 Mon Sep 17 00:00:00 2001 From: klmp200 Date: Sat, 10 Dec 2016 23:21:17 +0100 Subject: [PATCH] Functionnal project --- .gitignore | 1 + LibList/Makefile | 3 +-- Makefile | 6 ++++-- main.c | 2 +- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 072dd65..f5a27ca 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ Libs/ *.o *.exe +build/ diff --git a/LibList/Makefile b/LibList/Makefile index ac206d5..05d8b08 100644 --- a/LibList/Makefile +++ b/LibList/Makefile @@ -2,7 +2,7 @@ CC=gcc CFLAGS=-Wall -Werror -pedantic -fpic -g -LIBSDIR=-L/usr/lib -L../Libs +LIBSDIR=-L/usr/lib -L./Libs INCLUDEDIR=-I/usr/include -I. #Library variables @@ -14,7 +14,6 @@ LIBSOURCEOFILE=$(LIBSOURCE:=.o) #Generating the library binary $(LIBTARGET): $(LIBSOURCEOFILE) @echo "\n Generating the library binary" - mkdir -p ../Libs $(CC) $(CFLAGS) -shared $(LIBSOURCEOFILE) -o ../Libs/$(LIBTARGET) #Generating object files diff --git a/Makefile b/Makefile index 10f81cc..4377be0 100644 --- a/Makefile +++ b/Makefile @@ -7,7 +7,8 @@ CFLAGS=-Wall -Werror -pedantic -fpic -g LIBSDIR=-L/usr/lib -L./Libs -INCLUDEDIR=-I/usr/include -I. -I./LibCell -I./LibList +# INCLUDEDIR=-I/usr/include -I. -I./LibCell -I./LibList +INCLUDEDIR=-I/usr/include -I. -I./LibList #Exe test variables TARGET=main.exe @@ -29,7 +30,8 @@ all: $(TARGET) $(TARGET): $(SOURCEOFILE) $(DEPENDENCELIST) lib @echo "\n Generating the " $(TARGET) " binary" # $(CC) $(SOURCEOFILE) $(LIBSDIR) -l$(DEPENDENCENAME) -l$(DEPENDENCENAMELIST) -o $(TARGET) - $(CC) $(SOURCEOFILE) $(LIBSDIR) -l$(DEPENDENCENAMELIST) -o $(TARGET) + mkdir -p build + $(CC) $(SOURCEOFILE) $(LIBSDIR) -l$(DEPENDENCENAMELIST) -o ./build/$(TARGET) #Generating the library binary lib: diff --git a/main.c b/main.c index 6e3db4d..b7c6daf 100644 --- a/main.c +++ b/main.c @@ -9,7 +9,7 @@ #include #include #include -#include +#include int main(int argc, char **argv){ cellElement * tree = NULL;