summaryrefslogtreecommitdiff
path: root/usr/src/lib/libfdisk
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src/lib/libfdisk')
-rw-r--r--usr/src/lib/libfdisk/Makefile11
-rw-r--r--usr/src/lib/libfdisk/Makefile.com66
-rw-r--r--usr/src/lib/libfdisk/amd64/Makefile30
-rw-r--r--usr/src/lib/libfdisk/common/libfdisk.c (renamed from usr/src/lib/libfdisk/i386/libfdisk.c)0
-rw-r--r--usr/src/lib/libfdisk/common/libfdisk.h (renamed from usr/src/lib/libfdisk/i386/libfdisk.h)0
-rw-r--r--usr/src/lib/libfdisk/common/llib-lfdisk (renamed from usr/src/lib/libfdisk/i386/llib-lfdisk)0
-rw-r--r--usr/src/lib/libfdisk/common/mapfile-vers (renamed from usr/src/lib/libfdisk/i386/mapfile-vers)0
-rw-r--r--usr/src/lib/libfdisk/i386/Makefile58
8 files changed, 101 insertions, 64 deletions
diff --git a/usr/src/lib/libfdisk/Makefile b/usr/src/lib/libfdisk/Makefile
index a0b6cf09ca..6f0330b4ad 100644
--- a/usr/src/lib/libfdisk/Makefile
+++ b/usr/src/lib/libfdisk/Makefile
@@ -26,12 +26,12 @@
include ../Makefile.lib
-LIBRARY= libfdisk.a
-VERS= .1
-
HDRS= libfdisk.h
-HDRDIR= $(MACH)
+HDRDIR= common
+
+SUBDIRS= $(MACH)
+$(BUILD64)SUBDIRS += $(MACH64)
all:= TARGET= all
install:= TARGET= install
@@ -42,11 +42,8 @@ _msg:= TARGET= _msg
.KEEP_STATE:
-SUBDIRS= $(MACH)
-
all install clean clobber lint: $(SUBDIRS)
-
# install rule for install_h target
install_h: $(ROOTHDRS)
diff --git a/usr/src/lib/libfdisk/Makefile.com b/usr/src/lib/libfdisk/Makefile.com
new file mode 100644
index 0000000000..f253312c8e
--- /dev/null
+++ b/usr/src/lib/libfdisk/Makefile.com
@@ -0,0 +1,66 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+#
+
+LIBRARY= libfdisk.a
+VERS= .1
+
+OBJECTS= libfdisk.o
+
+# include library definitions
+include ../../Makefile.lib
+
+# install this library in the root filesystem
+include ../../Makefile.rootfs
+
+SRCDIR= ../common
+
+LIBS= $(DYNLIB) $(LINTLIB)
+
+C99MODE= $(C99_DISABLE)
+
+CPPFLAGS += -I.
+LDLIBS += -lc
+
+CFLAGS += -D_LARGEFILE64_SOURCE
+CFLAGS += -D_FILE_OFFSET_BITS=64
+CFLAGS64 += -D_LARGEFILE64_SOURCE
+CFLAGS64 += -D_FILE_OFFSET_BITS=64
+
+LINTFLAGS += -erroff=E_BAD_PTR_CAST_ALIGN
+LINTFLAGS64 += -erroff=E_BAD_PTR_CAST_ALIGN
+
+.KEEP_STATE:
+
+all: $(LIBS)
+
+lint: lintcheck
+
+pics/%.o: ../common/%.c
+ $(COMPILE.c) -o $@ $<
+ $(POST_PROCESS_O)
+
+# include library targets
+include ../../Makefile.targ
diff --git a/usr/src/lib/libfdisk/amd64/Makefile b/usr/src/lib/libfdisk/amd64/Makefile
new file mode 100644
index 0000000000..7aad038610
--- /dev/null
+++ b/usr/src/lib/libfdisk/amd64/Makefile
@@ -0,0 +1,30 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+#
+
+include ../Makefile.com
+include ../../Makefile.lib.64
+
+install: all $(ROOTLIBS64) $(ROOTLINKS64) $(ROOTLINT64)
diff --git a/usr/src/lib/libfdisk/i386/libfdisk.c b/usr/src/lib/libfdisk/common/libfdisk.c
index db6916679b..db6916679b 100644
--- a/usr/src/lib/libfdisk/i386/libfdisk.c
+++ b/usr/src/lib/libfdisk/common/libfdisk.c
diff --git a/usr/src/lib/libfdisk/i386/libfdisk.h b/usr/src/lib/libfdisk/common/libfdisk.h
index c94e2ddf89..c94e2ddf89 100644
--- a/usr/src/lib/libfdisk/i386/libfdisk.h
+++ b/usr/src/lib/libfdisk/common/libfdisk.h
diff --git a/usr/src/lib/libfdisk/i386/llib-lfdisk b/usr/src/lib/libfdisk/common/llib-lfdisk
index ab95e0068d..ab95e0068d 100644
--- a/usr/src/lib/libfdisk/i386/llib-lfdisk
+++ b/usr/src/lib/libfdisk/common/llib-lfdisk
diff --git a/usr/src/lib/libfdisk/i386/mapfile-vers b/usr/src/lib/libfdisk/common/mapfile-vers
index d135c15ffc..d135c15ffc 100644
--- a/usr/src/lib/libfdisk/i386/mapfile-vers
+++ b/usr/src/lib/libfdisk/common/mapfile-vers
diff --git a/usr/src/lib/libfdisk/i386/Makefile b/usr/src/lib/libfdisk/i386/Makefile
index 88d3c52be6..0ef5233f44 100644
--- a/usr/src/lib/libfdisk/i386/Makefile
+++ b/usr/src/lib/libfdisk/i386/Makefile
@@ -24,62 +24,6 @@
#
#
-HDRS = libfdisk.h
-ROOTHDRDIR= $(ROOT)/usr/include
-ROOTHDRS= $(HDRS:%=$(ROOTHDRDIR)/%)
-CHECKDIRS= $(HDRS:%.h=%.check)
-HDRDIR = ./
-
-$(ROOTHDRDIR)/%: %
- $(INS.file)
-
-all := TARGET = all
-install_h:= TARGET = install_h
-
-install_h: $(ROOTHDRS)
-
-LIBRARY= libfdisk.a
-VERS= .1
-
-PICS= pics/libfdisk.o
-
-pics/%.o: %.c
- $(COMPILE.c) -o $@ $<
- $(POST_PROCESS_O)
-
-OBJECTS= \
-libfdisk.o
-
-# include library definitions
-include ../../Makefile.lib
-
-# install this library in the root filesystem
-include ../../Makefile.rootfs
-
-SRCDIR = .
-
-C99MODE= $(C99_DISABLE)
-
-MAPFILES += mapfile-vers
-
-CPPFLAGS += -I.
-LDLIBS += -lc
-
-i386_CFLAGS += -D_LARGEFILE64_SOURCE
-i386_CFLAGS += -D_FILE_OFFSET_BITS=64
-
-LINTFLAGS += -erroff=E_BAD_PTR_CAST_ALIGN
-
-.KEEP_STATE:
-
-LIBS= $(DYNLIB) $(LINTLIB)
-
-all: $(LIBS)
-
-lint: lintcheck
+include ../Makefile.com
install: all $(ROOTLIBS) $(ROOTLINKS) $(ROOTLINT)
-
-
-# include library targets
-include ../../Makefile.targ