blob: b3f5ec9bd326f088e8a9d37e3acc0be05c3bec9f [file] [log] [blame]
Andy Stormontc9f77c52014-01-29 20:53:24 +00001#
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.
Dan McDonald1f2ca512015-02-09 10:59:49 -050013# Copyright 2015, OmniTI Computer Consulting, Inc. All rights reserved.
Andy Stormontc9f77c52014-01-29 20:53:24 +000014#
15
16# Link against libc as perl solaris specs
17$(PERLEXT):= LDLIBS += -lc
18
19# Allow for undefined symbols satisfied by perl
20$(PERLEXT):= ZDEFS =
21
Richard Lowec7893122014-04-06 12:58:12 -040022$(ROOTPERLEXT) := FILEMODE = 0555
23$(ROOTPERLMOD) := FILEMODE = 0444
24
Dan McDonald74515ee2014-05-06 13:53:58 -040025# CFLAGS for perl, specifically.
Dan McDonald1f2ca512015-02-09 10:59:49 -050026PCFLAGS= -DPERL_EUPXS_ALWAYS_EXPORT -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 \
27 -DPERL_USE_SAFE_PUTENV -D_TS_ERRNO
Dan McDonald74515ee2014-05-06 13:53:58 -040028
Andy Stormontc9f77c52014-01-29 20:53:24 +000029$(MACH):
30 $(INS.dir)
31
32$(PERLEXT): $(MACH)/$(MODULE).o
33 $(BUILD.SO) $(MACH)/$(MODULE).o
34
35$(MACH)/$(MODULE).o: $(MACH)/$(MODULE).c
Dan McDonald74515ee2014-05-06 13:53:58 -040036 $(COMPILE.c) $(PCFLAGS) $(C_PICFLAGS) -I$(PERLINCDIR) $< -o $@
Andy Stormontc9f77c52014-01-29 20:53:24 +000037
38$(MACH)/$(MODULE).c: $(MACH) $(MODULE).xs
39 $(PERLDIR)/bin/xsubpp $(XSUBPPFLAGS) $(MODULE).xs >$@
40
41$(ROOTPERLMODDIR):
42 $(INS.dir)
43
44$(ROOTPERLMOD): $(ROOTPERLMODDIR) $(MODULE).pm
45 $(RM) $@; $(INS) -s -m $(FILEMODE) -f $^
46
47$(ROOTPERLEXTDIR):
48 $(INS.dir)
49
50$(ROOTPERLEXT): $(ROOTPERLEXTDIR) $(MACH)/$(MODULE).so
51 $(RM) $@; $(INS) -s -m $(FILEMODE) -f $^