2006-05-29 21:21:23 +00:00
|
|
|
# $Id$
|
|
|
|
|
2006-04-05 09:58:35 +00:00
|
|
|
-include Makefile.config
|
|
|
|
ifndef CONFIGURE_RUN
|
|
|
|
$(error You must run ./configure first)
|
|
|
|
endif
|
|
|
|
|
2006-05-29 21:58:22 +00:00
|
|
|
-include Makefile.version
|
|
|
|
include Makefile.common
|
|
|
|
|
2006-04-03 19:29:09 +00:00
|
|
|
ifneq ($(SYSTEM),Darwin)
|
|
|
|
|
2006-04-04 20:23:19 +00:00
|
|
|
TARGETS = .cli
|
2006-04-03 19:29:09 +00:00
|
|
|
ifeq ($(GTK),yes)
|
2006-04-04 20:23:19 +00:00
|
|
|
TARGETS += .gtk
|
2006-04-03 19:29:09 +00:00
|
|
|
endif
|
|
|
|
ifeq ($(SYSTEM),BeOS)
|
2006-04-04 20:23:19 +00:00
|
|
|
TARGETS += .beos
|
2006-04-03 19:29:09 +00:00
|
|
|
endif
|
2006-03-07 20:23:40 +00:00
|
|
|
|
2006-04-04 20:23:19 +00:00
|
|
|
all: $(TARGETS)
|
|
|
|
|
2006-05-29 21:58:22 +00:00
|
|
|
.lib: .version
|
2006-04-04 20:23:19 +00:00
|
|
|
@echo "* Building libtransmission"
|
2006-04-05 09:14:40 +00:00
|
|
|
@$(MAKE) -C libtransmission
|
2006-04-04 20:23:19 +00:00
|
|
|
|
|
|
|
.cli: .lib
|
|
|
|
@echo "* Building Transmission CLI client"
|
2006-04-05 09:14:40 +00:00
|
|
|
@$(MAKE) -C cli
|
2006-04-04 20:23:19 +00:00
|
|
|
|
|
|
|
.gtk: .lib
|
|
|
|
@echo "* Building Transmission GTK+ client"
|
2006-04-05 09:14:40 +00:00
|
|
|
@$(MAKE) -C gtk
|
2006-04-04 20:23:19 +00:00
|
|
|
|
|
|
|
.beos: .lib
|
|
|
|
@echo "* Building Transmission BeOS client"
|
2006-04-05 09:14:40 +00:00
|
|
|
@make -C beos
|
2006-03-07 20:23:40 +00:00
|
|
|
|
2006-04-25 08:14:37 +00:00
|
|
|
install: all $(foreach SUB,$(TARGETS),.install$(SUB))
|
|
|
|
|
|
|
|
.install.cli: .cli
|
|
|
|
@echo "* Installing Transmission CLI client"
|
|
|
|
@$(MAKE) -C cli install
|
|
|
|
|
|
|
|
.install.gtk: .gtk
|
|
|
|
@echo "* Installing Transmission GTK+ client"
|
|
|
|
@$(MAKE) -C gtk install
|
|
|
|
|
|
|
|
.install.beos:
|
|
|
|
|
2006-03-07 20:23:40 +00:00
|
|
|
clean:
|
2006-04-05 09:14:40 +00:00
|
|
|
@$(MAKE) -C libtransmission clean
|
|
|
|
@$(MAKE) -C cli clean
|
2006-04-03 19:29:09 +00:00
|
|
|
ifeq ($(GTK),yes)
|
2006-04-05 09:14:40 +00:00
|
|
|
@$(MAKE) -C gtk clean
|
2006-04-03 19:29:09 +00:00
|
|
|
endif
|
|
|
|
ifeq ($(SYSTEM),BeOS)
|
2006-04-05 09:14:40 +00:00
|
|
|
@$(MAKE) -C beos clean
|
2006-03-07 20:23:40 +00:00
|
|
|
endif
|
|
|
|
|
2006-04-03 19:29:09 +00:00
|
|
|
else
|
|
|
|
|
2006-05-29 21:58:22 +00:00
|
|
|
all: .version
|
2006-04-05 09:14:40 +00:00
|
|
|
@$(MAKE) -C macosx
|
|
|
|
@xcodebuild -alltargets -activeconfiguration | grep -v "^$$"
|
2006-04-03 19:29:09 +00:00
|
|
|
|
|
|
|
clean:
|
2006-04-05 09:14:40 +00:00
|
|
|
@xcodebuild -alltargets -activeconfiguration clean | grep -v "^$$"
|
|
|
|
@$(MAKE) -C macosx clean
|
2006-04-03 19:29:09 +00:00
|
|
|
|
2006-04-09 14:02:54 +00:00
|
|
|
MAKELINK = printf "[InternetShortcut]\nURL=http://transmission.m0k.org%s\n"
|
|
|
|
define PACKAGE_RULE1
|
|
|
|
$(RM) tmp "Transmission $(VERSION_STRING)" \
|
|
|
|
Transmission-$(VERSION_STRING).dmg
|
|
|
|
mkdir -p tmp
|
|
|
|
cp -r macosx/Transmission.app tmp/
|
|
|
|
cp AUTHORS tmp/AUTHORS.txt
|
|
|
|
cp LICENSE tmp/LICENSE.txt
|
|
|
|
cp NEWS tmp/NEWS.txt
|
|
|
|
$(MAKELINK) "/" > tmp/Homepage.url
|
|
|
|
$(MAKELINK) "/forum" > tmp/Forums.url
|
|
|
|
$(MAKELINK) "/contribute.php" > tmp/Contribute.url
|
|
|
|
endef
|
|
|
|
define PACKAGE_RULE2
|
|
|
|
mv tmp "Transmission $(VERSION_STRING)"
|
|
|
|
hdiutil create -format UDZO -srcfolder \
|
|
|
|
"Transmission $(VERSION_STRING)" Transmission-$(VERSION_STRING).dmg
|
|
|
|
rm -rf "Transmission $(VERSION_STRING)"
|
|
|
|
endef
|
2006-04-03 19:29:09 +00:00
|
|
|
|
|
|
|
package:
|
2006-04-09 14:02:54 +00:00
|
|
|
$(PACKAGE_RULE1)
|
|
|
|
$(PACKAGE_RULE2)
|
|
|
|
|
|
|
|
package-release:
|
|
|
|
$(PACKAGE_RULE1)
|
|
|
|
strip -S tmp/Transmission.app/Contents/MacOS/Transmission
|
|
|
|
$(PACKAGE_RULE2)
|
2006-04-03 19:29:09 +00:00
|
|
|
|
|
|
|
endif
|
2006-05-29 21:58:22 +00:00
|
|
|
|
2006-05-29 22:44:21 +00:00
|
|
|
.version: .version1 .version2
|
2006-05-29 21:58:22 +00:00
|
|
|
|
2006-05-29 22:44:21 +00:00
|
|
|
.version1:
|
2006-05-29 21:58:22 +00:00
|
|
|
@echo "Checking SVN revision..."
|
|
|
|
@./version.sh
|
2006-05-29 22:44:21 +00:00
|
|
|
|
|
|
|
.version2:
|
|
|
|
@$(RM) libtransmission/version.h
|
|
|
|
@( echo "#define VERSION_MAJOR $(VERSION_MAJOR)" && \
|
|
|
|
echo "#define VERSION_MINOR $(VERSION_MINOR)" && \
|
|
|
|
echo "#define VERSION_STRING \"$(VERSION_STRING)\"" && \
|
|
|
|
echo "#define VERSION_REVISION $(VERSION_REVISION)" ) > \
|
|
|
|
libtransmission/version.h
|
|
|
|
|
|
|
|
Makefile.version: .version1
|