Functionnal project

This commit is contained in:
Antoine Bartuccio 2016-12-10 23:21:17 +01:00
parent 33a439646d
commit c2fbc32f16
4 changed files with 7 additions and 5 deletions

1
.gitignore vendored
View File

@ -1,3 +1,4 @@
Libs/ Libs/
*.o *.o
*.exe *.exe
build/

View File

@ -2,7 +2,7 @@ CC=gcc
CFLAGS=-Wall -Werror -pedantic -fpic -g CFLAGS=-Wall -Werror -pedantic -fpic -g
LIBSDIR=-L/usr/lib -L../Libs LIBSDIR=-L/usr/lib -L./Libs
INCLUDEDIR=-I/usr/include -I. INCLUDEDIR=-I/usr/include -I.
#Library variables #Library variables
@ -14,7 +14,6 @@ LIBSOURCEOFILE=$(LIBSOURCE:=.o)
#Generating the library binary #Generating the library binary
$(LIBTARGET): $(LIBSOURCEOFILE) $(LIBTARGET): $(LIBSOURCEOFILE)
@echo "\n Generating the library binary" @echo "\n Generating the library binary"
mkdir -p ../Libs
$(CC) $(CFLAGS) -shared $(LIBSOURCEOFILE) -o ../Libs/$(LIBTARGET) $(CC) $(CFLAGS) -shared $(LIBSOURCEOFILE) -o ../Libs/$(LIBTARGET)
#Generating object files #Generating object files

View File

@ -7,7 +7,8 @@ CFLAGS=-Wall -Werror -pedantic -fpic -g
LIBSDIR=-L/usr/lib -L./Libs 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 #Exe test variables
TARGET=main.exe TARGET=main.exe
@ -29,7 +30,8 @@ all: $(TARGET)
$(TARGET): $(SOURCEOFILE) $(DEPENDENCELIST) lib $(TARGET): $(SOURCEOFILE) $(DEPENDENCELIST) lib
@echo "\n Generating the " $(TARGET) " binary" @echo "\n Generating the " $(TARGET) " binary"
# $(CC) $(SOURCEOFILE) $(LIBSDIR) -l$(DEPENDENCENAME) -l$(DEPENDENCENAMELIST) -o $(TARGET) # $(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 #Generating the library binary
lib: lib:

2
main.c
View File

@ -9,7 +9,7 @@
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <CellElement.h> #include <CellElement.h>
#include <List.h> #include <list.h>
int main(int argc, char **argv){ int main(int argc, char **argv){
cellElement * tree = NULL; cellElement * tree = NULL;