db16131db4
Error messages and function names/line numbers are traced via __func__ or __FUNCTION__, __LINE__, etc (or just "unknown" if not available). A manual stack is kept onto which these values are pushed which can then be dumped to stderr/stdout. stderr is used to report this information since no other facility appears to be provided.
19 lines
381 B
Makefile
19 lines
381 B
Makefile
BUILD_DIR ?= ./build
|
|
SRC_DIR = ./src
|
|
INC_DIR = $(SRC_DIR)
|
|
|
|
CC=h5cc
|
|
CFLAGS=-Wall -g -O2 -fpic -I$(INC_DIR)
|
|
|
|
$(BUILD_DIR)/%.o: $(SRC_DIR)/%.c
|
|
mkdir -p $(BUILD_DIR)
|
|
$(CC) $(CFLAGS) -c $< -o $@
|
|
|
|
plugin: $(BUILD_DIR)/plugin.o $(BUILD_DIR)/file.o $(BUILD_DIR)/err.o
|
|
mkdir -p $(BUILD_DIR)
|
|
$(CC) $(CFLAGS) -shared $^ -o $(BUILD_DIR)/plugin.so
|
|
|
|
.PHONY: clean
|
|
clean:
|
|
rm -r $(BUILD_DIR)
|