#!/usr/bin/env bash
# Build ANetIRC BBS terminal IRC client for Linux
# Requires: gcc, libssl-dev (sudo apt install libssl-dev)
set -e
cd "$(dirname "$0")/src"
cc -std=c11 -O2 -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200809L \
  main.c irc.c irc_client.c ui.c colors.c utils.c config.c \
  addressbook.c common.c dropfile.c \
  -o ../anetirc -lpthread -lssl -lcrypto
chmod 755 ../anetirc
echo "Built: $(dirname "$0")/anetirc"
