mirror of
https://github.com/idris-lang/Idris2.git
synced 2024-12-19 09:12:34 +03:00
29 lines
390 B
Makefile
29 lines
390 B
Makefile
|
include $(IDRIS2_CURDIR)/config.mk
|
||
|
|
||
|
TARGET = libcb
|
||
|
|
||
|
SRCS = $(wildcard *.c)
|
||
|
OBJS = $(SRCS:.c=.o)
|
||
|
DEPS = $(OBJS:.o=.d)
|
||
|
|
||
|
|
||
|
all: $(TARGET)$(SHLIB_SUFFIX)
|
||
|
|
||
|
$(TARGET)$(SHLIB_SUFFIX): $(OBJS)
|
||
|
$(CC) -shared $(LDFLAGS) -o $@ $^
|
||
|
|
||
|
|
||
|
-include $(DEPS)
|
||
|
|
||
|
%.d: %.c
|
||
|
@$(CPP) $(CFLAGS) $< -MM -MT $(@:.d=.o) >$@
|
||
|
|
||
|
|
||
|
.PHONY: clean
|
||
|
|
||
|
clean :
|
||
|
rm -f $(OBJS) $(TARGET)$(SHLIB_SUFFIX)
|
||
|
|
||
|
cleandep: clean
|
||
|
rm -f $(DEPS)
|