Previous 199869 Revisions Next

r20075 Saturday 5th January, 2013 at 12:37:58 UTC by Oliver Stöneberg
added CPPCHECK makefile define - it contains the path to the cppcheck binary (nw)
[/trunk]makefile

trunk/makefile
r20074r20075
196196# (vs. the native framework port).  Normal users should not enable this.
197197# MACOSX_USE_LIBSDL = 1
198198
199# uncomment and specify path to cppcheck executable to perform
200# static code analysis during compilation
201# CPPCHECK =
199202
200203
204
201205#-------------------------------------------------
202206# specify build options; see each option below
203207# for details
r20074r20075
712716CCOMFLAGS += $(INCPATH)
713717CDEFS = $(DEFS)
714718
719# TODO: -x c++ should not be hard-coded
720CPPCHECKFLAGS = $(CDEFS) $(INCPATH) -x c++ --enable=style
715721
716722
717723#-------------------------------------------------
r20074r20075
787793$(OBJ)/%.o: $(SRC)/%.c | $(OSPREBUILD)
788794   @echo Compiling $<...
789795   $(CC) $(CDEFS) $(CFLAGS) -c $< -o $@
796ifdef CPPCHECK
797   @$(CPPCHECK) $(CPPCHECKFLAGS) $<
798endif
790799
791800$(OBJ)/%.o: $(OBJ)/%.c | $(OSPREBUILD)
792801   @echo Compiling $<...
793802   $(CC) $(CDEFS) $(CFLAGS) -c $< -o $@
803ifdef CPPCHECK
804   @$(CPPCHECK) $(CPPCHECKFLAGS) $<
805endif
794806
795807$(OBJ)/%.pp: $(SRC)/%.c | $(OSPREBUILD)
796808   @echo Compiling $<...
797809   $(CC) $(CDEFS) $(CFLAGS) -E $< -o $@
810ifdef CPPCHECK
811   @$(CPPCHECK) $(CPPCHECKFLAGS) $<
812endif
798813
799814$(OBJ)/%.s: $(SRC)/%.c | $(OSPREBUILD)
800815   @echo Compiling $<...
801816   $(CC) $(CDEFS) $(CFLAGS) -S $< -o $@
817ifdef CPPCHECK
818   @$(CPPCHECK) $(CPPCHECKFLAGS) $<
819endif
802820
803821$(OBJ)/%.lh: $(SRC)/%.lay $(FILE2STR_TARGET)
804822   @echo Converting $<...
r20074r20075
812830$(DRIVLISTOBJ): $(DRIVLISTSRC)
813831   @echo Compiling $<...
814832   $(CC) $(CDEFS) $(CFLAGS) -c $< -o $@
833ifdef CPPCHECK
834   @$(CPPCHECK) $(CPPCHECKFLAGS) $<
835endif
815836
816837$(DRIVLISTSRC): $(SRC)/$(TARGET)/$(SUBTARGET).lst $(MAKELIST_TARGET)
817838   @echo Building driver list $<...

Previous 199869 Revisions Next


© 1997-2024 The MAME Team