ifndef EXTRA_CFLAGS
EXTRA_CFLAGS := -Wall -Wcast-align -Wstrict-prototypes -O2 -DLINUX
endif
EXTRA_CFLAGS += -I$(src)/include

ifeq ($(CONFIG_X86),y)
ifeq ($(CONFIG_USERMODE),)
obj-m		:= thinkpad.o smapi.o superio.o rtcmosram.o thinkpadpm.o
smapi-objs	:= smapi_core.o smapi_call.o
endif
endif

# Where to install the modules
MOD_DIR := thinkpad

.PHONY: modules install clean modules_add

install : modules_add
modules modules_add clean:
	$(MAKE) -C $(KERNEL_SOURCE) $@ SUBDIRS=$(CURDIR)
