Make file optimization

Hi ,

I need some help on optmizing the make file.
I have the below scenario.

SOUTHERN_XITEM_PROGS=\
sfmxitem.rel \
sfqxitem.rel
SOUTHERN_XITEM_DEPS= southern_xitem.c

SUPERSVU_XITEM_PROGS=\
su3xitem.rel
SUPERSVU_XITEM_DEPS= supersvu_xitem.c

$(SOUTHERN_XITEM_PROGS) : $$@.o $(SOUTHERN_XITEM_DEPS) $(COMMON_HEADERS) \
        $(XITEM_HEADERS) $(LIB_DEPS) $(XITEM_LIB_DEPS)
        $(CC) $(CFLAGS) $@.o -o $(DEST)/$@ $(LIBS) $(XITEM_LIBS)
        -rm -f $@.o$

$(SUPERSVU_XITEM_PROGS) : $$@.o $(SUPERSVU_XITEM_DEPS) $(COMMON_HEADERS) \
  $(XITEM_HEADERS) $(LIB_DEPS) $(XITEM_LIB_DEPS)
        $(CC) $(CFLAGS) $@.o -o $(DEST)/$@ $(LIBS) $(XITEM_LIBS)
         -rm -f $@.o$

all:$(SUPERSVU_XITEM_PROGS) $(SOUTHERN_XITEM_PROGS)

In the above scenario while am using the make all , all the files are getting updated.But i would like to compile only the modified file.
Can any one help on this?

You just make z out of a.o, b.o, c.o, and a.o out of a.c, so it recompiles a.c and relinks *.o to make z.

If you use a dynamic lib, it can be even simpler, just replace a.o in the lib.