mirror of
https://github.com/lm-sensors/lm-sensors.git
synced 2026-10-22 11:46:03 +00:00
Makefile tweaks for the new kernel directory structure
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@179 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
1 parent
e05ff970ae
commit
f31a1f45f2
5 files changed
+73
-63
No files matched your search
+13
-27
@@ -20,37 +20,23 @@
|
||||
# verbatim in the rules, until it is redefined.
|
||||
MODULE_DIR := kernel
|
||||
|
||||
SRCDIRS := kernel/busses kernel/chips
|
||||
|
||||
# Regrettably, even 'simply expanded variables' will not put their currently
|
||||
# defined value verbatim into the command-list of rules...
|
||||
SRCTARGETS := $(MODULE_DIR)/smbus.o \
|
||||
$(MODULE_DIR)/i2c-proc.o \
|
||||
$(MODULE_DIR)/i2c-dev.o $(MODULE_DIR)/sensors.o
|
||||
|
||||
SRCHEADERFILES := $(MODULE_DIR)/include/sensors.h $(MODULE_DIR)/include/isa.h \
|
||||
$(MODULE_DIR)/include/smbus.h $(MODULE_DIR)/include/i2c-dev.h
|
||||
KERNELTARGETS := $(MODULE_DIR)/smbus.o \
|
||||
$(MODULE_DIR)/i2c-proc.o \
|
||||
$(MODULE_DIR)/i2c-dev.o $(MODULE_DIR)/sensors.o
|
||||
|
||||
# Include all dependency files
|
||||
INCLUDEFILES += $(SRCTARGETS:.o=.d)
|
||||
INCLUDEFILES += $(KERNELTARGETS:.o=.d)
|
||||
|
||||
all-src: $(SRCTARGETS)
|
||||
all :: all-src
|
||||
all-kernel: $(KERNELTARGETS)
|
||||
all :: all-kernel
|
||||
|
||||
# Include all makefiles for sub-modules
|
||||
INCLUDEFILES :=
|
||||
include $(patsubst %,%/Module.mk,$(SRCDIRS))
|
||||
ifneq ($(MAKECMDGOALS),clean)
|
||||
include $(INCLUDEFILES)
|
||||
endif
|
||||
install-kernel: all-kernel
|
||||
$(MKDIR) $(MODDIR)
|
||||
$(INSTALL) -o root -g root -m 644 $(KERNELTARGETS) $(MODDIR)
|
||||
install :: install-kernel
|
||||
|
||||
|
||||
install-src: all-src
|
||||
$(MKDIR) $(MODDIR) $(SYSINCLUDEDIR)
|
||||
$(INSTALL) -o root -g root -m 644 $(SRCTARGETS) $(MODDIR)
|
||||
$(INSTALL) -o root -g root -m 644 $(SRCHEADERFILES) $(SYSINCLUDEDIR)
|
||||
install :: install-src
|
||||
|
||||
clean-src:
|
||||
$(RM) $(SRCTARGETS) $(SRCTARGETS:.o=.d)
|
||||
clean :: clean-src
|
||||
clean-kernel:
|
||||
$(RM) $(KERNELTARGETS) $(KERNELTARGETS:.o=.d)
|
||||
clean :: clean-kernel
|
||||
Reference in new issue
Block a user