mirror of https://github.com/YosysHQ/abc.git
Makefile: add ABC_MAKE_VERBOSE flag to print the acutall commands executed.
This commit is contained in:
parent
824584ff44
commit
d944384d9e
40
Makefile
40
Makefile
|
|
@ -56,7 +56,7 @@ ifdef ABC_USE_NAMESPACE
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# compile CUDD with ABC
|
# compile CUDD with ABC
|
||||||
ifdef ABC_USE_CUDD
|
ifndef ABC_USE_NO_CUDD
|
||||||
CFLAGS += -DABC_USE_CUDD=1
|
CFLAGS += -DABC_USE_CUDD=1
|
||||||
MODULES += src/bdd/cudd src/bdd/extrab src/bdd/dsd src/bdd/epd src/bdd/mtr src/bdd/reo src/bdd/cas src/bdd/bbr src/bdd/llb
|
MODULES += src/bdd/cudd src/bdd/extrab src/bdd/dsd src/bdd/epd src/bdd/mtr src/bdd/reo src/bdd/cas src/bdd/bbr src/bdd/llb
|
||||||
$(info $(MSG_PREFIX)Compiling with CUDD)
|
$(info $(MSG_PREFIX)Compiling with CUDD)
|
||||||
|
|
@ -70,12 +70,26 @@ ifndef ABC_USE_NO_READLINE
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# whether to compile with thread support
|
# whether to compile with thread support
|
||||||
ifdef ABC_USE_PTHREADS
|
ifdef ABC_USE_NO_PTHREADS
|
||||||
CFLAGS += -DABC_USE_PTHREADS
|
CFLAGS += -DABC_USE_PTHREADS
|
||||||
LIBS += -lpthread
|
LIBS += -lpthread
|
||||||
$(info $(MSG_PREFIX)Using pthreads)
|
$(info $(MSG_PREFIX)Using pthreads)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
# whether to compile into position independent code
|
||||||
|
ifdef ABC_USE_PIC
|
||||||
|
CFLAGS += --fPIC
|
||||||
|
LIBS += -fPIC
|
||||||
|
$(info $(MSG_PREFIX)Compiling position independent code)
|
||||||
|
endif
|
||||||
|
|
||||||
|
# whether to echo commands while building
|
||||||
|
ifdef ABC_MAKE_VERBOSE
|
||||||
|
VERBOSE=
|
||||||
|
else
|
||||||
|
VERBOSE=@
|
||||||
|
endif
|
||||||
|
|
||||||
# Set -Wno-unused-bug-set-variable for GCC 4.6.0 and greater only
|
# Set -Wno-unused-bug-set-variable for GCC 4.6.0 and greater only
|
||||||
ifneq ($(or $(findstring gcc,$(CC)),$(findstring g++,$(CC))),)
|
ifneq ($(or $(findstring gcc,$(CC)),$(findstring g++,$(CC))),)
|
||||||
empty:=
|
empty:=
|
||||||
|
|
@ -125,27 +139,27 @@ DEP := $(OBJ:.o=.d)
|
||||||
|
|
||||||
%.o: %.c
|
%.o: %.c
|
||||||
@echo "$(MSG_PREFIX)\`\` Compiling:" $(LOCAL_PATH)/$<
|
@echo "$(MSG_PREFIX)\`\` Compiling:" $(LOCAL_PATH)/$<
|
||||||
@$(CC) -c $(CFLAGS) $< -o $@
|
$(VERBOSE)$(CC) -c $(CFLAGS) $< -o $@
|
||||||
|
|
||||||
%.o: %.cc
|
%.o: %.cc
|
||||||
@echo "$(MSG_PREFIX)\`\` Compiling:" $(LOCAL_PATH)/$<
|
@echo "$(MSG_PREFIX)\`\` Compiling:" $(LOCAL_PATH)/$<
|
||||||
@$(CXX) -c $(CXXFLAGS) $< -o $@
|
$(VERBOSE)$(CXX) -c $(CXXFLAGS) $< -o $@
|
||||||
|
|
||||||
%.o: %.cpp
|
%.o: %.cpp
|
||||||
@echo "$(MSG_PREFIX)\`\` Compiling:" $(LOCAL_PATH)/$<
|
@echo "$(MSG_PREFIX)\`\` Compiling:" $(LOCAL_PATH)/$<
|
||||||
@$(CXX) -c $(CXXFLAGS) $< -o $@
|
$(VERBOSE)$(CXX) -c $(CXXFLAGS) $< -o $@
|
||||||
|
|
||||||
%.d: %.c
|
%.d: %.c
|
||||||
@echo "$(MSG_PREFIX)\`\` Generating dependency:" $(LOCAL_PATH)/$<
|
@echo "$(MSG_PREFIX)\`\` Generating dependency:" $(LOCAL_PATH)/$<
|
||||||
@./depends.sh $(CC) `dirname $*.c` $(CFLAGS) $*.c > $@
|
$(VERBOSE)./depends.sh $(CC) `dirname $*.c` $(CFLAGS) $*.c > $@
|
||||||
|
|
||||||
%.d: %.cc
|
%.d: %.cc
|
||||||
@echo "$(MSG_PREFIX)\`\` Generating dependency:" $(LOCAL_PATH)/$<
|
@echo "$(MSG_PREFIX)\`\` Generating dependency:" $(LOCAL_PATH)/$<
|
||||||
@./depends.sh $(CXX) `dirname $*.cc` $(CXXFLAGS) $*.cc > $@
|
$(VERBOSE)./depends.sh $(CXX) `dirname $*.cc` $(CXXFLAGS) $*.cc > $@
|
||||||
|
|
||||||
%.d: %.cpp
|
%.d: %.cpp
|
||||||
@echo "$(MSG_PREFIX)\`\` Generating dependency:" $(LOCAL_PATH)/$<
|
@echo "$(MSG_PREFIX)\`\` Generating dependency:" $(LOCAL_PATH)/$<
|
||||||
@./depends.sh $(CXX) `dirname $*.cpp` $(CXXFLAGS) $*.cpp > $@
|
$(VERBOSE)./depends.sh $(CXX) `dirname $*.cpp` $(CXXFLAGS) $*.cpp > $@
|
||||||
|
|
||||||
-include $(DEP)
|
-include $(DEP)
|
||||||
|
|
||||||
|
|
@ -155,20 +169,20 @@ depend: $(DEP)
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
@echo "$(MSG_PREFIX)\`\` Cleaning up..."
|
@echo "$(MSG_PREFIX)\`\` Cleaning up..."
|
||||||
@rm -rvf $(PROG) lib$(PROG).a $(OBJ) $(GARBAGE) $(OBJ:.o=.d)
|
$(VERBOSE)rm -rvf $(PROG) lib$(PROG).a $(OBJ) $(GARBAGE) $(OBJ:.o=.d)
|
||||||
|
|
||||||
tags:
|
tags:
|
||||||
etags `find . -type f -regex '.*\.\(c\|h\)'`
|
etags `find . -type f -regex '.*\.\(c\|h\)'`
|
||||||
|
|
||||||
$(PROG): $(OBJ)
|
$(PROG): $(OBJ)
|
||||||
@echo "$(MSG_PREFIX)\`\` Building binary:" $(notdir $@)
|
@echo "$(MSG_PREFIX)\`\` Building binary:" $(notdir $@)
|
||||||
@$(LD) -o $@ $^ $(LIBS)
|
$(VERBOSE)$(LD) -o $@ $^ $(LIBS)
|
||||||
|
|
||||||
lib$(PROG).a: $(OBJ)
|
lib$(PROG).a: $(OBJ)
|
||||||
@echo "$(MSG_PREFIX)\`\` Linking:" $(notdir $@)
|
@echo "$(MSG_PREFIX)\`\` Linking:" $(notdir $@)
|
||||||
@ar rv $@ $?
|
$(VERBOSE)ar rv $@ $?
|
||||||
@ranlib $@
|
$(VERBOSE)ranlib $@
|
||||||
|
|
||||||
docs:
|
docs:
|
||||||
@echo "$(MSG_PREFIX)\`\` Building documentation." $(notdir $@)
|
@echo "$(MSG_PREFIX)\`\` Building documentation." $(notdir $@)
|
||||||
@doxygen doxygen.conf
|
$(VERBOSE)doxygen doxygen.conf
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue