view mpcommon.mak @ 21259:92b122592776

Merge common parts of all Makefiles into one file included by all.
author diego
date Sun, 26 Nov 2006 18:12:36 +0000
parents
children f423ce0a1c36
line wrap: on
line source

OBJS  = $(SRCS:.c=.o)
OBJS := $(OBJS:.S=.o)
OBJS := $(OBJS:.s=.o)
OBJS := $(OBJS:.cpp=.o)

CFLAGS += -I. -I.. $(OPTFLAGS)

.SUFFIXES: .c .o

.c.o:
	$(CC) -c $(CFLAGS) -o $@ $<

all:    $(LIBNAME)

$(LIBNAME): $(OBJS)
	$(AR) r $@ $^
	$(RANLIB) $@

clean::
	rm -f *.o *.a *~

distclean:: clean
	rm -f .depend

dep depend:
	$(CC) -MM $(CFLAGS) $(SRCS) 1>.depend

ifneq ($(wildcard .depend),)
include .depend
endif