override CFLAGS += `pkg-config --cflags glib-2.0` -I/usr/include/slang -fPIC -I.. LDFLAGS = `pkg-config --libs glib-2.0` all: .depend powertop.so powertop_install powertop-1.11.tar.gz: wget http://www.lesswatts.org/projects/powertop/download/powertop-1.11.tar.gz cp powertop-1.11.tar.gz ../initramfs/srpms/ powertop_install: powertop-1.11.tar.gz mkdir -vp ../plugins/powertop_install || : mkdir -vp powertop_install || : tar -zxvf powertop-1.11.tar.gz chmod -R u+rwx powertop-1.11 cd powertop-1.11 ; make cp -v powertop-1.11/powertop ../plugins/powertop_install cp -v powertop-1.11/powertop powertop_install powertop.so: powertop.o gcc --shared powertop.o $(LDFLAGS) -o powertop.so cp -v powertop.so ../plugins clean: rm -rf *~ *.o rm -f powertop.so rm -rf powertop-1.11 rm -rf powertop_install # most of the makefile remains as it was before. # at the bottom, we add these lines: # rule for building dependency lists, and writing them to a file # named ".depend". .depend: rm -f .depend gccmakedep -f- -- $(CFLAGS) -- *.c > .depend # now add a line to include the dependency list. include .depend