2011-07-09 18:17:00 +00:00
|
|
|
LIBFILE?=lib$(LIBNAME).a
|
|
|
|
SRCS?= $(foreach mod,$(OBJS),$(subst .o,.c,$(mod)))
|
|
|
|
DEPFILE?=Makefile.dep
|
|
|
|
|
|
|
|
all: $(LIBFILE)
|
|
|
|
|
|
|
|
$(LIBFILE): $(OBJS)
|
|
|
|
$(AR) rcs $@ $(OBJS)
|
2011-07-31 19:52:28 +00:00
|
|
|
$(RANLIB) $(RANLIBFLAGS) $@
|
2011-07-09 18:17:00 +00:00
|
|
|
|
|
|
|
%.o : %.c
|
|
|
|
$(CC) $(CFLAGS) -o $@ $<
|
|
|
|
|
2011-07-18 16:53:17 +00:00
|
|
|
clean::
|
2011-07-09 18:17:00 +00:00
|
|
|
rm -f $(OBJS) $(LIBFILE) $(CLEANFILES)
|
|
|
|
|
|
|
|
depend:
|
2011-07-18 08:12:52 +00:00
|
|
|
@$(CC) $(CFLAGS) -MM $(SRCS) > Makefile.dep
|
2011-07-09 18:17:00 +00:00
|
|
|
|
|
|
|
include $(DEPFILE)
|
|
|
|
|
|
|
|
$(DEPFILE): depend
|