]> git.hungrycats.org Git - linux/commitdiff
kbuild: Consistent use of [AC]FLAGS_KERNEL and MODFLAGS
authorKai Germaschewski <kai@tp1.ruhr-uni-bochum.de>
Wed, 22 May 2002 15:16:39 +0000 (10:16 -0500)
committerKai Germaschewski <kai@tp1.ruhr-uni-bochum.de>
Wed, 22 May 2002 15:16:39 +0000 (10:16 -0500)
We have
o CFLAGS_KERNEL: Additional flags for files compiled into vmlinux
o AFLAGS_KERNEL: Additional flags for files assembled into vmlinux
o MODFLAGS: Additonal flags for files compiled as module

For consistency, rename MODFLAGS to CFLAGS_MODULE, introduce
AFLAGS_MODULE but leave it empty for now.

While we're at, removing "MAKING_MODULES=1", nobody is using it.

Makefile
arch/sparc64/solaris/Makefile

index b30bf4575c4c49168c382c7825b1e0af34d24d9f..0f1b9f90aa1bdd29909f84315eb0b1cf59ac8333 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -38,13 +38,15 @@ MAKEFILES   = $(TOPDIR)/.config
 GENKSYMS       = /sbin/genksyms
 DEPMOD         = /sbin/depmod
 MODFLAGS       = -DMODULE
+CFLAGS_MODULE   = $(MODFLAGS)
+AFLAGS_MODULE   =
 CFLAGS_KERNEL  =
 AFLAGS_KERNEL  =
 PERL           = perl
 
 export VERSION PATCHLEVEL SUBLEVEL EXTRAVERSION KERNELRELEASE ARCH \
        CONFIG_SHELL TOPDIR HPATH HOSTCC HOSTCFLAGS CROSS_COMPILE AS LD CC \
-       CPP AR NM STRIP OBJCOPY OBJDUMP MAKE MAKEFILES GENKSYMS MODFLAGS PERL
+       CPP AR NM STRIP OBJCOPY OBJDUMP MAKE MAKEFILES GENKSYMS PERL
 
 all:   do-it-all
 
@@ -155,7 +157,9 @@ DRIVERS := $(DRIVERS-y)
 
 include arch/$(ARCH)/Makefile
 
-export CPPFLAGS CFLAGS CFLAGS_KERNEL AFLAGS AFLAGS_KERNEL
+export CPPFLAGS
+export CFLAGS CFLAGS_KERNEL CFLAGS_MODULE 
+export AFLAGS AFLAGS_KERNEL AFLAGS_MODULE
 
 export NETWORKS DRIVERS LIBS HEAD LDFLAGS LINKFLAGS MAKEBOOT ASFLAGS
 
@@ -287,7 +291,7 @@ modules: $(patsubst %, _mod_%, $(SUBDIRS))
 
 .PHONY: $(patsubst %, _mod_%, $(SUBDIRS))
 $(patsubst %, _mod_%, $(SUBDIRS)) : include/linux/version.h include/config/MARKER
-       @$(MAKE) -C $(patsubst _mod_%, %, $@) CFLAGS="$(CFLAGS) $(MODFLAGS)" MAKING_MODULES=1 modules
+       @$(MAKE) -C $(patsubst _mod_%, %, $@) CFLAGS="$(CFLAGS) $(CFLAGS_MODULE)" AFLAGS="$(AFLAGS) $(AFLAGS_MODULE)" modules
 
 #      Install modules
 
index f0ab6f34827d6f2fa8f3e43aee117c8cc8ff68ac..14f421bf56c72272f3ce30a9811335ef48f1c4bc 100644 (file)
@@ -5,7 +5,7 @@
 EXTRA_AFLAGS := -ansi
 
 ifeq ($(CONFIG_SOLARIS_EMUL),m)
-  EXTRA_AFLAGS += $(MODFLAGS)
+  EXTRA_AFLAGS += $(CFLAGS_MODULE) # FIXME
 endif
 
 solaris-objs := entry64.o fs.o misc.o signal.o systbl.o socket.o \