mirror of
https://github.com/holub/mame
synced 2025-04-19 23:12:11 +03:00
added CPPCHECK makefile define - it contains the path to the cppcheck binary (nw)
This commit is contained in:
parent
991cadcafb
commit
85568b3f92
21
makefile
21
makefile
@ -196,6 +196,10 @@ endif
|
||||
# (vs. the native framework port). Normal users should not enable this.
|
||||
# MACOSX_USE_LIBSDL = 1
|
||||
|
||||
# uncomment and specify path to cppcheck executable to perform
|
||||
# static code analysis during compilation
|
||||
# CPPCHECK =
|
||||
|
||||
|
||||
|
||||
#-------------------------------------------------
|
||||
@ -712,6 +716,8 @@ include $(SRC)/tools/tools.mak
|
||||
CCOMFLAGS += $(INCPATH)
|
||||
CDEFS = $(DEFS)
|
||||
|
||||
# TODO: -x c++ should not be hard-coded
|
||||
CPPCHECKFLAGS = $(CDEFS) $(INCPATH) -x c++ --enable=style
|
||||
|
||||
|
||||
#-------------------------------------------------
|
||||
@ -787,18 +793,30 @@ endif
|
||||
$(OBJ)/%.o: $(SRC)/%.c | $(OSPREBUILD)
|
||||
@echo Compiling $<...
|
||||
$(CC) $(CDEFS) $(CFLAGS) -c $< -o $@
|
||||
ifdef CPPCHECK
|
||||
@$(CPPCHECK) $(CPPCHECKFLAGS) $<
|
||||
endif
|
||||
|
||||
$(OBJ)/%.o: $(OBJ)/%.c | $(OSPREBUILD)
|
||||
@echo Compiling $<...
|
||||
$(CC) $(CDEFS) $(CFLAGS) -c $< -o $@
|
||||
ifdef CPPCHECK
|
||||
@$(CPPCHECK) $(CPPCHECKFLAGS) $<
|
||||
endif
|
||||
|
||||
$(OBJ)/%.pp: $(SRC)/%.c | $(OSPREBUILD)
|
||||
@echo Compiling $<...
|
||||
$(CC) $(CDEFS) $(CFLAGS) -E $< -o $@
|
||||
ifdef CPPCHECK
|
||||
@$(CPPCHECK) $(CPPCHECKFLAGS) $<
|
||||
endif
|
||||
|
||||
$(OBJ)/%.s: $(SRC)/%.c | $(OSPREBUILD)
|
||||
@echo Compiling $<...
|
||||
$(CC) $(CDEFS) $(CFLAGS) -S $< -o $@
|
||||
ifdef CPPCHECK
|
||||
@$(CPPCHECK) $(CPPCHECKFLAGS) $<
|
||||
endif
|
||||
|
||||
$(OBJ)/%.lh: $(SRC)/%.lay $(FILE2STR_TARGET)
|
||||
@echo Converting $<...
|
||||
@ -812,6 +830,9 @@ $(OBJ)/%.fh: $(SRC)/%.png $(PNG2BDC_TARGET) $(FILE2STR_TARGET)
|
||||
$(DRIVLISTOBJ): $(DRIVLISTSRC)
|
||||
@echo Compiling $<...
|
||||
$(CC) $(CDEFS) $(CFLAGS) -c $< -o $@
|
||||
ifdef CPPCHECK
|
||||
@$(CPPCHECK) $(CPPCHECKFLAGS) $<
|
||||
endif
|
||||
|
||||
$(DRIVLISTSRC): $(SRC)/$(TARGET)/$(SUBTARGET).lst $(MAKELIST_TARGET)
|
||||
@echo Building driver list $<...
|
||||
|
Loading…
Reference in New Issue
Block a user