xref: /titanic_54/usr/src/cmd/perl/Makefile.targ (revision c9f77c52c0735e65aa2534394c5151cdb963cbef)
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$(MACH):
22	$(INS.dir)
23
24$(PERLEXT): $(MACH)/$(MODULE).o
25	$(BUILD.SO) $(MACH)/$(MODULE).o
26
27$(MACH)/$(MODULE).o: $(MACH)/$(MODULE).c
28	$(COMPILE.c) $(C_PICFLAGS) -I$(PERLINCDIR) $< -o $@
29
30$(MACH)/$(MODULE).c: $(MACH) $(MODULE).xs
31	$(PERLDIR)/bin/xsubpp $(XSUBPPFLAGS) $(MODULE).xs >$@
32
33$(ROOTPERLMODDIR):
34	$(INS.dir)
35
36$(ROOTPERLMOD): $(ROOTPERLMODDIR) $(MODULE).pm
37	$(RM) $@; $(INS) -s -m $(FILEMODE) -f $^
38
39$(ROOTPERLEXTDIR):
40	$(INS.dir)
41
42$(ROOTPERLEXT): $(ROOTPERLEXTDIR) $(MACH)/$(MODULE).so
43	$(RM) $@; $(INS) -s -m $(FILEMODE) -f $^
44