2006-03-07 20:23:40 +00:00
|
|
|
include ../Makefile.config
|
|
|
|
include ../Makefile.common
|
|
|
|
|
|
|
|
SRCS = transmission.c bencode.c net.c tracker.c peer.c inout.c \
|
|
|
|
metainfo.c sha1.c utils.c fdlimit.c clients.c completion.c \
|
|
|
|
platform.c ratecontrol.c choking.c
|
|
|
|
OBJS = $(SRCS:%.c=%.o)
|
|
|
|
|
|
|
|
CFLAGS += -D__TRANSMISSION__
|
|
|
|
|
|
|
|
libtransmission.a: $(OBJS)
|
2006-03-07 20:27:16 +00:00
|
|
|
ifeq ($(SYSTEM),Darwin)
|
2006-03-07 20:23:40 +00:00
|
|
|
libtool -static $(OBJS) -o $@
|
2006-03-07 20:27:16 +00:00
|
|
|
else
|
|
|
|
ar ru $@ $(OBJS)
|
|
|
|
ranlib $@
|
|
|
|
endif
|
2006-03-07 20:23:40 +00:00
|
|
|
|
|
|
|
%.o: %.c ../Makefile.config ../Makefile.common Makefile
|
|
|
|
$(CC) $(CFLAGS) -o $@ -c $<
|
|
|
|
|
|
|
|
clean:
|
|
|
|
$(RM) libtransmission.a $(OBJS)
|
|
|
|
|
|
|
|
.depend: $(SRCS) Makefile
|
|
|
|
$(RM) .depend
|
|
|
|
$(foreach SRC, $(SRCS), $(CC) -MM $(SRC) -D__TRANSMISSION__ >> .depend;)
|
|
|
|
|
|
|
|
include .depend
|