-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathBuildHeadless.sh
executable file
·61 lines (37 loc) · 1.04 KB
/
BuildHeadless.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#!/bin/bash
source src/build/func.sh
tis=$(date +%s%N)
cd src
displayWelcome
addToBuild
declare -i BUILDCOUNT=0
#compile .c , .cpp , and .h file
mkdir obj &> /dev/null
echo "$((($(date +%s%N) - $tis)/1000000)) ms"
echo "---------------- BUILDING ASM -------------------"
# Compile the asm files
for OUTPUT in $(find ./ -type f -iregex '.*/.*\.\(s\)$')
do
BUILDCOUNT=$(( 1 + BUILDCOUNT))
compilea $OUTPUT
done
wait
cd ..
echo "$((($(date +%s%N) - $tis)/1000000)) ms"
echo "---------------- BUILDING OS --------------------"
for OUTPUT in $(find ./ -type f -iregex '.*/.*\.\(c\|cpp\|h\|hpp\)$')
do
compilestuff $OUTPUT &
BUILDCOUNT=$(( 1 + BUILDCOUNT))
done
wait
printf "Working Files : $BUILDCOUNT \n"
echo "$((($(date +%s%N) - $tis)/1000000)) ms"
echo "---------------- LINKING OS ---------------------"
DisDone "Moving object files"
mkdir src/obj &> /dev/null
mv $(find ./ -type f -iregex '.*/.*\.\(o\)$') src/obj
rm temp.txt &> /dev/null
cd src
Link_and_check # Link the bin and check everything
exit 0 # Build good!