# This code is issued under the GNU General Public License.
# See the file COPYING in this distribution
+DEFS =
+
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 \
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)
-libportals_a_CPPFLAGS = $(LLCPPFLAGS)
-libportals_a_CFLAGS = $(LLCFLAGS)
-endif
-if MODULES
-modulenet_DATA = portals$(KMODEXT)
-endif # MODULES
+if LIBLUSTRE
+libportals_a_CFLAGS= -fPIC
+else
-endif # CRAY_PORTALS
+MODULE = portals
+modulenet_DATA = portals.o
+EXTRA_PROGRAMS = portals
-MOSTLYCLEANFILES = *.o *.ko *.mod.c
-DIST_SOURCES = $(portals-objs:%.o=%.c)
+DISTCLEANFILES = *.orig *.rej
+
+portals_SOURCES= module.c $(my_sources)
+
+# Don't distribute any patched files.
+dist-hook:
+ list='$(EXT2C)'; for f in $$list; do rm -f $(distdir)/$$f; done
+
+include ../Rules.linux
+endif