CFLAGS = -Wall -W -Os -D_FORTIFY_SOURCE=2 `pkg-config --cflags glib-2.0` -fPIC -g -I.. LDFLAGS = `pkg-config --libs glib-2.0` all: dmar.so dmar.so: dmar.o .depend gcc --shared dmar.o $(LDFLAGS) -o dmar.so -lnewt cp dmar.so ../plugins clean: rm -rf *~ *.o rm -f dmar.so # 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