-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.sh
More file actions
30 lines (24 loc) · 1.02 KB
/
Copy pathbuild.sh
File metadata and controls
30 lines (24 loc) · 1.02 KB
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
#!/bin/bash
echo "Building console version..."
# Create build directories
mkdir -p build/obj
# Check if gcc is available
if ! command -v gcc &> /dev/null; then
echo "GCC not found! Please install GCC."
exit 1
fi
# Compile source files
echo "Compiling source files..."
gcc -Wall -Wextra -std=c99 -c src/main.c -o build/obj/main.o
gcc -Wall -Wextra -std=c99 -c src/utils.c -o build/obj/utils.o
gcc -Wall -Wextra -std=c99 -c src/startup.c -o build/obj/startup.o
gcc -Wall -Wextra -std=c99 -c src/admin.c -o build/obj/admin.o
gcc -Wall -Wextra -std=c99 -c src/notifications.c -o build/obj/notifications.o
gcc -Wall -Wextra -std=c99 -c src/orders.c -o build/obj/orders.o
gcc -Wall -Wextra -std=c99 -c src/client.c -o build/obj/client.o
gcc -Wall -Wextra -std=c99 -c src/client_operations.c -o build/obj/client_operations.o
gcc -Wall -Wextra -std=c99 -c src/order_system.c -o build/obj/order_system.o
# Link executable
echo "Linking executable..."
gcc build/obj/*.o -o build/pizza_system
echo "Build complete! Run: ./build/pizza_system"