saqut-compiler/compile.sh

43 lines
1.3 KiB
Bash
Executable File
Raw Permalink 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
# ============================================================================
#
# AMAÇ: Projeyi tek komutla derlemek.
#
# KULLANIM:
# ./compile.sh → saqut binary'sini üret
# ./saqut → derleyiciyi çalıştır
#
# DERLEME SÜRECİ:
# Tek bir .cpp dosyası (src/main.cpp) tüm header-only kütüphaneleri
# include eder. Harici bağımlılık yoktur.
#
# g++ parametreleri:
# -Isrc : include path (header'lar src/ altında)
# -std=c++17 : C++17 standardı (std::variant, constexpr, vb.)
# -Wall -Wextra : Tüm uyarıları
# -O0 -g : Optimizasyon kapalı, debug sembolleri açık
# -o saqut : Çıktı binary adı
#
# GELECEK:
# - Makefile veya CMakeLists.txt ile daha esnek build
# - Release modu: -O2 -DNDEBUG
# - Test modu: ayrı bir test binary'si
#
# ============================================================================
set -e # Hata durumunda dur
echo "=== saQut Compiler Build ==="
g++ src/main.cpp \
-Isrc \
-std=c++17 \
-Wall -Wextra \
-O0 -g \
-o saqut
echo "Derleme başarılı: ./saqut"
echo "Çalıştırmak için: ./saqut"