1
0
mirror of https://gitlab.com/klmp200/LO27.git synced 2024-12-22 22:21:08 +00:00

New project acrh

This commit is contained in:
Antoine Bartuccio 2016-12-11 01:53:18 +01:00
parent 53c05a0ca5
commit 24e3bb4b90
7 changed files with 8 additions and 42 deletions

View File

@ -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)

View File

@ -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

View File

@ -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