From 96796f9277fdc6a670ef4a80e63ec1be7756137d Mon Sep 17 00:00:00 2001
From: "dario.genga" <dario.genga@etu.hesge.ch>
Date: Tue, 23 Nov 2021 13:45:45 +0100
Subject: [PATCH] Add the project's base

This include :
- .gitignore
- README
- makefile
- Files (main, test, .c, .h)
---
 .gitignore | 82 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 README.md  | 23 +++++++++++++--
 main.c     | 13 +++++++++
 makefile   | 15 ++++++++++
 stack.c    |  8 ++++++
 stack.h    | 12 ++++++++
 test.c     | 13 +++++++++
 7 files changed, 164 insertions(+), 2 deletions(-)
 create mode 100644 .gitignore
 create mode 100644 main.c
 create mode 100644 makefile
 create mode 100644 stack.c
 create mode 100644 stack.h
 create mode 100644 test.c

diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..ca2eaff
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,82 @@
+
+# Created by https://www.toptal.com/developers/gitignore/api/c,visualstudiocode
+# Edit at https://www.toptal.com/developers/gitignore?templates=c,visualstudiocode
+
+### C ###
+# Prerequisites
+*.d
+
+# Object files
+*.o
+*.ko
+*.obj
+*.elf
+
+# Linker output
+*.ilk
+*.map
+*.exp
+
+# Precompiled Headers
+*.gch
+*.pch
+
+# Libraries
+*.lib
+*.a
+*.la
+*.lo
+
+# Shared objects (inc. Windows DLLs)
+*.dll
+*.so
+*.so.*
+*.dylib
+
+# Executables
+*.exe
+*.out
+*.app
+*.i*86
+*.x86_64
+*.hex
+
+# Debug files
+*.dSYM/
+*.su
+*.idb
+*.pdb
+
+# Kernel Module Compile Results
+*.mod*
+*.cmd
+.tmp_versions/
+modules.order
+Module.symvers
+Mkfile.old
+dkms.conf
+
+### VisualStudioCode ###
+.vscode/*
+!.vscode/settings.json
+!.vscode/tasks.json
+!.vscode/launch.json
+!.vscode/extensions.json
+*.code-workspace
+
+# Local History for Visual Studio Code
+.history/
+
+### VisualStudioCode Patch ###
+# Ignore all local history of files
+.history
+.ionide
+
+# Support for Project snippet scope
+!.vscode/*.code-snippets
+
+# End of https://www.toptal.com/developers/gitignore/api/c,visualstudiocode
+
+# Custom gitignore for project
+stack
+test
\ No newline at end of file
diff --git a/README.md b/README.md
index df5f383..0a99331 100644
--- a/README.md
+++ b/README.md
@@ -1,3 +1,22 @@
-# progseq-
+# Pile et tri à deux piles
 
-8e travail pratique du cours de programmation séquentielle, 1er année (2021-2022).
\ No newline at end of file
+- **Class** : Programmation séquentielle en C
+- **Creation date** : 23 novembre 2021
+- **Description** : 8e travail pratique
+
+## Makefile configuration
+
+### Compile the project
+> `make`
+
+Use this command to compile the project.
+
+### Clean the project
+> `make clean`
+
+Use this command to clean the project.
+
+### Run the tests
+> `make run_tests`
+
+Use this command to start the tests.
\ No newline at end of file
diff --git a/main.c b/main.c
new file mode 100644
index 0000000..736e7ff
--- /dev/null
+++ b/main.c
@@ -0,0 +1,13 @@
+/* Author : Dario GENGA
+ * Date : 16.11.2021
+ * Description : Library to manipulate the pile
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include "stack.h"
+
+int main() {
+
+    return EXIT_SUCCESS;
+}
diff --git a/makefile b/makefile
new file mode 100644
index 0000000..ca88551
--- /dev/null
+++ b/makefile
@@ -0,0 +1,15 @@
+LIB=-lm
+CC=gcc -Wall -Wextra -g
+
+stack: stack.o main.o
+	$(CC) $^ -fsanitize=address -fsanitize=leak -o $@ $(LIB)
+
+test: test.o stack.o
+	$(CC) $^ -fsanitize=address -fsanitize=leak -o $@ $(LIB)
+
+stack.o: stack.c stack.h
+	$(CC) -c $< $(LIB)
+main.o: main.c
+	$(CC) -c $< $(LIB)
+clean:
+	rm -f *.o stack test
\ No newline at end of file
diff --git a/stack.c b/stack.c
new file mode 100644
index 0000000..4f024e2
--- /dev/null
+++ b/stack.c
@@ -0,0 +1,8 @@
+/* Author : Dario GENGA
+ * Date : 16.11.2021
+ * Description : Library to manipulate the stack
+ */
+
+#include "stack.h"
+#include <stdio.h>
+
diff --git a/stack.h b/stack.h
new file mode 100644
index 0000000..207ee6e
--- /dev/null
+++ b/stack.h
@@ -0,0 +1,12 @@
+/* Author : Dario GENGA
+ * Date : 16.11.2021
+ * Description : Library to manipulate the stack
+ */
+#ifndef _PILE_H
+#define _PILE_H
+#include <stdio.h>
+#include <stdlib.h>
+#include <stdbool.h>
+
+
+#endif
\ No newline at end of file
diff --git a/test.c b/test.c
new file mode 100644
index 0000000..1648701
--- /dev/null
+++ b/test.c
@@ -0,0 +1,13 @@
+/* Author : Dario GENGA
+ * Date : 16.11.2021
+ * Description : Manipulate matrix
+ */
+#include "stack.h"
+#include <assert.h>
+#include <stdbool.h>
+#include <stdio.h>
+
+int main() {
+    printf("The tests are completed and were successful !\n");
+    return EXIT_SUCCESS;
+}
-- 
GitLab