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