build: enable automake for extensions/ directory

Because we are likely to be having more userspace programs soon, and
reproducing manual makefiles is a bad idea, make extensions/ ready
for automake traversal. The build pattern now is:

1.  toplevel Makefile.am starts off with extensions/Makefile.am

2.  Makefile.am

    a.  builds programs in current directory

    b.  runs Kbuild
        - only from extensions/Makefile.am
          (so it does not get reinvoked from case 2cII)
        - Kbuild recurses on its own

    c.  runs Mbuild
        I.  builds iptables shared libraries in current directory
        II. runs Makefile.am in each subdir (goto step 2.)
This commit is contained in:
Jan Engelhardt
2009-09-20 18:55:16 +02:00
parent 537f25dbad
commit 2c53605084
13 changed files with 186 additions and 197 deletions

24
extensions/Makefile.am Normal file
View File

@@ -0,0 +1,24 @@
# -*- Makefile -*-
# AUTOMAKE
# Not having Kbuild in Makefile.extra because it will already recurse
.PHONY: modules modules_install clean_modules
_kcall = ${MAKE} -C ${kbuilddir} M=${abs_srcdir}
modules:
${AM_V_silent}if [ -n "${kbuilddir}" ]; then ${_kcall} modules; fi;
modules_install:
${AM_V_silent}if [ -n "${kbuilddir}" ]; then ${_kcall} INSTALL_MOD_PATH=${DESTDIR} modules_install; fi;
clean_modules:
${AM_V_silent}if [ -n "${kbuilddir}" ]; then ${_kcall} clean; fi;
all-local: modules
install-exec-local: modules_install
clean-local: clean_modules
include ../Makefile.extra