override CFLAGS += `pkg-config --cflags glib-2.0` -I.. -fPIC LDFLAGS = `pkg-config --libs glib-2.0` -lm -L.. -lstandalone all: cstates.exe cstates.exe: cstates.o .depend gcc cstates.o $(LDFLAGS) -o cstates.exe cp cstates.exe ../plugins clean: rm -rf *~ *.o rm -f cstates.so cstates.exe # 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