xref: /titanic_41/usr/src/stand/lib/sa/Makefile (revision e4f5a11d4a234623168c1558fcdf4341e11769e1)
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# Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
23# Use is subject to license terms.
24#
25# ident	"%Z%%M%	%I%	%E% SMI"
26#
27
28LIBRARY		= libsa.a
29LOCOBJS		= assert.o ctype.o errno.o libintl.o malloc.o memlist.o \
30		  standalloc.o stdio.o stdlib.o strdup.o strings.o \
31		  time.o unistd.o
32CMNOBJS		= cache.o diskread.o fsswitch.o promfs.o
33
34sparc_CMNUTILOBJS = memchr.o memmove.o
35CMNUTILOBJS	= $($(MACH)_CMNUTILOBJS) \
36		  bsearch.o memcmp.o memcpy.o memset.o qsort.o \
37		  string.o strtol.o strtoul.o
38
39i386_MACHOBJS	= get.o map_prog.o
40sparc_MACHOBJS	= prom_misc.o
41MACHOBJS	= $($(MACH)_MACHOBJS)
42
43i386_ASMOBJS	= _setjmp.o samuldiv64.o
44sparc_ASMOBJS	= _setjmp.o
45ASMOBJS		= $($(MACH)_ASMOBJS)
46
47OBJECTS		= $(LOCOBJS) $(CMNOBJS) $(CMNUTILOBJS) $(MACHOBJS) $(ASMOBJS)
48
49include ../Makefile.com
50
51CMNDIR		= ../fs/common
52CMNUTILDIR	= $(TOPDIR)/common/util
53SRCS		= $(LOCOBJS:%.o=$(SRCDIR)/%.c) $(CMNOBJS:%.o=$(CMNDIR)/%.c) \
54	  	  $(CMNUTILOBJS:%.o=$(CMNUTILDIR)/%.c) \
55	  	  $($(MACH)_ASMOBJS:%.o=$(MACH)/%.s) \
56		  $($(MACH)_OBJS:%.o=$(MACH)/%.c)
57
58LDLIBS += -lsock
59CPPFLAGS += $(SOCKCPPFLAGS)
60
61objs/%.o: $(MACH)/%.s
62	  $(COMPILE.s) -o $@ $<
63	  $(POST_PROCESS_O)
64
65objs/%.o: $(MACH)/%.c
66	  $(COMPILE.c) -o $@ $<
67	  $(POST_PROCESS_O)
68
69objs/%.o: $(CMNUTILDIR)/%.c
70	  $(COMPILE.c) -o $@ $<
71	  $(POST_PROCESS_O)
72
73include ../Makefile.targ
74