2024-03-21 04:10:02 +04:00
|
|
|
TARGET = tetatet
|
|
|
|
|
|
|
|
CC = cc
|
|
|
|
|
|
|
|
DESTDIR :=
|
|
|
|
DESTDIR = /
|
|
|
|
PREFIX := /usr/local
|
|
|
|
|
|
|
|
SRC_DIR := src
|
|
|
|
OBJ_DIR := obj
|
|
|
|
|
|
|
|
SRCs := $(wildcard $(SRC_DIR)/*.c)
|
|
|
|
OBJs := $(SRCs:$(SRC_DIR)/%.c=$(OBJ_DIR)/%.o)
|
|
|
|
|
2024-03-24 19:29:45 +04:00
|
|
|
CFLAGS = --std=c99 -D_POSIX_C_SOURCE=200112L -O3 -Wall -Werror -Wextra -pedantic
|
2024-03-25 01:16:41 +04:00
|
|
|
CFLAGS += -flto
|
2024-03-21 04:10:02 +04:00
|
|
|
LDFLAGS += -lportaudio -lopus -lsodium
|
|
|
|
|
|
|
|
$(TARGET): $(OBJs)
|
2024-03-25 00:54:18 +04:00
|
|
|
$(CC) $(LDFLAGS) $^ -o $@
|
2024-03-21 04:10:02 +04:00
|
|
|
|
|
|
|
$(OBJ_DIR)/%.o: $(SRC_DIR)/%.c | $(OBJ_DIR)
|
2024-03-25 00:54:18 +04:00
|
|
|
$(CC) $(CFLAGS) -c $< -o $@
|
2024-03-21 04:10:02 +04:00
|
|
|
|
|
|
|
$(OBJ_DIR):
|
2024-03-22 04:15:44 +04:00
|
|
|
mkdir -p $@
|
|
|
|
|
|
|
|
clean:
|
2024-03-24 19:29:45 +04:00
|
|
|
rm -f ${TARGET}
|
|
|
|
rm -f obj/*.o
|