1# 2# CDDL HEADER START 3# 4# The contents of this file are subject to the terms of the 5# Common Development and Distribution License (the "License"). 6# You may not use this file except in compliance with the License. 7# 8# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9# or http://www.opensolaris.org/os/licensing. 10# See the License for the specific language governing permissions 11# and limitations under the License. 12# 13# When distributing Covered Code, include this CDDL HEADER in each 14# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15# If applicable, add the following below this CDDL HEADER, with the 16# fields enclosed by brackets "[]" replaced with your own identifying 17# information: Portions Copyright [yyyy] [name of copyright owner] 18# 19# CDDL HEADER END 20# 21 22# 23# Copyright 2009 Sun Microsystems, Inc. All rights reserved. 24# Use is subject to license terms. 25# 26# Copyright 2021 OmniOS Community Edition (OmniOSce) Association. 27 28SHELL= /usr/bin/ksh93 29 30LIBRARY= libdll.a 31VERS= .1 32 33include ../Makefile.defs 34 35OBJECTS += $(LIBOBJS) 36 37include $(SRC)/lib/Makefile.lib 38include ../../Makefile.ast 39 40MAPFILES= ../mapfile-vers 41 42LIBS= $(DYNLIB) 43 44LDLIBS += -last -lc 45 46# We use "=" here since using $(CPPFLAGS.master) is very tricky in our 47# case - it MUST come as the last element but future changes in -D options 48# may then cause silent breakage in the AST sources because the last -D 49# option specified overrides previous -D options so we prefer the current 50# way to explicitly list each single flag. 51# Notes: 52# - "-D_BLD_DLL" comes from ${mam_cc_DLL} in Mamfile 53CPPFLAGS= \ 54 $(DTEXTDOM) $(DTS_ERRNO) \ 55 $(DLLPLATFORMCPPFLAGS) \ 56 -Iast -I. \ 57 -I$(ROOT)/usr/include/ast \ 58 -I$(ROOT)/usr/include \ 59 '-DCONF_LIBSUFFIX=".so"' \ 60 '-DCONF_LIBPREFIX="lib"' \ 61 -D_PACKAGE_ast \ 62 -D_BLD_DLL \ 63 -D_BLD_dll 64 65CFLAGS += $(ASTCFLAGS) 66CFLAGS64 += $(ASTCFLAGS64) 67 68CERRWARN += -_gcc=-Wno-parentheses 69CERRWARN += -_gcc=-Wno-uninitialized 70 71all: install_h .WAIT $(LIBS) 72 73# 74# libdll is not lint-clean yet; fake up a target. (You can use 75# "make lintcheck" to actually run lint; please send all lint fixes 76# upstream (to AT&T) so the next update will pull them into ON.) 77# 78lint: 79 @ print "usr/src/lib/libdll is not lint-clean: skipping" 80 81include $(SRC)/lib/Makefile.targ 82 83pics/%.o: $(ASTSRC)/%.c 84 $(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $< 85 $(POST_PROCESS_O) 86 87###################################################################### 88# Header file generation 89 90$(HEADERGEN:%=ast/%): FRC 91 $(MKDIR) -p $(@D) 92 src=`echo $(@F:%.h=%) | sed 's/^ast_//'`; \ 93 [[ $$src = dlldefs ]] && src=dll; \ 94 $(AST_PROTO) FEATURE/$$src > $@ 95 $(POST_PROCESS_AST) $@ 96 97install_h: $(HEADERGEN:%=ast/%) 98 99CLOBBERFILES += ast/* 100 101_feature: FRC 102 $(MAKE) -f Makefile.iffe generate 103 104include ../../Makefile.astmsg 105 106FRC: 107