# $Id: Makefile,v 1.2 2006/02/02 16:35:11 marquet Exp $ ############################################################################## CC = gcc CFLAGS = -Wall -ansi -pedantic CFLAGS += -D_XOPEN_SOURCE=500 CFLAGS += -g ###------------------------------ ### Main targets ###------------------------------------------------------------ BINARIES = LIBRARIES= $(addsuffix .a,\ libssam) OBJECTS = $(addsuffix .o,\ ssam tools abar) all: $(BINARIES) $(LIBRARIES) $(OBJECTS) ###------------------------------ ### Binaries ###------------------------------------------------------------ ###------------------------------ ### Libraries ###------------------------------------------------------------ libssam.a : ssam.o tools.o abar.o ar -cr $@ $^ ###------------------------------ ### #include dependences ###------------------------------------------------------------ # you may fill these lines with "make depend" abar.o: abar.c ssam.o: ssam.c tools.o: tools.c ###------------------------------ ### Misc. ###------------------------------------------------------------ .PHONY: clean realclean depend clean: $(RM) $(OBJECTS) realclean: clean $(RM) $(BINARIES) $(LIBRARIES) depend : $(CC) $(CFLAGS) -MM *.c