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)
|
|
|
|
|
|
|
|
CFLAGS = --std=c99 -O3 -Wall -Werror -Wextra -pedantic
|
|
|
|
LDFLAGS += -lportaudio -lopus -lsodium
|
|
|
|
|
|
|
|
$(TARGET): $(OBJs)
|
|
|
|
$(CC) $(CFLAGS) $(LDFLAGS) $^ -o $@
|
|
|
|
|
|
|
|
$(OBJ_DIR)/%.o: $(SRC_DIR)/%.c | $(OBJ_DIR)
|
|
|
|
$(CC) $(CFLAGS) $(LDFLAGS) -c $< -o $@
|
|
|
|
|
|
|
|
$(OBJ_DIR):
|
2024-03-22 04:15:44 +04:00
|
|
|
mkdir -p $@
|
|
|
|
|
|
|
|
clean:
|
|
|
|
rm ${TARGET}
|
|
|
|
rm obj/*.o
|