saturnng/libChf/Makefile

55 lines
694 B
Makefile
Raw Normal View History

2022-03-21 11:05:59 +01:00
#
# Source files
2022-03-21 11:05:59 +01:00
#
SRC = src/chf_init.c \
src/chf_gen.c \
src/chf_sig.c \
src/chf_abrt.c \
src/chf_hdlr.c \
src/chf_msgc.c \
src/chf_st.c \
src/chf_top.c
2022-03-21 11:05:59 +01:00
#
# Target object files
2022-03-21 11:05:59 +01:00
#
OBJS = $(SRC:.c=.o)
2022-03-21 11:05:59 +01:00
#
# Other definitions
2022-03-21 11:05:59 +01:00
#
OPTIM ?= 2
2022-03-21 11:05:59 +01:00
CFLAGS ?= -O$(OPTIM) -ansi -pedantic -D_POSIX_C_SOURCE=199506L -I.
ifeq ($(MT), yes)
override CFLAGS := -D_REENTRANT $(CFLAGS)
endif
2022-03-21 11:05:59 +01:00
LFLAGS ?= $(CFLAGS)
LDFLAGS = -L.
2022-03-21 11:05:59 +01:00
#
# Library names
#
TARGET = libChf.a
2022-03-21 11:05:59 +01:00
all: $(TARGET)
2022-03-21 11:05:59 +01:00
doc:
make -C docs
2022-03-21 11:05:59 +01:00
clean:
rm -f $(OBJS)
make -C docs clean
2022-03-21 11:05:59 +01:00
mrproper: clean
rm -f $(TARGET)
make -C docs mrproper
2022-03-21 11:05:59 +01:00
$(TARGET): $(OBJS)
$(AR) $(ARFLAGS) $@ $?
2024-09-19 15:22:04 +02:00
# Formatting
pretty-code:
clang-format -i src/*.c src/*.h