diff --git a/Makefile.am b/Makefile.am index 7abb6ee39b..1d219cd85a 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,9 +1,10 @@ AUTOMAKE_OPTIONS = foreign dist-zip -SUBDIRS = src include scripts +SUBDIRS = lib cmd modules include scripts CONFIG_CLEAN_FILES = aclocal.m4 config.guess config.sub CONFIG_CLEAN_FILES += depcomp install-sh missing mkinstalldirs EXTRA_DIST = autogen.sh rpms: dist Makefile rpmbuild -ta $(distdir).tar.gz + diff --git a/cmd/Makefile.am b/cmd/Makefile.am index ae3961a977..f211db18f2 100644 --- a/cmd/Makefile.am +++ b/cmd/Makefile.am @@ -2,4 +2,4 @@ AM_CFLAGS = -g -O2 -W -Wall -Wstrict-prototypes -Wshadow INCLUDES = -I$(top_srcdir)/include sbin_PROGRAMS = splat splat_SOURCES = splat.c -splat_LDFLAGS = $(top_builddir)/src/lib/libcommon.la +splat_LDFLAGS = $(top_builddir)/lib/libcommon.la diff --git a/configure.ac b/configure.ac index 215b5091c1..3992520ac8 100644 --- a/configure.ac +++ b/configure.ac @@ -109,11 +109,11 @@ AC_SUBST(KERNELCPPFLAGS) AC_SUBST(KERNELCFLAGS) AC_CONFIG_FILES([ Makefile - src/Makefile - src/lib/Makefile - src/cmd/Makefile - src/spl/Makefile - src/splat/Makefile + lib/Makefile + cmd/Makefile + modules/Makefile + modules/spl/Makefile + modules/splat/Makefile include/Makefile scripts/Makefile scripts/spl.spec diff --git a/modules/Makefile.in b/modules/Makefile.in new file mode 100644 index 0000000000..f1cb0ca46a --- /dev/null +++ b/modules/Makefile.in @@ -0,0 +1,12 @@ +subdir-m += spl +subdir-m += splat + +all: + $(MAKE) -C @kernelsrc@ SUBDIRS=`pwd` @KERNELMAKE_PARAMS@ modules + +install uninstall clean distclean maintainer-clean distdir: + $(MAKE) -C @kernelsrc@ SUBDIRS=`pwd` @KERNELMAKE_PARAMS@ $@ + + + + diff --git a/spl/Makefile.in b/modules/spl/Makefile.in similarity index 88% rename from spl/Makefile.in rename to modules/spl/Makefile.in index 82b45a287a..134d88227f 100644 --- a/spl/Makefile.in +++ b/modules/spl/Makefile.in @@ -13,13 +13,12 @@ spl-objs += linux-kmem.o spl-objs += linux-thread.o spl-objs += linux-taskq.o spl-objs += linux-rwlock.o +spl-objs += linux-generic.o splmodule := spl.ko splmoduledir := @kmoduledir@/kernel/lib/ -all: all-spec - -install: all +install: mkdir -p $(DESTDIR)$(splmoduledir) $(INSTALL) -m 644 $(splmodule) $(DESTDIR)$(splmoduledir)/$(splmodule) -/sbin/depmod -a @@ -39,6 +38,3 @@ maintainer-clean: distclean distdir: $(DISTFILES) cp -p $(DISTFILES) $(distdir) - -all-spec: - $(MAKE) -C @kernelsrc@ SUBDIRS=`pwd` @KERNELMAKE_PARAMS@ modules diff --git a/spl/linux-generic.c b/modules/spl/linux-generic.c similarity index 100% rename from spl/linux-generic.c rename to modules/spl/linux-generic.c diff --git a/spl/linux-kmem.c b/modules/spl/linux-kmem.c similarity index 100% rename from spl/linux-kmem.c rename to modules/spl/linux-kmem.c diff --git a/spl/linux-rwlock.c b/modules/spl/linux-rwlock.c similarity index 100% rename from spl/linux-rwlock.c rename to modules/spl/linux-rwlock.c diff --git a/spl/linux-taskq.c b/modules/spl/linux-taskq.c similarity index 100% rename from spl/linux-taskq.c rename to modules/spl/linux-taskq.c diff --git a/spl/linux-thread.c b/modules/spl/linux-thread.c similarity index 100% rename from spl/linux-thread.c rename to modules/spl/linux-thread.c diff --git a/splat/Makefile.in b/modules/splat/Makefile.in similarity index 91% rename from splat/Makefile.in rename to modules/splat/Makefile.in index ebc0fb6cf5..54155c8de2 100644 --- a/splat/Makefile.in +++ b/modules/splat/Makefile.in @@ -23,9 +23,7 @@ splat-objs += splat-time.o splatmodule := splat.ko splatmoduledir := @kmoduledir@/kernel/lib/ -all: all-spec - -install: all +install: mkdir -p $(DESTDIR)$(splatmoduledir) $(INSTALL) -m 644 $(splatmodule) $(DESTDIR)$(splatmoduledir)/$(splatmodule) -/sbin/depmod -a @@ -45,6 +43,3 @@ maintainer-clean: distclean distdir: $(DISTFILES) cp -p $(DISTFILES) $(distdir) - -all-spec: - $(MAKE) -C @kernelsrc@ SUBDIRS=`pwd` @KERNELMAKE_PARAMS@ modules diff --git a/splat/splat-condvar.c b/modules/splat/splat-condvar.c similarity index 100% rename from splat/splat-condvar.c rename to modules/splat/splat-condvar.c diff --git a/splat/splat-ctl.c b/modules/splat/splat-ctl.c similarity index 100% rename from splat/splat-ctl.c rename to modules/splat/splat-ctl.c diff --git a/splat/splat-kmem.c b/modules/splat/splat-kmem.c similarity index 100% rename from splat/splat-kmem.c rename to modules/splat/splat-kmem.c diff --git a/splat/splat-mutex.c b/modules/splat/splat-mutex.c similarity index 100% rename from splat/splat-mutex.c rename to modules/splat/splat-mutex.c diff --git a/splat/splat-random.c b/modules/splat/splat-random.c similarity index 100% rename from splat/splat-random.c rename to modules/splat/splat-random.c diff --git a/splat/splat-rwlock.c b/modules/splat/splat-rwlock.c similarity index 100% rename from splat/splat-rwlock.c rename to modules/splat/splat-rwlock.c diff --git a/splat/splat-taskq.c b/modules/splat/splat-taskq.c similarity index 100% rename from splat/splat-taskq.c rename to modules/splat/splat-taskq.c diff --git a/splat/splat-thread.c b/modules/splat/splat-thread.c similarity index 100% rename from splat/splat-thread.c rename to modules/splat/splat-thread.c diff --git a/splat/splat-time.c b/modules/splat/splat-time.c similarity index 100% rename from splat/splat-time.c rename to modules/splat/splat-time.c diff --git a/src/Makefile.am b/src/Makefile.am deleted file mode 100644 index 51013b8d12..0000000000 --- a/src/Makefile.am +++ /dev/null @@ -1 +0,0 @@ -SUBDIRS = lib cmd spl splat