# $Id: Makefile,v 1.2 2006/02/02 16:35:11 marquet Exp $ ############################################################################## CC = gcc CFLAGS = -Wall -ansi CFLAGS += -D_XOPEN_SOURCE=500 CFLAGS += -g ###------------------------------ ### Main targets ###------------------------------------------------------------ BINARIES = mul pipe OBJECTS = $(addsuffix .o,\ pipe mul) all: $(BINARIES) $(LIBRARIES) $(OBJECTS) ###------------------------------ ### Binaries ###------------------------------------------------------------ mul: mul.o $(CC) -o $@ $^ -lpthread ../libssam.a pipe: pipe.o $(CC) -o $@ $^ -lpthread -lm ../libssam.a %.o: %.c $(CC) $(CFLAGS) -c $^ -DDEBUG=1 -I.. ###------------------------------ ### Misc. ###------------------------------------------------------------ .PHONY: clean realclean depend clean: $(RM) $(OBJECTS) realclean: clean $(RM) $(BINARIES) $(LIBRARIES) depend : $(CC) $(CFLAGS) -MM *.c