Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset 656437a0 in mainline


Ignore:
Timestamp:
2009-11-25T14:08:50Z (12 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master
Children:
218e50c
Parents:
fe12f9f4
Message:

add basic support for Stanse static checker (http://stanse.fi.muni.cz/)

Files:
1 added
4 edited

Legend:

Unmodified
Added
Removed
  • Makefile

    rfe12f9f4 r656437a0  
    3030#
    3131
    32 .PHONY: all config config_default distclean clean cscope
     32CSCOPE = cscope.out
     33STANSE = stanse
     34
     35.PHONY: all config config_default distclean clean cscope stanse
    3336
    3437all: Makefile.config config.h config.defs
     
    3639        $(MAKE) -C uspace
    3740        $(MAKE) -C boot
     41
     42stanse: Makefile.config config.h config.defs
     43        $(MAKE) -C kernel clean
     44        $(MAKE) -C kernel EXTRA_TOOL=stanse
     45        $(STANSE) --checker ReachabilityChecker --jobfile kernel/kernel.job
     46
     47cscope:
     48        find kernel boot uspace -regex '^.*\.[chsS]$$' | xargs cscope -b -k -u -f$(CSCOPE)
    3849
    3950Makefile.config: config_default
     
    5061
    5162distclean: clean
    52         rm -f Makefile.config config.h config.defs tools/*.pyc
     63        rm -f $(CSCOPE) Makefile.config config.h config.defs tools/*.pyc
    5364
    5465clean:
    55         -$(MAKE) -C kernel clean
    56         -$(MAKE) -C uspace clean
    57         -$(MAKE) -C boot clean
    58 
    59 cscope:
    60         find kernel boot uspace -regex '^.*\.[chsS]$$' -print > srclist
    61         rm -f cscope.out
    62         cscope -bi srclist
     66        $(MAKE) -C kernel clean
     67        $(MAKE) -C uspace clean
     68        $(MAKE) -C boot clean
  • kernel/Makefile

    rfe12f9f4 r656437a0  
    3333all: ../version ../Makefile.config ../config.h ../config.defs
    3434        -[ -f $(DEPEND) ] && mv -f $(DEPEND) $(DEPEND_PREV)
    35         $(MAKE) -f Makefile.build
     35        $(MAKE) -f Makefile.build EXTRA_TOOL=$(EXTRA_TOOL)
    3636
    3737clean:
    38         rm -f $(DEPEND) $(DEPEND_PREV) $(RAW) $(BIN) $(MAP) $(MAP_PREV) $(DISASM) $(DUMP) $(REAL_MAP).* $(ARCH_INCLUDE) $(GENARCH_INCLUDE) arch/*/_link.ld
     38        rm -f $(DEPEND) $(DEPEND_PREV) $(RAW) $(BIN) $(MAP) $(JOB) $(MAP_PREV) $(DISASM) $(DUMP) $(REAL_MAP).* $(ARCH_INCLUDE) $(GENARCH_INCLUDE) arch/*/_link.ld
    3939        find generic/src/ arch/*/src/ genarch/src/ test/ -name '*.o' -follow -exec rm \{\} \;
     40        find generic/src/ arch/*/src/ genarch/src/ test/ -name '*.o.preproc' -follow -exec rm \{\} \;
  • kernel/Makefile.build

    rfe12f9f4 r656437a0  
    110110ifeq ($(COMPILER),gcc_native)
    111111        CC = gcc
    112         GCC = $(CC)
     112        GCC = gcc
    113113        AS = $(BINUTILS_PREFIX)as
    114114        LD = $(BINUTILS_PREFIX)ld
     
    168168        DEPEND_DEFS = $(DEFS) $(CONFIG_DEFS)
    169169endif
     170
    170171
    171172## Generic kernel sources
     
    384385test/fpu/%.o: test/fpu/%.c $(DEPEND)
    385386        $(CC) $(DEFS) $(CFLAGS) $(EXTRA_FLAGS) -c $< -o $@
     387ifeq ($(EXTRA_TOOL),stanse)
     388        ../tools/jobfile.py $(JOB) $< $@ $(DEFS) $(CFLAGS) $(EXTRA_FLAGS)
     389endif
    386390
    387391#
     
    390394%.o: %.c $(DEPEND)
    391395        $(CC) $(DEFS) $(CFLAGS) $(EXTRA_FLAGS) $(FPU_NO_CFLAGS) -c $< -o $@
     396ifeq ($(EXTRA_TOOL),stanse)
     397        ../tools/jobfile.py $(JOB) $< $@ $(DEFS) $(CFLAGS) $(EXTRA_FLAGS) $(FPU_NO_CFLAGS)
     398endif
    392399
    393400$(REAL_MAP).o: $(REAL_MAP).bin
  • kernel/Makefile.common

    rfe12f9f4 r656437a0  
    3636BIN = kernel.bin
    3737MAP = kernel.map
     38JOB = kernel.job
    3839MAP_PREV = $(MAP).prev
    3940DISASM = kernel.disasm
Note: See TracChangeset for help on using the changeset viewer.