xref: /titanic_51/usr/src/lib/iconv_modules/Makefile.iconv (revision 91e1e26ac6a73ce959289cf7d3d96c4baedbe0b8)
1*91e1e26aSAlexander Pyhalov#
2*91e1e26aSAlexander Pyhalov# CDDL HEADER START
3*91e1e26aSAlexander Pyhalov#
4*91e1e26aSAlexander Pyhalov# The contents of this file are subject to the terms of the
5*91e1e26aSAlexander Pyhalov# Common Development and Distribution License (the "License").
6*91e1e26aSAlexander Pyhalov# You may not use this file except in compliance with the License.
7*91e1e26aSAlexander Pyhalov#
8*91e1e26aSAlexander Pyhalov# You can obtain a copy of the license at src/OPENSOLARIS.LICENSE
9*91e1e26aSAlexander Pyhalov# or http://www.opensolaris.org/os/licensing.
10*91e1e26aSAlexander Pyhalov# See the License for the specific language governing permissions
11*91e1e26aSAlexander Pyhalov# and limitations under the License.
12*91e1e26aSAlexander Pyhalov#
13*91e1e26aSAlexander Pyhalov# When distributing Covered Code, include this CDDL HEADER in each
14*91e1e26aSAlexander Pyhalov# file and include the License file at src/OPENSOLARIS.LICENSE.
15*91e1e26aSAlexander Pyhalov# If applicable, add the following below this CDDL HEADER, with the
16*91e1e26aSAlexander Pyhalov# fields enclosed by brackets "[]" replaced with your own identifying
17*91e1e26aSAlexander Pyhalov# information: Portions Copyright [yyyy] [name of copyright owner]
18*91e1e26aSAlexander Pyhalov#
19*91e1e26aSAlexander Pyhalov# CDDL HEADER END
20*91e1e26aSAlexander Pyhalov#
21*91e1e26aSAlexander Pyhalov#
22*91e1e26aSAlexander Pyhalov#
23*91e1e26aSAlexander Pyhalov# Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
24*91e1e26aSAlexander Pyhalov# Use is subject to license terms.
25*91e1e26aSAlexander Pyhalov#
26*91e1e26aSAlexander Pyhalov
27*91e1e26aSAlexander Pyhalov# common makefile to handle the most common parts of code: i.e.
28*91e1e26aSAlexander Pyhalov# copying static files from the src dir to the proto dir.
29*91e1e26aSAlexander Pyhalov
30*91e1e26aSAlexander Pyhalovinclude $(SRC)/Makefile.master
31*91e1e26aSAlexander Pyhalov
32*91e1e26aSAlexander Pyhalovall:=		TARGET= all
33*91e1e26aSAlexander Pyhalovinstall :=	TARGET= install
34*91e1e26aSAlexander Pyhalovclean :=	TARGET= clean
35*91e1e26aSAlexander Pyhalovclobber :=	TARGET= clobber
36*91e1e26aSAlexander Pyhalov
37*91e1e26aSAlexander PyhalovOBJS		= $(SRCS:%.c=%.o)
38*91e1e26aSAlexander PyhalovPROGS		= $(OBJS:%.o=%.so)
39*91e1e26aSAlexander Pyhalov
40*91e1e26aSAlexander PyhalovCREATE_LINKS = .links_created
41*91e1e26aSAlexander Pyhalov
42*91e1e26aSAlexander PyhalovCLEANFILES	= *.o *.so.* *.so $(CREATE_LINKS)
43*91e1e26aSAlexander Pyhalov
44*91e1e26aSAlexander PyhalovPROTOCLEANFILES = $(ICONV_LIBS) $(ICONV_LIBS_64)
45*91e1e26aSAlexander Pyhalov
46*91e1e26aSAlexander PyhalovCFLAGS		+= -I../../inc -I. -I../../common $(C_PICFLAGS) $(GSHARED)
47*91e1e26aSAlexander PyhalovCFLAGS		+= -I$(ADJUNCT_PROTO)/usr/include
48*91e1e26aSAlexander Pyhalov
49*91e1e26aSAlexander PyhalovDYNFLAGS=	$(GSHARED) $(ZTEXT) $(ZDEFS) $(BDIRECT) \
50*91e1e26aSAlexander Pyhalov		$(MAPFILES:%=-M%) $(MAPFILE.PGA:%=-M%) $(MAPFILE.NED:%=-M%)
51*91e1e26aSAlexander Pyhalov
52*91e1e26aSAlexander PyhalovLDLIBS=		-lc
53*91e1e26aSAlexander Pyhalov
54*91e1e26aSAlexander PyhalovICONV_DIR	= $(ROOT)/usr/lib/iconv
55*91e1e26aSAlexander Pyhalov
56*91e1e26aSAlexander PyhalovICONV_DIR_64 	= $(ROOT)/usr/lib/iconv/$(MACH64)
57*91e1e26aSAlexander Pyhalov
58*91e1e26aSAlexander PyhalovICONV_LIBS	= $(PROGS:%=$(ICONV_DIR)/%)
59*91e1e26aSAlexander Pyhalov
60*91e1e26aSAlexander PyhalovICONV_LIBS_64	= $(PROGS:%=$(ICONV_DIR_64)/%)
61*91e1e26aSAlexander Pyhalov
62*91e1e26aSAlexander Pyhalov$(ICONV_LIBS) :=      FILEMODE= 755
63*91e1e26aSAlexander Pyhalov
64*91e1e26aSAlexander Pyhalov$(ICONV_LIBS_64) :=      FILEMODE= 755
65*91e1e26aSAlexander Pyhalov
66*91e1e26aSAlexander Pyhalov$(ICONV_DIR) $(ICONV_DIR_64):
67*91e1e26aSAlexander Pyhalov	$(INS.dir) $@
68*91e1e26aSAlexander Pyhalov
69*91e1e26aSAlexander Pyhalov$(ICONV_DIR)/%: %
70*91e1e26aSAlexander Pyhalov	$(INS.file)
71*91e1e26aSAlexander Pyhalov
72*91e1e26aSAlexander Pyhalov$(ICONV_DIR_64)/%: %
73*91e1e26aSAlexander Pyhalov	$(INS.file)
74*91e1e26aSAlexander Pyhalov
75*91e1e26aSAlexander Pyhalov$(ICONV_DIR)/%: ../%
76*91e1e26aSAlexander Pyhalov	$(INS.file)
77*91e1e26aSAlexander Pyhalov
78*91e1e26aSAlexander Pyhalov%.so: %.o
79*91e1e26aSAlexander Pyhalov	$(CC) $(CFLAGS) $(DYNFLAGS) $(LDLIBS) -o $@ $(@:%.so=%.o)
80*91e1e26aSAlexander Pyhalov	$(POST_PROCESS_SO)
81*91e1e26aSAlexander Pyhalov
82*91e1e26aSAlexander Pyhalov%.o: ../%.c
83*91e1e26aSAlexander Pyhalov	$(CC) $(CFLAGS) -c -o $@ $(@:%.o=../%.c)
84*91e1e26aSAlexander Pyhalov	$(POST_PROCESS_O)
85*91e1e26aSAlexander Pyhalov
86*91e1e26aSAlexander Pyhalov%.o: ../common/%.c
87*91e1e26aSAlexander Pyhalov	$(CC) $(CFLAGS) -c -o $@ $(@:%.o=../common/%.c)
88*91e1e26aSAlexander Pyhalov	$(POST_PROCESS_O)
89*91e1e26aSAlexander Pyhalov
90*91e1e26aSAlexander Pyhalov%.o: %.c
91*91e1e26aSAlexander Pyhalov	$(CC) $(CFLAGS) -c -o $@ $(@:%.o=%.c)
92*91e1e26aSAlexander Pyhalov	$(POST_PROCESS_O)
93*91e1e26aSAlexander Pyhalov
94*91e1e26aSAlexander Pyhalovlint: FRC
95*91e1e26aSAlexander Pyhalov
96*91e1e26aSAlexander Pyhalovclean:
97*91e1e26aSAlexander Pyhalov	$(RM) $(CLEANFILES)
98*91e1e26aSAlexander Pyhalov
99*91e1e26aSAlexander Pyhalovclobber: clean
100*91e1e26aSAlexander Pyhalov	$(RM) $(PROTOCLEANFILES)
101*91e1e26aSAlexander Pyhalov
102*91e1e26aSAlexander PyhalovFRC:
103