2006-03-07 20:23:40 +00:00
|
|
|
include Makefile.config
|
|
|
|
include Makefile.common
|
|
|
|
|
2006-04-03 19:29:09 +00:00
|
|
|
ifneq ($(SYSTEM),Darwin)
|
|
|
|
|
2006-03-07 20:23:40 +00:00
|
|
|
SRCS = transmissioncli.c
|
|
|
|
OBJS = $(SRCS:%.c=%.o)
|
|
|
|
|
|
|
|
CFLAGS += -Ilibtransmission
|
|
|
|
|
2006-04-03 19:29:09 +00:00
|
|
|
all: transmissioncli transmission-gtk transmission-beos
|
|
|
|
|
|
|
|
lib:
|
|
|
|
$(MAKE) -C libtransmission
|
2006-03-07 20:23:40 +00:00
|
|
|
|
|
|
|
transmissioncli: lib $(OBJS)
|
|
|
|
$(CC) -o $@ $(OBJS) libtransmission/libtransmission.a $(LDFLAGS)
|
|
|
|
|
2006-04-03 19:29:09 +00:00
|
|
|
transmission-gtk:
|
|
|
|
ifeq ($(GTK),yes)
|
|
|
|
$(MAKE) -C gtk
|
|
|
|
endif
|
|
|
|
|
|
|
|
transmission-beos:
|
|
|
|
ifeq ($(SYSTEM),BeOS)
|
|
|
|
$(MAKE) -C beos
|
|
|
|
endif
|
2006-03-07 20:23:40 +00:00
|
|
|
|
|
|
|
%.o: %.c Makefile.config Makefile.common Makefile
|
|
|
|
$(CC) $(CFLAGS) -o $@ -c $<
|
|
|
|
|
|
|
|
clean:
|
|
|
|
$(RM) transmissioncli $(OBJS)
|
|
|
|
$(MAKE) -C libtransmission clean
|
2006-04-03 19:29:09 +00:00
|
|
|
ifeq ($(GTK),yes)
|
|
|
|
$(MAKE) -C gtk clean
|
|
|
|
endif
|
|
|
|
ifeq ($(SYSTEM),BeOS)
|
|
|
|
$(MAKE) -C beos clean
|
2006-03-07 20:23:40 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
.depend: $(SRCS) Makefile
|
|
|
|
$(RM) .depend
|
|
|
|
$(foreach SRC, $(SRCS), $(CC) -MM -Ilibtransmission $(SRC) >> .depend;)
|
|
|
|
|
|
|
|
include .depend
|
2006-04-03 19:29:09 +00:00
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
all:
|
|
|
|
make -C macosx
|
|
|
|
xcodebuild -alltargets -activeconfiguration | grep -v "^$$"
|
|
|
|
|
|
|
|
clean:
|
|
|
|
xcodebuild -alltargets -activeconfiguration clean | grep -v "^$$"
|
|
|
|
make -C macosx clean
|
|
|
|
|
|
|
|
MAKELINK = printf "[InternetShortcut]\nURL=http://%s\n"
|
|
|
|
|
|
|
|
package:
|
|
|
|
$(RM) tmp "Transmission $(VERSION_STRING)" \
|
|
|
|
Transmission-$(VERSION_STRING).dmg && \
|
|
|
|
mkdir -p tmp && \
|
|
|
|
cp -r Transmission.app tmp/ && \
|
|
|
|
cp AUTHORS tmp/AUTHORS.txt && \
|
|
|
|
cp LICENSE tmp/LICENSE.txt && \
|
|
|
|
cp NEWS tmp/NEWS.txt && \
|
|
|
|
strip -S tmp/Transmission.app/Contents/MacOS/Transmission && \
|
|
|
|
$(MAKELINK) "transmission.m0k.org/" > tmp/Homepage.url && \
|
|
|
|
$(MAKELINK) "transmission.m0k.org/forum" > tmp/Forums.url && \
|
|
|
|
$(MAKELINK) "transmission.m0k.org/contribute.php" > tmp/Contribute.url && \
|
|
|
|
mv tmp "Transmission $(VERSION_STRING)" && \
|
|
|
|
hdiutil create -format UDZO -srcfolder \
|
|
|
|
"Transmission $(VERSION_STRING)" Transmission-$(VERSION_STRING).dmg && \
|
|
|
|
rm -rf "Transmission $(VERSION_STRING)"
|
|
|
|
|
|
|
|
endif
|