Verbosity option V=@
This commit is contained in:
parent
6eae39d873
commit
1734000f41
10
src/lib.mk
10
src/lib.mk
@ -2,6 +2,7 @@ MF=Mf-$(KERNEL)-$(ARCH).mk
|
||||
|
||||
LIBTARGET=$(OBJDIR)/$(PROG)
|
||||
|
||||
V:=@
|
||||
|
||||
$(SNAME): $(MF) $(SOURCES)
|
||||
@mkdir -p $(OBJDIR)
|
||||
@ -24,16 +25,19 @@ $(MF): Makefile
|
||||
done
|
||||
@echo "" >> $(MF)
|
||||
@echo "$(SNAME) : \$$(OBJS)" >> $(MF)
|
||||
@echo " \$$(AR) rcs $(SNAME) \$$(OBJS)" >> $(MF)
|
||||
@echo " @echo Creating static library: $(SNAME)" >> $(MF)
|
||||
@echo " $(V)\$$(AR) rcs $(SNAME) \$$(OBJS)" >> $(MF)
|
||||
@echo "" >> $(MF)
|
||||
@echo "$(DNAME) : \$$(OBJS)" >> $(MF)
|
||||
@echo " \$$(LD) \$$(LDFLAGS) -shared -o $(DNAME) \$$(OBJS) $(LIBS)" >> $(MF)
|
||||
@echo " @echo Creating dynamic library: $(DNAME)" >> $(MF)
|
||||
@echo " $(V)\$$(LD) \$$(LDFLAGS) -shared -o $(DNAME) \$$(OBJS) $(LIBS)" >> $(MF)
|
||||
@echo "" >> $(MF)
|
||||
# @echo " \$$(CC) -o $(PROGTARGET) \$$(LDFLAGS) \$$(OBJS) $(LIBS)" >> $(MF)
|
||||
@for f in $(SOURCES) ; do \
|
||||
OF=$(OBJDIR)/`basename "$${f%.*}.o"` ; \
|
||||
echo $${OF}: $$f >> $(MF) ; \
|
||||
echo " \$$(CC) -c \$$(CFLAGS) -o $${OF} $${f}" >> $(MF) ; \
|
||||
echo " @if [ \"\$$(V)\" = \"@\" ]; then echo \"Compiling: $${f}\" ; fi" >> $(MF) ; \
|
||||
echo " \$$(V)\$$(CC) -c \$$(CFLAGS) -o $${OF} $${f}" >> $(MF) ; \
|
||||
done
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user