xref: /illumos-gate/usr/src/cmd/perl/Makefile.perl (revision 0cf08013)
1c9f77c52SAndy Stormont#
2c9f77c52SAndy Stormont# This file and its contents are supplied under the terms of the
3c9f77c52SAndy Stormont# Common Development and Distribution License ("CDDL"), version 1.0.
4c9f77c52SAndy Stormont# You may only use this file in accordance with the terms of version
5c9f77c52SAndy Stormont# 1.0 of the CDDL.
6c9f77c52SAndy Stormont#
7c9f77c52SAndy Stormont# A full copy of the text of the CDDL should have accompanied this
8c9f77c52SAndy Stormont# source.  A copy of the CDDL is also available via the Internet at
9c9f77c52SAndy Stormont# http://www.illumos.org/license/CDDL.
10c9f77c52SAndy Stormont#
11c9f77c52SAndy Stormont#
121f2ca518SDan McDonald# Copyright 2015, OmniTI Computer Consulting, Inc. All rights reserved.
130ae9a84fSAndrew Stormont# Copyright 2016 RackTop Systems.
14c9f77c52SAndy Stormont#
15c9f77c52SAndy Stormont
16c9f77c52SAndy Stormontinclude $(SRC)/lib/Makefile.lib
17c9f77c52SAndy Stormont
18c9f77c52SAndy StormontPERLDIR = $(ADJUNCT_PROTO)/usr/perl5/$(PERL_VERSION)
19c9f77c52SAndy StormontPERLLIBDIR = $(PERLDIR)/lib/$(PERL_ARCH)
20c9f77c52SAndy StormontPERLINCDIR = $(PERLLIBDIR)/CORE
210ae9a84fSAndrew StormontPERLLIBDIR64 = $(PERLDIR)/lib/$(PERL_ARCH64)
220ae9a84fSAndrew StormontPERLINCDIR64 = $(PERLLIBDIR64)/CORE
23c9f77c52SAndy Stormont
2490948640SAndrew StormontPERLBINDIR = $(PERLDIR)/bin
2590948640SAndrew StormontPERLBINDIR64 = $(PERLDIR)/bin
2690948640SAndrew Stormont$(BUILDPERL64)PERLBINDIR = $(PERLDIR)/bin/$(MACH)
2790948640SAndrew Stormont$(BUILDPERL32)PERLBINDIR64 = $(PERLDIR)/bin/$(MACH64)
2890948640SAndrew Stormont
29a5619348SRichard LowePERLMOD = ../$(MODULE).pm
30a5619348SRichard LowePERLEXT = $(MODULE).so
31a5619348SRichard LowePERLXS = ../$(MODULE).xs
32c9f77c52SAndy Stormont
33c9f77c52SAndy StormontROOTPERLDIR = $(ROOT)/usr/perl5/$(PERL_VERSION)
34c9f77c52SAndy StormontROOTPERLLIBDIR = $(ROOTPERLDIR)/lib/$(PERL_ARCH)
35c9f77c52SAndy StormontROOTPERLMODDIR = $(ROOTPERLLIBDIR)/Sun/Solaris
36c9f77c52SAndy StormontROOTPERLEXTDIR = $(ROOTPERLLIBDIR)/auto/Sun/Solaris/$(MODULE)
370ae9a84fSAndrew StormontROOTPERLLIBDIR64 = $(ROOTPERLDIR)/lib/$(PERL_ARCH64)
380ae9a84fSAndrew StormontROOTPERLMODDIR64 = $(ROOTPERLLIBDIR64)/Sun/Solaris
390ae9a84fSAndrew StormontROOTPERLEXTDIR64 = $(ROOTPERLLIBDIR64)/auto/Sun/Solaris/$(MODULE)
40c9f77c52SAndy Stormont
41c9f77c52SAndy StormontROOTPERLMOD = $(ROOTPERLMODDIR)/$(MODULE).pm
42c9f77c52SAndy StormontROOTPERLEXT = $(ROOTPERLEXTDIR)/$(MODULE).so
430ae9a84fSAndrew StormontROOTPERLMOD64 = $(ROOTPERLMODDIR64)/$(MODULE).pm
440ae9a84fSAndrew StormontROOTPERLEXT64 = $(ROOTPERLEXTDIR64)/$(MODULE).so
450ae9a84fSAndrew Stormont
4690948640SAndrew StormontXSUBPP = $(PERLBINDIR)/perl $(PERLDIR)/lib/ExtUtils/xsubpp \
470ae9a84fSAndrew Stormont	-typemap $(PERLDIR)/lib/ExtUtils/typemap
4890948640SAndrew StormontXSUBPP64 = $(PERLBINDIR64)/perl $(PERLDIR)/lib/ExtUtils/xsubpp \
490ae9a84fSAndrew Stormont	-typemap $(PERLDIR)/lib/ExtUtils/typemap
50c7893124SRichard Lowe
51a5619348SRichard Lowe# CFLAGS for perl, specifically.
52*0cf08013SMarcel Telka# When building for Perl older than 5.38 we need to define PERL_USE_SAFE_PUTENV
53*0cf08013SMarcel TelkaPERL_USE_SAFE_PUTENV:sh = if test ${PERL_VERSION/5.} -lt 38 ; then echo -DPERL_USE_SAFE_PUTENV ; fi
54a5619348SRichard LowePCFLAGS= -DPERL_EUPXS_ALWAYS_EXPORT -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 \
55*0cf08013SMarcel Telka	$(PERL_USE_SAFE_PUTENV) -D_TS_ERRNO
56a5619348SRichard LowePCFLAGS64= -DPERL_EUPXS_ALWAYS_EXPORT -D_LARGEFILE_SOURCE64 \
57*0cf08013SMarcel Telka	$(PERL_USE_SAFE_PUTENV) -D_TS_ERRNO
58a5619348SRichard Lowe
59bd0ce624SYuri PankovCSTD = $(CSTD_GNU99)
605801b0f0SToomas SoomeZGUIDANCE =
61a5619348SRichard LoweSONAME = $(PERLEXT)
62a5619348SRichard Lowe
63a5619348SRichard LoweCLEANFILES += $(PERLEXT) $(MODULE).o $(MODULE).c
64