1
0
mirror of https://gitlab.com/klmp200/LO27.git synced 2024-11-22 22:23:24 +00:00

Changement d'architecture de projet

This commit is contained in:
Antoine Bartuccio 2016-12-28 18:49:26 +01:00
parent b2c6602cbc
commit 547bafb92f
11 changed files with 17 additions and 20 deletions

View File

@ -3,7 +3,7 @@ CFLAGS=-Wall -Werror -pedantic -fpic -g -std=c89
LIBSDIR=-L/usr/lib -L../Libs LIBSDIR=-L/usr/lib -L../Libs
INCLUDEDIR=-I/usr/include -I. -I../LibAutomaton INCLUDEDIR=-I/usr/include -I. -I../LibMatrix
#Library variables #Library variables
LIBTARGET=libGui.so LIBTARGET=libGui.so
@ -11,8 +11,8 @@ LIBSOURCE=pixel
LIBSOURCECFILE=$(LIBSOURCE:=.c) LIBSOURCECFILE=$(LIBSOURCE:=.c)
LIBSOURCEOFILE=$(LIBSOURCE:=.o) LIBSOURCEOFILE=$(LIBSOURCE:=.o)
DEPENDENCELIST=libAutomaton.so DEPENDENCELIST=libMatrix.so
DEPENDENCENAMELIST=Automaton DEPENDENCENAMELIST=Matrix
EXTLIBS=`sdl2-config --cflags --libs` EXTLIBS=`sdl2-config --cflags --libs`

View File

@ -2,7 +2,7 @@
* @Author: klmp200 * @Author: klmp200
* @Date: 2016-12-27 19:59:21 * @Date: 2016-12-27 19:59:21
* @Last Modified by: klmp200 * @Last Modified by: klmp200
* @Last Modified time: 2016-12-27 20:09:56 * @Last Modified time: 2016-12-28 18:48:54
*/ */
#include <stdio.h> #include <stdio.h>

View File

@ -6,7 +6,7 @@ LIBSDIR=-L/usr/lib -L../Libs
INCLUDEDIR=-I/usr/include -I. INCLUDEDIR=-I/usr/include -I.
#Library variables #Library variables
LIBTARGET=libAutomaton.so LIBTARGET=libMatrix.so
LIBSOURCE=list CellElement matrix LIBSOURCE=list CellElement matrix
LIBSOURCECFILE=$(LIBSOURCE:=.c) LIBSOURCECFILE=$(LIBSOURCE:=.c)
LIBSOURCEOFILE=$(LIBSOURCE:=.o) LIBSOURCEOFILE=$(LIBSOURCE:=.o)

View File

@ -8,37 +8,33 @@ CFLAGS=-Wall -Werror -pedantic -fpic -g -std=c89
EXTLIBS=`sdl2-config --cflags --libs` EXTLIBS=`sdl2-config --cflags --libs`
LIBSDIR=-L/usr/lib -L./Libs LIBSDIR=-L/usr/lib -L./Libs
INCLUDEDIR=-I/usr/include -I. -I./LibAutomaton -I./LibGui INCLUDEDIR=-I/usr/include -I. -I./LibMatrix -I./LibGui
#Exe test variables #Exe test variables
TARGET=main TARGET=Matrix.exe
SOURCE=main SOURCE=matrixmain
SOURCECFILE=$(SOURCE:=.c) SOURCECFILE=$(SOURCE:=.c)
SOURCEOFILE=$(SOURCE:=.o) SOURCEOFILE=$(SOURCE:=.o)
DEPENDENCELIST=libAutomaton.so libGui.so DEPENDENCELIST=libMatrix.so libGui.so
DEPENDENCENAMEONE=Automaton DEPENDENCENAMEONE=Matrix
DEPENDENCENAMETWO=Gui DEPENDENCENAMETWO=Gui
all: $(TARGET) all: $(TARGET)
#Generating the main.exe #Generating the main.exe
$(TARGET): $(SOURCEOFILE) $(DEPENDENCELIST) lib $(TARGET): $(SOURCEOFILE) lib
@echo "\n Generating the " $(TARGET) " binary" @echo "\n Generating the " $(TARGET) " binary"
mkdir -p build mkdir -p build
$(CC) $(SOURCEOFILE) $(LIBSDIR) $(EXTLIBS) -l$(DEPENDENCENAMEONE) -l$(DEPENDENCENAMETWO) -o ./build/$(TARGET) $(CC) $(SOURCEOFILE) $(LIBSDIR) $(EXTLIBS) -l$(DEPENDENCENAMEONE) -l$(DEPENDENCENAMETWO) -o ./build/$(TARGET)
#Generating the library binary #Generating the library binary
lib: lib:
@echo "\n Generating the automaton library binary" @echo "\n Generating the gui library binary"
$(MAKE) -C LibGui
$(DEPENDENCELIST):
@echo "\n Generating the automaton library binary"
mkdir -p Libs mkdir -p Libs
$(MAKE) -C LibAutomaton $(MAKE) -C LibMatrix
$(MAKE) -C LibGui
#Generating object files #Generating object files
.c.o: .c.o:
@ -49,5 +45,6 @@ $(DEPENDENCELIST):
#Cleaning #Cleaning
clean: clean:
@echo "\n Cleaning" @echo "\n Cleaning"
rm -rf *.o ./Libs/*.so *.exe rm -rf *.o ./Libs/*.so ./build/$(TARGET)
$(MAKE) -C LibAutomaton clean $(MAKE) -C LibMatrix clean
$(MAKE) -C LibGui clean