Parsee/Makefile
LDA 143bdf0a5a [MOD/FIX] Separate XMPP thread, fix EINVAL issue
threading is good actually. please hmu if you ever trigger the
achievement.
2024-07-17 22:55:25 +02:00

37 lines
1.3 KiB
Makefile

# Makefile for building Parsee
# ================================
# TODO: Consider making something akin to a configure script that checks
# for dependencies, or maybe even use *autoconf* (the devil!)
# =========================== Parsee Flags =============================
NAME=Parsee
VERSION=0.0.0
REPOSITORY=$(shell git remote get-url origin)
# =========================== Compilation Flags ============================
CYTO_INC=/usr/local/include/ # Where Cytoplasm's include path is
# located.
CYTO_LIB=/usr/local/lib # Where's Cytoplasm's library is
# located.
SOURCE=src
OBJECT=build
INCLUDES=src/include
CC=cc
CFLAGS=-I$(SOURCE) -I$(INCLUDES) -I$(CYTO_INC) -DNAME="\"$(NAME)\"" -DVERSION="\"$(VERSION)\"" -DREPOSITORY=\"$(REPOSITORY)\" -O2 -g -ggdb -Wall -Werror
LDFLAGS=-L $(CYTO_LIB) -lCytoplasm -Wl,--export-dynamic -O2 -g -ggdb
BINARY=parsee
# ============================ Compilation =================================
SRC_FILES:=$(shell find $(SOURCE) -name '*.c')
OBJ_FILES:=${subst $(SOURCE)/,$(OBJECT)/,$(patsubst %.c, %.o, $(SRC_FILES))}
binary: $(OBJ_FILES)
$(CC) $(LDFLAGS) $(OBJ_FILES) -o $(BINARY)
clean:
rm -rf $(OBJECT) $(BINARY)
$(OBJECT)/%.o: $(SOURCE)/%.c
@mkdir -p $(shell dirname "$@")
$(CC) -c $(CFLAGS) $< -o $@