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)
|
|
|
|
|
|
|
|
%.o : %.c
|
|
|
|
$(CC) $(CFLAGS) -o $@ $<
|
|
|
|
|
|
|
|
clean:
|
|
|
|
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
|