2020-10-11 17:05:00 +03:00
|
|
|
include ../../config.mk
|
|
|
|
|
|
|
|
TARGET = libidris2_refc
|
|
|
|
|
|
|
|
LIBTARGET = $(TARGET).a
|
|
|
|
|
2021-07-21 16:35:21 +03:00
|
|
|
SRCS := $(wildcard *.c)
|
|
|
|
OBJS = $(SRCS:.c=.o)
|
|
|
|
DEPS = $(OBJS:.o=.d)
|
|
|
|
|
2020-10-11 17:05:00 +03:00
|
|
|
CFLAGS += -O2
|
|
|
|
|
|
|
|
ifeq ($(OLD_WIN), 1)
|
2021-07-21 16:35:21 +03:00
|
|
|
CPPFLAGS += -D_OLD_WIN
|
2020-10-11 17:05:00 +03:00
|
|
|
endif
|
|
|
|
|
|
|
|
|
2022-09-08 02:11:35 +03:00
|
|
|
.PHONY: all
|
2020-10-11 17:05:00 +03:00
|
|
|
all: build
|
|
|
|
|
|
|
|
.PHONY: build
|
|
|
|
build: $(LIBTARGET)
|
|
|
|
|
|
|
|
$(LIBTARGET): $(OBJS)
|
|
|
|
$(AR) rc $@ $^
|
|
|
|
$(RANLIB) $@
|
|
|
|
|
|
|
|
-include $(DEPS)
|
|
|
|
|
|
|
|
%.d: %.c
|
2022-09-09 05:49:08 +03:00
|
|
|
@$(CPP) $(CPPFLAGS) $< -MM -MT $(@:.d=.o) >$@
|
2020-10-11 17:05:00 +03:00
|
|
|
|
|
|
|
|
|
|
|
.PHONY: clean
|
|
|
|
clean:
|
|
|
|
$(RM) $(OBJS) $(LIBTARGET)
|
|
|
|
|
2022-09-08 02:11:35 +03:00
|
|
|
.PHONY: cleandep
|
2020-10-11 17:05:00 +03:00
|
|
|
cleandep: clean
|
|
|
|
$(RM) $(DEPS)
|
|
|
|
|
|
|
|
|
|
|
|
.PHONY: install
|
|
|
|
install: build
|
2023-08-19 18:27:48 +03:00
|
|
|
mkdir -p ${DESTDIR}${PREFIX}/idris2-${IDRIS2_VERSION}/support/refc
|
|
|
|
install -m 644 $(LIBTARGET) *.h ${DESTDIR}${PREFIX}/idris2-${IDRIS2_VERSION}/support/refc
|