1 VERSION=0.5.1
2
3 # Generating file version.h if current version has changed
4 SPARSE_VERSION:=$(shell git describe 2>/dev/null || echo '$(VERSION)')
5 VERSION_H := $(shell cat version.h 2>/dev/null)
6 ifneq ($(lastword $(VERSION_H)),"$(SPARSE_VERSION)")
7 $(info $(shell echo ' GEN 'version.h))
8 $(shell echo '#define SPARSE_VERSION "$(SPARSE_VERSION)"' > version.h)
9 endif
10
11 OS = linux
12
13 ifeq ($(CC),"")
14 CC = gcc
15 endif
16
17 CFLAGS += -O2 -finline-functions -fno-strict-aliasing -g
18 CFLAGS += -Wall -Wwrite-strings -Wno-switch
19 LDFLAGS += -g -lm -lsqlite3 -lssl -lcrypto
20 LD = gcc
21 AR = ar
73 smatch_equiv.o smatch_buf_size.o smatch_strlen.o smatch_capped.o smatch_db.o \
74 smatch_expressions.o smatch_returns.o smatch_parse_call_math.o \
75 smatch_param_limit.o smatch_param_filter.o \
76 smatch_param_set.o smatch_comparison.o smatch_param_compare_limit.o smatch_local_values.o \
77 smatch_function_ptrs.o smatch_annotate.o smatch_string_list.o \
78 smatch_param_cleared.o smatch_start_states.o \
79 smatch_recurse.o smatch_data_source.o smatch_type_val.o \
80 smatch_common_functions.o smatch_struct_assignment.o \
81 smatch_unknown_value.o smatch_stored_conditions.o avl.o \
82 smatch_function_info.o smatch_links.o smatch_auto_copy.o \
83 smatch_type_links.o smatch_untracked_param.o smatch_impossible.o \
84 smatch_strings.o smatch_param_used.o smatch_container_of.o smatch_address.o \
85 smatch_buf_comparison.o smatch_real_absolute.o smatch_scope.o \
86 smatch_imaginary_absolute.o smatch_parameter_names.o \
87 smatch_return_to_param.o smatch_passes_array_size.o \
88 smatch_constraints.o smatch_constraints_required.o \
89 smatch_fn_arg_link.o smatch_about_fn_ptr_arg.o smatch_mtag.o \
90 smatch_mtag_map.o smatch_mtag_data.o \
91 smatch_param_to_mtag_data.o smatch_mem_tracker.o smatch_array_values.o \
92 smatch_nul_terminator.o smatch_assigned_expr.o smatch_kernel_user_data.o \
93 smatch_statement_count.o
94
95 SMATCH_CHECKS=$(shell ls check_*.c | sed -e 's/\.c/.o/')
96 SMATCH_DATA=smatch_data/kernel.allocation_funcs \
97 smatch_data/kernel.frees_argument smatch_data/kernel.puts_argument \
98 smatch_data/kernel.dev_queue_xmit smatch_data/kernel.returns_err_ptr \
99 smatch_data/kernel.dma_funcs smatch_data/kernel.returns_held_funcs \
100 smatch_data/kernel.no_return_funcs
101
102 SMATCH_SCRIPTS=smatch_scripts/add_gfp_to_allocations.sh \
103 smatch_scripts/build_kernel_data.sh \
104 smatch_scripts/call_tree.pl smatch_scripts/filter_kernel_deref_check.sh \
105 smatch_scripts/find_expanded_holes.pl smatch_scripts/find_null_params.sh \
106 smatch_scripts/follow_params.pl smatch_scripts/gen_allocation_list.sh \
107 smatch_scripts/gen_bit_shifters.sh smatch_scripts/gen_dma_funcs.sh \
108 smatch_scripts/generisize.pl smatch_scripts/gen_err_ptr_list.sh \
109 smatch_scripts/gen_expects_err_ptr.sh smatch_scripts/gen_frees_list.sh \
110 smatch_scripts/gen_gfp_flags.sh smatch_scripts/gen_no_return_funcs.sh \
111 smatch_scripts/gen_puts_list.sh smatch_scripts/gen_returns_held.sh \
112 smatch_scripts/gen_rosenberg_funcs.sh smatch_scripts/gen_sizeof_param.sh \
113 smatch_scripts/gen_unwind_functions.sh smatch_scripts/kchecker \
|
1 VERSION=0.5.1-il-4
2
3 # Generating file version.h if current version has changed
4 SPARSE_VERSION:=$(shell git describe 2>/dev/null || echo '$(VERSION)')
5 VERSION_H := $(shell cat version.h 2>/dev/null)
6 ifneq ($(lastword $(VERSION_H)),"$(SPARSE_VERSION)")
7 $(info $(shell echo ' GEN 'version.h))
8 $(shell echo '#define SPARSE_VERSION "$(SPARSE_VERSION)"' > version.h)
9 endif
10
11 OS = linux
12
13 ifeq ($(CC),"")
14 CC = gcc
15 endif
16
17 CFLAGS += -O2 -finline-functions -fno-strict-aliasing -g
18 CFLAGS += -Wall -Wwrite-strings -Wno-switch
19 LDFLAGS += -g -lm -lsqlite3 -lssl -lcrypto
20 LD = gcc
21 AR = ar
73 smatch_equiv.o smatch_buf_size.o smatch_strlen.o smatch_capped.o smatch_db.o \
74 smatch_expressions.o smatch_returns.o smatch_parse_call_math.o \
75 smatch_param_limit.o smatch_param_filter.o \
76 smatch_param_set.o smatch_comparison.o smatch_param_compare_limit.o smatch_local_values.o \
77 smatch_function_ptrs.o smatch_annotate.o smatch_string_list.o \
78 smatch_param_cleared.o smatch_start_states.o \
79 smatch_recurse.o smatch_data_source.o smatch_type_val.o \
80 smatch_common_functions.o smatch_struct_assignment.o \
81 smatch_unknown_value.o smatch_stored_conditions.o avl.o \
82 smatch_function_info.o smatch_links.o smatch_auto_copy.o \
83 smatch_type_links.o smatch_untracked_param.o smatch_impossible.o \
84 smatch_strings.o smatch_param_used.o smatch_container_of.o smatch_address.o \
85 smatch_buf_comparison.o smatch_real_absolute.o smatch_scope.o \
86 smatch_imaginary_absolute.o smatch_parameter_names.o \
87 smatch_return_to_param.o smatch_passes_array_size.o \
88 smatch_constraints.o smatch_constraints_required.o \
89 smatch_fn_arg_link.o smatch_about_fn_ptr_arg.o smatch_mtag.o \
90 smatch_mtag_map.o smatch_mtag_data.o \
91 smatch_param_to_mtag_data.o smatch_mem_tracker.o smatch_array_values.o \
92 smatch_nul_terminator.o smatch_assigned_expr.o smatch_kernel_user_data.o \
93 smatch_statement_count.o smatch_integer_overflow.o smatch_bits.o
94
95 SMATCH_CHECKS=$(shell ls check_*.c | sed -e 's/\.c/.o/')
96 SMATCH_DATA=smatch_data/kernel.allocation_funcs \
97 smatch_data/kernel.frees_argument smatch_data/kernel.puts_argument \
98 smatch_data/kernel.dev_queue_xmit smatch_data/kernel.returns_err_ptr \
99 smatch_data/kernel.dma_funcs smatch_data/kernel.returns_held_funcs \
100 smatch_data/kernel.no_return_funcs
101
102 SMATCH_SCRIPTS=smatch_scripts/add_gfp_to_allocations.sh \
103 smatch_scripts/build_kernel_data.sh \
104 smatch_scripts/call_tree.pl smatch_scripts/filter_kernel_deref_check.sh \
105 smatch_scripts/find_expanded_holes.pl smatch_scripts/find_null_params.sh \
106 smatch_scripts/follow_params.pl smatch_scripts/gen_allocation_list.sh \
107 smatch_scripts/gen_bit_shifters.sh smatch_scripts/gen_dma_funcs.sh \
108 smatch_scripts/generisize.pl smatch_scripts/gen_err_ptr_list.sh \
109 smatch_scripts/gen_expects_err_ptr.sh smatch_scripts/gen_frees_list.sh \
110 smatch_scripts/gen_gfp_flags.sh smatch_scripts/gen_no_return_funcs.sh \
111 smatch_scripts/gen_puts_list.sh smatch_scripts/gen_returns_held.sh \
112 smatch_scripts/gen_rosenberg_funcs.sh smatch_scripts/gen_sizeof_param.sh \
113 smatch_scripts/gen_unwind_functions.sh smatch_scripts/kchecker \
|