override CFLAGS += `pkg-config --cflags glib-2.0` -fPIC -I.. LDFLAGS = -nodefaultlibs -L../initramfs/data/lib -L../initramfs/data/usr/lib `pkg-config --libs glib-2.0` all: mce_inject.so err_inject_tool mce_inject.so: mce_inject.o .depend gcc -shared mce_inject.o $(LDFLAGS) -o mce_inject.so -lnewt cp mce_inject.so ../plugins err_inject_tool: gcc -o err_inject_tool err_inject_tool.c cp err_inject_tool ../. clean: rm -rf *~ *.o rm -f mce_inject.so rm -f err_inject_tool # 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