#
# Makefile for IBM ThinkPad control support (tpctl).
#
# See the README file in this directory for more info.
#
# Note! Dependencies are done automagically by 'make dep', which also
# removes any old dependencies. DON'T put your own dependencies here
# unless it's something special (ie not a .c file).
#
# Note 2! The CFLAGS definitions are now inherited from the
# parent makes..
#

TPMODS	= thinkpad.o smapi.o superio.o rtcmosram.o thinkpadpm.o

obj-$(CONFIG_THINKPAD) := $(TPMODS)

ifeq ($(CONFIG_THINKPAD),y)
  O_TARGET = thinkpad_all.o
endif

include $(TOPDIR)/Rules.make

thinkpad_all.o: $(TPMODS)
	rm -f $@
	$(LD) $(EXTRA_LDFLAGS) -r -o $@ $(TPMODS)

smapi.o: smapi_core.o smapi_call.o
	rm -f $@
	$(LD) $(EXTRA_LDFLAGS) -r -o $@ smapi_core.o smapi_call.o
