forked from tsee/ZeroMQ-Perl
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile.PL
75 lines (66 loc) · 1.72 KB
/
Makefile.PL
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
use 5.008;
use ExtUtils::MakeMaker;
use ExtUtils::Constant 'WriteConstants';
use File::Spec;
my $CC = 'g++';
WriteConstants( # NOTE: keep this in sync with lib/ZeroMQ.pm
NAME => 'ZeroMQ',
NAMES => [
# socket types
qw(
ZMQ_REQ ZMQ_REP
ZMQ_PUB ZMQ_SUB
ZMQ_DOWNSTREAM ZMQ_UPSTREAM
ZMQ_PAIR
),
# socket recv flags
qw(
ZMQ_NOBLOCK
),
# get/setsockopt options
qw(
ZMQ_RCVMORE
ZMQ_HWM
ZMQ_SWAP
ZMQ_AFFINITY
ZMQ_IDENTITY
ZMQ_RATE
ZMQ_RECOVERY_IVL
ZMQ_MCAST_LOOP
ZMQ_SNDBUF
ZMQ_RCVBUF
ZMQ_SUBSCRIBE
ZMQ_UNSUBSCRIBE
),
],
);
# See lib/ExtUtils/MakeMaker.pm for details of how to influence
# the contents of the Makefile that is written.
WriteMakefile(
NAME => 'ZeroMQ',
VERSION_FROM => 'lib/ZeroMQ.pm', # finds $VERSION
PREREQ_PM => {
'ExtUtils::XSpp' => '0.11_02',
'Storable' => '0',
},
($] >= 5.005 ? ## Add these new keywords supported since 5.005
(ABSTRACT_FROM => 'lib/ZeroMQ.pm', # retrieve abstract from module
AUTHOR => 'Steffen Mueller <[email protected]>') : ()),
LIBS => ['-lzmq'], # e.g., '-lm'
DEFINE => '-O2', # e.g., '-DHAVE_SOMETHING'
INC => '-I.', # e.g., '-I. -I/usr/include/other'
OBJECT => '$(O_FILES)', # link all the C files too
'XSOPT' => '-C++ -hiertype',
'TYPEMAPS' => ['perlobject.map'],
'CC' => $CC,
'LD' => '$(CC)',
META_MERGE => {
# no_index => { directory => 'buildtools', },
configure_requires => {
'ExtUtils::Constant' => '0',
},
},
clean => {
FILES => "const-*.inc",
},
);