1
0
mirror of https://gitlab.com/klmp200/LO27.git synced 2024-11-22 16:33:19 +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
INCLUDEDIR=-I/usr/include -I. -I../LibAutomaton
INCLUDEDIR=-I/usr/include -I. -I../LibMatrix
#Library variables
LIBTARGET=libGui.so
@ -11,8 +11,8 @@ LIBSOURCE=pixel
LIBSOURCECFILE=$(LIBSOURCE:=.c)
LIBSOURCEOFILE=$(LIBSOURCE:=.o)
DEPENDENCELIST=libAutomaton.so
DEPENDENCENAMELIST=Automaton
DEPENDENCELIST=libMatrix.so
DEPENDENCENAMELIST=Matrix
EXTLIBS=`sdl2-config --cflags --libs`

View File

@ -2,7 +2,7 @@
* @Author: klmp200
* @Date: 2016-12-27 19:59:21
* @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>

View File

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

View File

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