mirror of
https://gitlab.com/klmp200/LO27.git
synced 2024-12-23 03:21:08 +00:00
Merge branch 'NaejBranch' into 'master'
Added a first ver of the makefile Get the makefile See merge request !1
This commit is contained in:
commit
2dd85ff6cd
44
CellElement.h
Normal file
44
CellElement.h
Normal file
@ -0,0 +1,44 @@
|
||||
#ifndef CELLELMNT_H
|
||||
#define CELLELMNT_H
|
||||
|
||||
|
||||
/*---bool---
|
||||
*@true : 1
|
||||
*@false : 0
|
||||
*/
|
||||
typedef enum Bool{
|
||||
|
||||
true = 1;
|
||||
false = 0;
|
||||
|
||||
} bool;
|
||||
|
||||
|
||||
/*---cellElement---
|
||||
*Pointer on a cell of the matrix
|
||||
*
|
||||
*@colIndex : index (int) of the column of this cell
|
||||
*@rowIndex : index (int) of the row of this cell
|
||||
*
|
||||
*@value : a boolean that is the content of the cell
|
||||
*
|
||||
*@nextCol : pointer on the next cellElement in the same column
|
||||
*@nextRow : pointer on the next cellElement in the same row
|
||||
*
|
||||
*/
|
||||
struct cellElement {
|
||||
|
||||
int colIndex;
|
||||
int rowIndex;
|
||||
|
||||
bool value;
|
||||
|
||||
struct cellElement * nextCol;
|
||||
struct cellElement * nextRow;
|
||||
|
||||
};
|
||||
typedef struct cellElement * cellElement;
|
||||
|
||||
|
||||
|
||||
#endif
|
35
Makefile
Normal file
35
Makefile
Normal file
@ -0,0 +1,35 @@
|
||||
CXX = gcc
|
||||
TARGET = exe
|
||||
SOURCEFILE = main
|
||||
CFLAGS = -Wall -Werror -I. -ansi -pedantic -fpic -g
|
||||
LIST_LIBRARY = matrix/libMatrix
|
||||
|
||||
#Generating the executable
|
||||
$(TARGET): $(SOURCEFILE).o
|
||||
@echo "Generating the executable"
|
||||
$(CXX) $(CFLAGS) $(SOURCEFILE).o -o $(TARGET)
|
||||
|
||||
$(SOURCEFILE).o: $(LIST_LIBRARY).so
|
||||
@echo "Generating $(SOURCEFILE).o"
|
||||
$(CXX) $(CFLAGS) -Lmatrix -lmatrix -c $(SOURCEFILE).c -o $@ -LlibMatrix -llibMatrix.so
|
||||
|
||||
$(LIST_LIBRARY).so:clean
|
||||
@echo "Generating libMatrix.so" $@
|
||||
#gcc matrix.c -I. -Wall -Werror -fpic -shared -o $(LIST_LIBRARY).so
|
||||
$(CXX) -Wall -Werror -ansi -pedantic -I. matrix.c -o $(LIST_LIBRARY).so -shared -fpic
|
||||
|
||||
|
||||
#Cleaning the executable
|
||||
clean:
|
||||
@echo "Cleaning temporary files and libMatrix.so"
|
||||
rm -rf *.o *- *.so $(TARGET)
|
||||
rm -rf $(LIST_LIBRARY).so
|
||||
#Generating library
|
||||
lib:
|
||||
@echo "Generating libMatrix.so"
|
||||
$(CXX) -Wall -Werror -ansi -pedantic -I. matrix.c -o $(LIST_LIBRARY).so -shared -fpic
|
||||
|
||||
release:
|
||||
@echo "Generating a release version of the program"
|
||||
make CFLAGS= '-Wall -Werror -I. -ansi -pedantic -fpic'
|
||||
|
Loading…
Reference in New Issue
Block a user