diff --git a/LibList/CellElement.c b/LibAutomaton/CellElement.c similarity index 100% rename from LibList/CellElement.c rename to LibAutomaton/CellElement.c diff --git a/LibList/CellElement.h b/LibAutomaton/CellElement.h similarity index 100% rename from LibList/CellElement.h rename to LibAutomaton/CellElement.h diff --git a/LibList/Makefile b/LibAutomaton/Makefile similarity index 95% rename from LibList/Makefile rename to LibAutomaton/Makefile index 5f92df2..7921ba1 100644 --- a/LibList/Makefile +++ b/LibAutomaton/Makefile @@ -6,7 +6,7 @@ LIBSDIR=-L/usr/lib -L../Libs INCLUDEDIR=-I/usr/include -I. #Library variables -LIBTARGET=libList.so +LIBTARGET=libAutomaton.so LIBSOURCE=list CellElement LIBSOURCECFILE=$(LIBSOURCE:=.c) LIBSOURCEOFILE=$(LIBSOURCE:=.o) diff --git a/LibList/list.c b/LibAutomaton/list.c similarity index 100% rename from LibList/list.c rename to LibAutomaton/list.c diff --git a/LibList/list.h b/LibAutomaton/list.h similarity index 100% rename from LibList/list.h rename to LibAutomaton/list.h diff --git a/LibCell/Makefile b/LibCell/Makefile deleted file mode 100644 index aa62e0a..0000000 --- a/LibCell/Makefile +++ /dev/null @@ -1,27 +0,0 @@ -CC=gcc -CFLAGS=-Wall -Werror -pedantic -fpic -g - - -LIBSDIR=-L/usr/lib -L../Libs -INCLUDEDIR=-I/usr/include -I. - -#Library variables -LIBTARGET=libCellElement.so -LIBSOURCE=CellElement -LIBSOURCECFILE=$(LIBSOURCE:=.c) -LIBSOURCEOFILE=$(LIBSOURCE:=.o) - -#Generating the library binary -$(LIBTARGET): $(LIBSOURCEOFILE) - @echo "\n Generating the library binary" - $(CC) $(CFLAGS) -shared $(LIBSOURCEOFILE) -o ../Libs/$(LIBTARGET) - -#Generating object files -.c.o: - @echo "\n Generating " $@ " from " $< - $(CC) $(CFLAGS) $(INCLUDEDIR) -c -o $@ $< - -#Cleaning -clean: - @echo "\n Cleaning" - rm -rf *.o *.exe *.so diff --git a/Makefile b/Makefile index 4377be0..24db132 100644 --- a/Makefile +++ b/Makefile @@ -7,8 +7,7 @@ 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./LibList +INCLUDEDIR=-I/usr/include -I. -I./LibAutomaton #Exe test variables TARGET=main.exe @@ -17,31 +16,26 @@ SOURCE=main SOURCECFILE=$(SOURCE:=.c) SOURCEOFILE=$(SOURCE:=.o) -#Library variables -# DEPENDENCE=libCellElement.so -# DEPENDENCENAME=CellElement - -DEPENDENCELIST=libList.so -DEPENDENCENAMELIST=List +DEPENDENCELIST=libAutomaton.so +DEPENDENCENAMELIST=Automaton all: $(TARGET) #Generating the main.exe $(TARGET): $(SOURCEOFILE) $(DEPENDENCELIST) lib @echo "\n Generating the " $(TARGET) " binary" - # $(CC) $(SOURCEOFILE) $(LIBSDIR) -l$(DEPENDENCENAME) -l$(DEPENDENCENAMELIST) -o $(TARGET) mkdir -p build $(CC) $(SOURCEOFILE) $(LIBSDIR) -l$(DEPENDENCENAMELIST) -o ./build/$(TARGET) #Generating the library binary lib: @echo "\n Generating the automaton library binary" - mkdir -p Libs # $(MAKE) -C LibCell $(DEPENDENCELIST): - @echo "\n Generating the list library binary" - $(MAKE) -C LibList + @echo "\n Generating the automaton library binary" + mkdir -p Libs + $(MAKE) -C LibAutomaton #Generating object files @@ -54,5 +48,4 @@ $(DEPENDENCELIST): clean: @echo "\n Cleaning" rm -rf *.o ./Libs/*.so *.exe - $(MAKE) -C LibCell clean - $(MAKE) -C LibList clean + $(MAKE) -C LibAutomaton clean