xref: /titanic_51/usr/src/cmd/sgs/lex/Makefile.targ (revision 3db86aab554edbb4244c8d1a1c90f152eee768af)
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, Version 1.0 only
6# (the "License").  You may not use this file except in compliance
7# with the License.
8#
9# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10# or http://www.opensolaris.org/os/licensing.
11# See the License for the specific language governing permissions
12# and limitations under the License.
13#
14# When distributing Covered Code, include this CDDL HEADER in each
15# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16# If applicable, add the following below this CDDL HEADER, with the
17# fields enclosed by brackets "[]" replaced with your own identifying
18# information: Portions Copyright [yyyy] [name of copyright owner]
19#
20# CDDL HEADER END
21#
22#
23# Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
24# Use is subject to license terms.
25#
26# ident	"%Z%%M%	%I%	%E% SMI"
27#
28# cmd/sgs/lex/Makefile.targ
29#
30
31$(PROG): objs .WAIT $(POBJS)
32	$(LINK.c) $(POBJS) -o $@ $(LDLIBS)
33	$(POST_PROCESS)
34
35$(ROOTCCSBIN)/%: ../common/%
36	$(INS.file)
37
38# conditional assignment of default permissions for the installed
39# DYNLIB/DYNLIBCCC.  Set here and in Makefile.mach, instead of Makefile.lib,
40# because ROOTLIBDIR may be changed in the including makefile after it has
41# included Makefile.lib.
42#
43$(ROOTLIBDIR)/$(DYNLIB) :=	FILEMODE= 755
44$(ROOTLIBDIR)/$(DYNLIBCCC) :=	FILEMODE= 755
45
46$(ROOTLIBDIR64)/$(DYNLIB) :=	FILEMODE= 755
47$(ROOTLIBDIR64)/$(DYNLIBCCC) :=	FILEMODE= 755
48
49# library install rules
50$(ROOTLIBDIR)/%: %
51	$(INS.file)
52$(ROOTLIBDIR64)/%: %
53	$(INS.file)
54
55$(ROOTLIBDIR)/$(LIBLINKS): $(ROOTLIBDIR)/$(LIBLINKS)$(VERS)
56	$(INS.liblink)
57$(ROOTLIBDIR64)/$(LIBLINKS): $(ROOTLIBDIR64)/$(LIBLINKS)$(VERS)
58	$(INS.liblink64)
59
60$(ROOTLIBDIR)/$(LIBLINKSCCC): $(ROOTLIBDIR)/$(LIBLINKSCCC)$(VERS)
61	$(INS.liblinkccc)
62$(ROOTLIBDIR64)/$(LIBLINKSCCC): $(ROOTLIBDIR64)/$(LIBLINKSCCC)$(VERS)
63	$(INS.liblinkccc64)
64
65objs pics:
66	-@mkdir -p $@
67
68$(LIBRARY): objs .WAIT $$(OBJS)
69	$(BUILD.AR)
70	$(POST_PROCESS_A)
71
72$(DYNLIB): $(MAPFILE) pics .WAIT $$(PICS)
73	$(BUILD.SO)
74	$(POST_PROCESS_SO)
75
76$(DYNLIBCCC): pics .WAIT $$(PICS)
77	$(BUILDCCC.SO)
78	$(POST_PROCESS_SO)
79
80objs/%_w.o pics/%_w.o objs/%_e.o pics/%_e.o:	../common/%.c
81	$(COMPILE.c) -o $@ $<
82	$(POST_PROCESS_O)
83
84objs/%.o pics/%.o:	../../whatdir/common/%.c
85	$(COMPILE.c) -o $@ $<
86	$(POST_PROCESS_O)
87
88objs/%.o pics/%.o:	../common/%.c
89	$(COMPILE.c) -o $@ $<
90	$(POST_PROCESS_O)
91
92# install rule for lint library target
93$(ROOTLINTDIR)/%: ../common/%
94	$(INS.file)
95
96$(DYNLINKLIBDIR)/%: %$(VERS)
97	$(INS.liblink)
98
99clean:
100	$(RM) $(POBJS) $(OBJS) $(PICS) $(CLEANFILES)
101
102lint: $(LINTPOUT) $(LINTLIB)
103
104$(LINTPOUT): $(SRCS)
105	$(LINT.c) $(SRCS) > $(LINTPOUT) 2>&1
106
107$(LINTLIB): $(LINTSRCS)
108	$(LINT.c) -o $(LIBNAME) $(LINTSRCS) > $(LINTOUT) 2>&1
109