Rev 65 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed
#
# Dependency rules used to make a library
#
.PHONY: all install clean cleanall depend
#
install:: $(LIB_PATH)/lib$(LIBRARY).a all
all:: lib$(LIBRARY).a
clean::
$(RM) $(OBJS) *.o
$(RM) *.err
$(RM) lib$(LIBRARY).a
cleanall:: clean
$(RM) deps
$(RM) *.bak
$(RM) *.~
$(RM) *.?~
$(RM) *.??~
$(RM) $(LIBRARYPATHNAME)
depend::
$(CC) $(C_OPT) -M $(wildcard $(OBJS:.o=.c) $(OBJS:.o=.cpp) $(OBJS:.o=.s)) > deps
deps:
$(CC) $(C_OPT) -M $(wildcard $(OBJS:.o=.c) $(OBJS:.o=.cpp) $(OBJS:.o=.s)) > deps
ifneq ($(MAKECMDGOALS),clean)
ifneq ($(MAKECMDGOALS),cleanall)
include deps
endif
endif
lib$(LIBRARY).a: $(OBJS)
$(AR) rs lib$(LIBRARY).a $(OBJS)
$(LIB_PATH)/lib$(LIBRARY).a: lib$(LIBRARY).a
$(CP) lib$(LIBRARY).a $(LIBRARYDIR)