xref: /titanic_44/usr/src/cmd/perl/Makefile.targ (revision c9f77c52c0735e65aa2534394c5151cdb963cbef)
1*c9f77c52SAndy Stormont#
2*c9f77c52SAndy Stormont# This file and its contents are supplied under the terms of the
3*c9f77c52SAndy Stormont# Common Development and Distribution License ("CDDL"), version 1.0.
4*c9f77c52SAndy Stormont# You may only use this file in accordance with the terms of version
5*c9f77c52SAndy Stormont# 1.0 of the CDDL.
6*c9f77c52SAndy Stormont#
7*c9f77c52SAndy Stormont# A full copy of the text of the CDDL should have accompanied this
8*c9f77c52SAndy Stormont# source.  A copy of the CDDL is also available via the Internet at
9*c9f77c52SAndy Stormont# http://www.illumos.org/license/CDDL.
10*c9f77c52SAndy Stormont#
11*c9f77c52SAndy Stormont#
12*c9f77c52SAndy Stormont# Copyright (c) 2014 Racktop Systems.
13*c9f77c52SAndy Stormont#
14*c9f77c52SAndy Stormont
15*c9f77c52SAndy Stormont# Link against libc as perl solaris specs
16*c9f77c52SAndy Stormont$(PERLEXT):= LDLIBS += -lc
17*c9f77c52SAndy Stormont
18*c9f77c52SAndy Stormont# Allow for undefined symbols satisfied by perl
19*c9f77c52SAndy Stormont$(PERLEXT):= ZDEFS =
20*c9f77c52SAndy Stormont
21*c9f77c52SAndy Stormont$(MACH):
22*c9f77c52SAndy Stormont	$(INS.dir)
23*c9f77c52SAndy Stormont
24*c9f77c52SAndy Stormont$(PERLEXT): $(MACH)/$(MODULE).o
25*c9f77c52SAndy Stormont	$(BUILD.SO) $(MACH)/$(MODULE).o
26*c9f77c52SAndy Stormont
27*c9f77c52SAndy Stormont$(MACH)/$(MODULE).o: $(MACH)/$(MODULE).c
28*c9f77c52SAndy Stormont	$(COMPILE.c) $(C_PICFLAGS) -I$(PERLINCDIR) $< -o $@
29*c9f77c52SAndy Stormont
30*c9f77c52SAndy Stormont$(MACH)/$(MODULE).c: $(MACH) $(MODULE).xs
31*c9f77c52SAndy Stormont	$(PERLDIR)/bin/xsubpp $(XSUBPPFLAGS) $(MODULE).xs >$@
32*c9f77c52SAndy Stormont
33*c9f77c52SAndy Stormont$(ROOTPERLMODDIR):
34*c9f77c52SAndy Stormont	$(INS.dir)
35*c9f77c52SAndy Stormont
36*c9f77c52SAndy Stormont$(ROOTPERLMOD): $(ROOTPERLMODDIR) $(MODULE).pm
37*c9f77c52SAndy Stormont	$(RM) $@; $(INS) -s -m $(FILEMODE) -f $^
38*c9f77c52SAndy Stormont
39*c9f77c52SAndy Stormont$(ROOTPERLEXTDIR):
40*c9f77c52SAndy Stormont	$(INS.dir)
41*c9f77c52SAndy Stormont
42*c9f77c52SAndy Stormont$(ROOTPERLEXT): $(ROOTPERLEXTDIR) $(MACH)/$(MODULE).so
43*c9f77c52SAndy Stormont	$(RM) $@; $(INS) -s -m $(FILEMODE) -f $^
44