xref: /titanic_50/usr/src/cmd/perl/Makefile.targ (revision 0b5ce10aee80822ecc7df77df92a5e24078ba196)
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#
14
15# Link against libc as perl solaris specs
16$(PERLEXT):= LDLIBS += -lc
17
18# Allow for undefined symbols satisfied by perl
19$(PERLEXT):= ZDEFS =
20
21$(ROOTPERLEXT) := FILEMODE = 0555
22$(ROOTPERLMOD) := FILEMODE = 0444
23
24$(MACH):
25	$(INS.dir)
26
27$(PERLEXT): $(MACH)/$(MODULE).o
28	$(BUILD.SO) $(MACH)/$(MODULE).o
29
30$(MACH)/$(MODULE).o: $(MACH)/$(MODULE).c
31	$(COMPILE.c) $(C_PICFLAGS) -I$(PERLINCDIR) $< -o $@
32
33$(MACH)/$(MODULE).c: $(MACH) $(MODULE).xs
34	$(PERLDIR)/bin/xsubpp $(XSUBPPFLAGS) $(MODULE).xs >$@
35
36$(ROOTPERLMODDIR):
37	$(INS.dir)
38
39$(ROOTPERLMOD): $(ROOTPERLMODDIR) $(MODULE).pm
40	$(RM) $@; $(INS) -s -m $(FILEMODE) -f $^
41
42$(ROOTPERLEXTDIR):
43	$(INS.dir)
44
45$(ROOTPERLEXT): $(ROOTPERLEXTDIR) $(MACH)/$(MODULE).so
46	$(RM) $@; $(INS) -s -m $(FILEMODE) -f $^
47