Skip to content

Commit 99e540b

Browse files
committed
* All header files inside headers folder
* Binary for linux is build in the bin/linux/ folder. * Merge branch 'fix-headerfilelocation'
2 parents 80ae257 + f8089c3 commit 99e540b

File tree

5 files changed

+8
-5
lines changed

5 files changed

+8
-5
lines changed

build.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
#!/bin/sh
22

3-
gcc -Wall -Wextra main.c tea.c -std=c99 -Wpedantic -o tea -I .
3+
if [ ! -e bin/linux ]; then
4+
mkdir -p bin/linux || exit
5+
fi
6+
gcc -Wall -Wextra main.c tea.c -std=c99 -Wpedantic -o bin/linux/tea
File renamed without changes.

tea.h renamed to headers/tea.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
#ifndef __TEA__
1313
#define __TEA__
1414

15-
#include "headers/stdint.h" // For standard int types
16-
#include "headers/stdbool.h" // for bool, true, false
15+
#include "stdint.h" // For standard int types
16+
#include "stdbool.h" // for bool, true, false
1717

1818
// Cannot be changed, without impact to the code.
1919
#define KEY_SIZE 16 // bytes

main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* ---------------------------------------------------------------------------
1515
* */
1616

17-
#include "tea.h"
17+
#include "headers/tea.h"
1818
#include "headers/stdint.h" // For standard int types.
1919
#include "headers/unistd.h" // For unlink
2020
#include <stdio.h> // For printf and NULL, etc..

tea.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* Dated : 16th August 2020
1010
* ---------------------------------------------------------------------------
1111
* */
12-
#include "tea.h"
12+
#include "headers/tea.h"
1313
#include "headers/unistd.h" // For read, write, access, close
1414
#include "headers/fcntl.h" // For open
1515
#include <stdio.h> // For printf and NULL, etc..

0 commit comments

Comments
 (0)