xref: /illumos-gate/usr/src/cmd/perl/Makefile.targ (revision d4f59ae5164748e530cad42bd54b9b909d0c1ee8)
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 2015, OmniTI Computer Consulting, Inc. All rights reserved.
13# Copyright (c) 2016 Racktop Systems.
14# Copyright (c) 2018, Joyent, Inc.
15
16# Link against libc as per solaris specs
17PICS = $(MODULE).o
18LDLIBS += -lc
19# Allow for undefined symbols satisfied by perl
20ZDEFS =
21
22$(ROOTPERLEXT) := FILEMODE = 0555
23$(ROOTPERLMOD) := FILEMODE = 0444
24
25SMATCH=off
26
27.KEEP_STATE:
28
29$(PERLEXT): $(MODULE).o
30	$(BUILD.SO)
31
32$(MODULE).o: $(MODULE).c
33	$(COMPILE.c) $(PCFLAGS) $(C_PICFLAGS) -I$(PERLINCDIR) $< -o $@
34
35$(MODULE).c: $(PERLXS)
36	$(XSUBPP) $(XSUBPPFLAGS) $(PERLXS) -output $@
37
38$(ROOTPERLMODDIR):
39	$(INS.dir)
40
41$(ROOTPERLMOD): $(PERLMOD) $(ROOTPERLMODDIR)
42	$(RM) $@; $(INS) -s -m $(FILEMODE) -f $(@D) $(PERLMOD)
43
44$(ROOTPERLEXTDIR):
45	$(INS.dir)
46
47$(ROOTPERLEXT): $(PERLEXT) $(ROOTPERLEXTDIR)
48	$(RM) $@; $(INS) -s -m $(FILEMODE) -f $(@D) $(PERLEXT)
49
50clean:
51	$(RM) $(CLEANFILES)
52
53clobber: clean
54