xref: /titanic_44/usr/src/cmd/perl/Makefile.targ (revision 1f2ca518aeecee8616fccc0c46a339773faea7d5)
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#
12c9f77c52SAndy Stormont# Copyright (c) 2014 Racktop Systems.
13*1f2ca518SDan McDonald# Copyright 2015, OmniTI Computer Consulting, Inc. All rights reserved.
14c9f77c52SAndy Stormont#
15c9f77c52SAndy Stormont
16c9f77c52SAndy Stormont# Link against libc as perl solaris specs
17c9f77c52SAndy Stormont$(PERLEXT):= LDLIBS += -lc
18c9f77c52SAndy Stormont
19c9f77c52SAndy Stormont# Allow for undefined symbols satisfied by perl
20c9f77c52SAndy Stormont$(PERLEXT):= ZDEFS =
21c9f77c52SAndy Stormont
22c7893124SRichard Lowe$(ROOTPERLEXT) := FILEMODE = 0555
23c7893124SRichard Lowe$(ROOTPERLMOD) := FILEMODE = 0444
24c7893124SRichard Lowe
2574515eeeSDan McDonald# CFLAGS for perl, specifically.
26*1f2ca518SDan McDonaldPCFLAGS= -DPERL_EUPXS_ALWAYS_EXPORT -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 \
27*1f2ca518SDan McDonald	-DPERL_USE_SAFE_PUTENV -D_TS_ERRNO
2874515eeeSDan McDonald
29c9f77c52SAndy Stormont$(MACH):
30c9f77c52SAndy Stormont	$(INS.dir)
31c9f77c52SAndy Stormont
32c9f77c52SAndy Stormont$(PERLEXT): $(MACH)/$(MODULE).o
33c9f77c52SAndy Stormont	$(BUILD.SO) $(MACH)/$(MODULE).o
34c9f77c52SAndy Stormont
35c9f77c52SAndy Stormont$(MACH)/$(MODULE).o: $(MACH)/$(MODULE).c
3674515eeeSDan McDonald	$(COMPILE.c) $(PCFLAGS) $(C_PICFLAGS) -I$(PERLINCDIR) $< -o $@
37c9f77c52SAndy Stormont
38c9f77c52SAndy Stormont$(MACH)/$(MODULE).c: $(MACH) $(MODULE).xs
39c9f77c52SAndy Stormont	$(PERLDIR)/bin/xsubpp $(XSUBPPFLAGS) $(MODULE).xs >$@
40c9f77c52SAndy Stormont
41c9f77c52SAndy Stormont$(ROOTPERLMODDIR):
42c9f77c52SAndy Stormont	$(INS.dir)
43c9f77c52SAndy Stormont
44c9f77c52SAndy Stormont$(ROOTPERLMOD): $(ROOTPERLMODDIR) $(MODULE).pm
45c9f77c52SAndy Stormont	$(RM) $@; $(INS) -s -m $(FILEMODE) -f $^
46c9f77c52SAndy Stormont
47c9f77c52SAndy Stormont$(ROOTPERLEXTDIR):
48c9f77c52SAndy Stormont	$(INS.dir)
49c9f77c52SAndy Stormont
50c9f77c52SAndy Stormont$(ROOTPERLEXT): $(ROOTPERLEXTDIR) $(MACH)/$(MODULE).so
51c9f77c52SAndy Stormont	$(RM) $@; $(INS) -s -m $(FILEMODE) -f $^
52