Skip to content
Newer
Older
100644 50 lines (36 sloc) 1.25 KB
cf4f7ee @alanmcgovern Simplify the makefile build system so it uses xbuild instead
alanmcgovern authored
1 CONFIG=config.make
2
3 XBUILD=xbuild
4 XBUILD_ARGS=/verbosity:quiet /nologo /property:Configuration=$(MONOTORRENT_PROFILE)
5 MAIN_SLN=src/MonoTorrent.sln
6 DIST_FILE=monotorrent-$(MONOTORRENT_VERSION).tar.gz
7
8 all:
9 @echo Building $(MAIN_SLN)
10 @$(XBUILD) $(XBUILD_ARGS) $(MAIN_SLN)
11
12 clean:
13 @echo Cleaning $(MAIN_SLN)
14 @$(XBUILD) $(XBUILD_ARGS) $(MAIN_SLN) /t:Clean
15
16 dist:
17 git archive --format=tar HEAD | gzip > $(DIST_FILE)
18
19 dist-clean:
20 rm -f $(DIST_FILE)
21
22 dist-check:
23
24 install: $(CONFIG)
25 @echo Installing MonoTorrent libraries
26 mkdir -p $(DESTDIR)$(MONOTORRENT_INSTALL_DIR)
27 cp -R build/MonoTorrent/$(MONOTORRENT_PROFILE)/* $(DESTDIR)$(MONOTORRENT_INSTALL_DIR)/
28
29 @echo Installing pc files
30 mkdir -p $(DESTDIR)$(pkgconfigdir)
31 cp src/MonoTorrent/monotorrent.pc $(DESTDIR)$(pkgconfigdir)/
32 cp src/MonoTorrent.Dht/monotorrent.dht.pc $(DESTDIR)$(pkgconfigdir)/
33
34 uninstall: $(CONFIG)
35 @echo Removing MonoTorrent libraries
36 rm -rf $(DESTDIR)/$(libdir)/monotorrent
37 @echo Removing MonoTorrent pc files
38 rm -f $(DESTDIR)$(pkgconfigdir)/monotorrent.pc
39 rm -f $(DESTDIR)$(pkgconfigdir)/monotorrent.dht.pc
40
41 $(CONFIG):
42 @if ! test -e "$(CONFIG)"; then \
43 echo "You must run configure first" && exit 1; \
44 fi
45
46
47 include $(CONFIG)
48
533e9db @alanmcgovern Add 'uninstall' as a phony target
alanmcgovern authored
49 .PHONY: all clean dist dist-clean dist-check install uninstall
Something went wrong with that request. Please try again.