25 lines
446 B
Makefile
25 lines
446 B
Makefile
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):
|
|
mkdir -p $@
|