
all: tpctl

include ../Makefile_common

CFLAGS := -I$(DIR_KERNEL)/include -I../include -L../lib -Wall -Wcast-align -Wstrict-prototypes -DLINUX -DVIAGRA
#-DDEBUG_REGS
#-DALLOW_POWEROFF
#-DDEBUG_STRUCT_SIZES -DDEBUG_FILEOPS -DDEBUG_IOPARM
#-DTP570_KLUDGE

tpctl: tpctl.o ../lib/libsmapidev.so
	$(CC) $(CFLAGS) -o $@ -lsmapidev -lncurses tpctl.o

tpctl.o: tpctl.c ../include/thinkpad_common.h ../include/thinkpad.h ../include/smapi.h ../include/superio.h ../include/rtcmosram.h ../include/smapidev.h
	$(CC) $(CFLAGS) -o $@ -c tpctl.c

clean:
	rm -vf tpctl core *.o
