saqut-compiler/scripts/compile.sh

27 lines
705 B
Bash
Executable File
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/bin/bash
# ============================================================================
# saQut Compiler — Derleme Betiği
# ============================================================================
set -e
# Betiğin bulunduğu dizini al
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
PROJECT_ROOT="$( dirname "$SCRIPT_DIR" )"
echo "=== saQut Compiler Build ==="
# Build dizinini oluştur
mkdir -p "$PROJECT_ROOT/build"
# Derleme
g++ "$PROJECT_ROOT/src/main.cpp" \
-I"$PROJECT_ROOT/src" \
-std=c++17 \
-Wall -Wextra \
-O0 -g \
-o "$PROJECT_ROOT/build/saqut"
echo "Derleme başarılı: build/saqut"
echo "Çalıştırmak için: ./build/saqut"