1 #
2 # This file and its contents are supplied under the terms of the
3 # Common Development and Distribution License ("CDDL"), version 1.0.
4 # You may only use this file in accordance with the terms of version
5 # 1.0 of the CDDL.
6 #
7 # A full copy of the text of the CDDL should have accompanied this
8 # source. A copy of the CDDL is also available via the Internet at
9 # http://www.illumos.org/license/CDDL.
10 #
11 #
12 # Copyright (c) 2014 Racktop Systems.
13 # Copyright 2015, OmniTI Computer Consulting, Inc. All rights reserved.
14 #
15
16 # Link against libc as perl solaris specs
17 $(PERLEXT):= LDLIBS += -lc
18
19 # Allow for undefined symbols satisfied by perl
20 $(PERLEXT):= ZDEFS =
21
22 $(ROOTPERLEXT) := FILEMODE = 0555
23 $(ROOTPERLMOD) := FILEMODE = 0444
24
25 # CFLAGS for perl, specifically.
26 PCFLAGS= -DPERL_EUPXS_ALWAYS_EXPORT -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 \
27 -DPERL_USE_SAFE_PUTENV -D_TS_ERRNO
28
29 $(MACH):
30 $(INS.dir)
31
32 $(PERLEXT): $(MACH)/$(MODULE).o
33 $(BUILD.SO) $(MACH)/$(MODULE).o
34
35 $(MACH)/$(MODULE).o: $(MACH)/$(MODULE).c
36 $(COMPILE.c) $(PCFLAGS) $(C_PICFLAGS) -I$(PERLINCDIR) $< -o $@
37
38 $(MACH)/$(MODULE).c: $(MACH) $(MODULE).xs
39 $(PERLDIR)/bin/xsubpp $(XSUBPPFLAGS) $(MODULE).xs >$@
40
41 $(ROOTPERLMODDIR):
42 $(INS.dir)
43
44 $(ROOTPERLMOD): $(ROOTPERLMODDIR) $(MODULE).pm
45 $(RM) $@; $(INS) -s -m $(FILEMODE) -f $^
46
47 $(ROOTPERLEXTDIR):
48 $(INS.dir)
49
50 $(ROOTPERLEXT): $(ROOTPERLEXTDIR) $(MACH)/$(MODULE).so
51 $(RM) $@; $(INS) -s -m $(FILEMODE) -f $^
|
1 #
2 # This file and its contents are supplied under the terms of the
3 # Common Development and Distribution License ("CDDL"), version 1.0.
4 # You may only use this file in accordance with the terms of version
5 # 1.0 of the CDDL.
6 #
7 # A full copy of the text of the CDDL should have accompanied this
8 # source. A copy of the CDDL is also available via the Internet at
9 # http://www.illumos.org/license/CDDL.
10 #
11 #
12 # Copyright 2015, OmniTI Computer Consulting, Inc. All rights reserved.
13 # Copyright 2016 RackTop Systems.
14 #
15
16 # Link against libc as perl solaris specs
17 $(PERLEXT):= LDLIBS += -lc
18 $(PERLEXT64):= LDLIBS += -lc
19
20 # Allow for undefined symbols satisfied by perl
21 $(PERLEXT):= ZDEFS =
22 $(PERLEXT64):= ZDEFS =
23
24 $(ROOTPERLEXT) := FILEMODE = 0555
25 $(ROOTPERLMOD) := FILEMODE = 0444
26 $(ROOTPERLEXT64) := FILEMODE = 0555
27 $(ROOTPERLMOD64) := FILEMODE = 0444
28
29 # CFLAGS for perl, specifically.
30 PCFLAGS= -DPERL_EUPXS_ALWAYS_EXPORT -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 \
31 -DPERL_USE_SAFE_PUTENV -D_TS_ERRNO
32 PCFLAGS64= -DPERL_EUPXS_ALWAYS_EXPORT -D_LARGEFILE64_SOURCE \
33 -DPERL_USE_SAFE_PUTENV -D_TS_ERRNO
34
35 $(MACH) $(MACH64):
36 $(INS.dir)
37
38 $(PERLEXT): $(MACH)/$(MODULE).o
39 $(BUILD.SO) $(MACH)/$(MODULE).o
40
41 $(PERLEXT64): $(MACH64)/$(MODULE).o
42 $(BUILD64.SO) $(MACH64)/$(MODULE).o
43
44 # NOTE: With later version of Perl, we need to define PERL_EUPXS_ALWAYS_EXPORT
45 # which is a backward-compatibility definition for the assumes-5.10 stuff here.
46 $(MACH)/$(MODULE).o: $(MACH)/$(MODULE).c
47 $(COMPILE.c) $(PCFLAGS) $(C_PICFLAGS) -I$(PERLINCDIR) $< -o $@
48
49 $(MACH64)/$(MODULE).o: $(MACH64)/$(MODULE).c
50 $(COMPILE64.c) $(PCFLAGS64) $(C_PICFLAGS) -I$(PERLINCDIR64) $< -o $@
51
52 $(MACH)/$(MODULE).c: $(MACH) $(MODULE).xs
53 $(XSUBPP) $(XSUBPPFLAGS) $(MODULE).xs >$@
54
55 $(MACH64)/$(MODULE).c: $(MACH64) $(MODULE).xs
56 $(XSUBPP64) $(XSUBPPFLAGS) $(MODULE).xs >$@
57
58 $(ROOTPERLMODDIR) $(ROOTPERLMODDIR64):
59 $(INS.dir)
60
61 $(ROOTPERLMOD): $(ROOTPERLMODDIR) $(MODULE).pm
62 $(RM) $@; $(INS) -s -m $(FILEMODE) -f $^
63
64 $(ROOTPERLMOD64): $(ROOTPERLMODDIR64) $(MODULE).pm
65 $(RM) $@; $(INS) -s -m $(FILEMODE) -f $^
66
67 $(ROOTPERLEXTDIR) $(ROOTPERLEXTDIR64):
68 $(INS.dir)
69
70 $(ROOTPERLEXT): $(ROOTPERLEXTDIR) $(MACH)/$(MODULE).so
71 $(RM) $@; $(INS) -s -m $(FILEMODE) -f $^
72
73 $(ROOTPERLEXT64): $(ROOTPERLEXTDIR64) $(MACH64)/$(MODULE).so
74 $(RM) $@; $(INS) -s -m $(FILEMODE) -f $^
|