File: examples.makefile

package info (click to toggle)
libtorrent-rasterbar 2.0.11-3
  • links: PTS
  • area: main
  • in suites: forky, sid
  • size: 18,304 kB
  • sloc: cpp: 190,670; python: 7,142; makefile: 1,374; ansic: 574; sh: 317; xml: 104
file content (50 lines) | stat: -rw-r--r-- 1,563 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#!/usr/bin/make -f
#
# Simple makefile for libtorrent-rasterbar's examples.
# Copyright © 2009 Cristian Greco <cristian.debian@gmail.com>
# This file is released in the public domain.
#
# Please note that you need to install the following packages in order to build
# these example programs:
#  - libtorrent-rasterbar-dev
#  - libboost-program-options*-dev
#  - libboost-regex*-dev
# (where the `*' means the same version of boost development packages which
# libtorrent-rasterbar-dev actually depends on).

CXX = g++

CXXFLAGS = -ftemplate-depth-50 -DBOOST_MULTI_INDEX_DISABLE_SERIALIZATION

TORRENT_CFLAGS = $(shell pkg-config libtorrent-rasterbar --cflags)
TORRENT_LIBS = $(shell pkg-config libtorrent-rasterbar --libs)

BOOST_PROGRAM_OPTIONS_LIBS = -lboost_program_options-mt
BOOST_REGEX_LIBS = -lboost_regex-mt

examples_BIN = client_test dump_torrent make_torrent simple_client enum_if

all: $(examples_BIN)

client_test: client_test.cpp
	@rm -f client_test
	$(CXX) $(CXXFLAGS) $(TORRENT_CFLAGS) -o $@ $<  $(TORRENT_LIBS) $(BOOST_PROGRAM_OPTIONS_LIBS) $(BOOST_REGEX_LIBS)

dump_torrent: dump_torrent.cpp
	@rm -f dump_torrent
	$(CXX) $(CXXFLAGS) $(TORRENT_CFLAGS) -o $@ $< $(TORRENT_LIBS)

make_torrent: make_torrent.cpp
	@rm -f make_torrent
	$(CXX) $(CXXFLAGS) $(TORRENT_CFLAGS) -o $@ $< $(TORRENT_LIBS)

simple_client: simple_client.cpp
	@rm -f simple_client
	$(CXX) $(CXXFLAGS) $(TORRENT_CFLAGS) -o $@ $< $(TORRENT_LIBS)

enum_if: enum_if.cpp
	@rm -f enum_if
	$(CXX) $(CXXFLAGS) $(TORRENT_CFLAGS) -o $@ $< $(TORRENT_LIBS)

clean:
	@rm -f $(examples_BIN)