-# Copyright (C) 2002 Cluster File Systems, Inc.
-#
-# This code is issued under the GNU General Public License.
-# See the file COPYING in this distribution
-
-my_sources = api-eq.c api-init.c api-me.c api-errno.c api-ni.c api-wrap.c \
- lib-dispatch.c lib-init.c lib-me.c lib-msg.c lib-eq.c \
+my_sources = api-errno.c api-ni.c api-wrap.c \
+ lib-init.c lib-me.c lib-msg.c lib-eq.c \
lib-md.c lib-move.c lib-ni.c lib-pid.c
+if !CRAY_PORTALS
+
if LIBLUSTRE
noinst_LIBRARIES= libportals.a
libportals_a_SOURCES= $(my_sources)
endif
if MODULES
+
+if LINUX
modulenet_DATA = portals$(KMODEXT)
-endif
+endif # LINUX
+
+if DARWIN
+macos_PROGRAMS := portals
+
+portals_SOURCES := api-errno.c api-ni.c api-wrap.c
+portals_SOURCES += lib-init.c lib-me.c lib-msg.c lib-eq.c lib-md.c
+portals_SOURCES += lib-move.c lib-ni.c lib-pid.c module.c
+
+portals_CFLAGS := $(EXTRA_KCFLAGS)
+portals_LDFLAGS := $(EXTRA_KLDFLAGS)
+portals_LDADD := $(EXTRA_KLIBS)
+
+plist_DATA := Info.plist
+
+install_data_hook := fix-kext-ownership
+
+endif # DARWIN
+
+endif # MODULES
+
+endif # CRAY_PORTALS
+
+install-data-hook: $(install_data_hook)
+
+EXTRA_DIST := Info.plist
-MOSTLYCLEANFILES = *.o *.ko *.mod.c
+MOSTLYCLEANFILES = .*.flags *.o *.ko *.mod.c portals
DIST_SOURCES = $(portals-objs:%.o=%.c)