1 VERSION=0.6.1-rc1-il-2
2
3 ########################################################################
4 # The following variables can be overwritten from the command line
5 OS = linux
6
7
8 CC ?= gcc
9 LD = $(CC)
10 AR = ar
11
12 CFLAGS ?= -g
13
14 DESTDIR ?=
15 PREFIX ?= $(HOME)
16 BINDIR ?= $(PREFIX)/bin
17 MANDIR ?= $(PREFIX)/share/man
18
19 PKG_CONFIG ?= pkg-config
20
21 CHECKER_FLAGS ?= -Wno-vla
78 PROGRAMS += example
79 PROGRAMS += graph
80 PROGRAMS += obfuscate
81 PROGRAMS += sparse
82 PROGRAMS += test-dissect
83 PROGRAMS += test-lexing
84 PROGRAMS += test-linearize
85 PROGRAMS += test-parsing
86 PROGRAMS += test-unssa
87
88 INST_PROGRAMS=smatch sparse cgcc
89 INST_MAN1=sparse.1 cgcc.1
90
91
92 all:
93
94 ########################################################################
95 # common flags/options/...
96
97 cflags = -fno-strict-aliasing
98 cflags += -Wall -Wwrite-strings -Wno-switch
99
100 GCC_BASE := $(shell $(CC) --print-file-name=)
101 cflags += -DGCC_BASE=\"$(GCC_BASE)\"
102
103 MULTIARCH_TRIPLET := $(shell $(CC) -print-multiarch 2>/dev/null)
104 cflags += -DMULTIARCH_TRIPLET=\"$(MULTIARCH_TRIPLET)\"
105
106
107 bindir := $(DESTDIR)$(BINDIR)
108 man1dir := $(DESTDIR)$(MANDIR)/man1
109
110 ########################################################################
111 # target specificities
112
113 compile: compile-i386.o
114 EXTRA_OBJS += compile-i386.o
115
116 # Can we use GCC's generated dependencies?
117 HAVE_GCC_DEP:=$(shell touch .gcc-test.c && \
118 $(CC) -c -Wp,-MP,-MMD,.gcc-test.d .gcc-test.c 2>/dev/null && \
237 SMATCH_OBJS += smatch_impossible.o
238 SMATCH_OBJS += smatch_integer_overflow.o
239 SMATCH_OBJS += smatch_kernel_user_data.o
240 SMATCH_OBJS += smatch_links.o
241 SMATCH_OBJS += smatch_math.o
242 SMATCH_OBJS += smatch_mem_tracker.o
243 SMATCH_OBJS += smatch_modification_hooks.o
244 SMATCH_OBJS += smatch_mtag_data.o
245 SMATCH_OBJS += smatch_mtag_map.o
246 SMATCH_OBJS += smatch_mtag.o
247 SMATCH_OBJS += smatch_nul_terminator.o
248 SMATCH_OBJS += smatch_param_cleared.o
249 SMATCH_OBJS += smatch_param_compare_limit.o
250 SMATCH_OBJS += smatch_parameter_names.o
251 SMATCH_OBJS += smatch_param_filter.o
252 SMATCH_OBJS += smatch_param_limit.o
253 SMATCH_OBJS += smatch_param_set.o
254 SMATCH_OBJS += smatch_param_to_mtag_data.o
255 SMATCH_OBJS += smatch_param_used.o
256 SMATCH_OBJS += smatch_parse_call_math.o
257 SMATCH_OBJS += smatch_passes_array_size.o
258 SMATCH_OBJS += smatch_project.o
259 SMATCH_OBJS += smatch_ranges.o
260 SMATCH_OBJS += smatch_real_absolute.o
261 SMATCH_OBJS += smatch_recurse.o
262 SMATCH_OBJS += smatch_returns.o
263 SMATCH_OBJS += smatch_return_to_param.o
264 SMATCH_OBJS += smatch_scope.o
265 SMATCH_OBJS += smatch_slist.o
266 SMATCH_OBJS += smatch_start_states.o
267 SMATCH_OBJS += smatch_statement_count.o
268 SMATCH_OBJS += smatch_states.o
269 SMATCH_OBJS += smatch_stored_conditions.o
270 SMATCH_OBJS += smatch_string_list.o
271 SMATCH_OBJS += smatch_strings.o
272 SMATCH_OBJS += smatch_strlen.o
273 SMATCH_OBJS += smatch_struct_assignment.o
274 SMATCH_OBJS += smatch_sval.o
275 SMATCH_OBJS += smatch_tracker.o
276 SMATCH_OBJS += smatch_type_links.o
|
1 VERSION=0.6.1-rc1-il-3
2
3 ########################################################################
4 # The following variables can be overwritten from the command line
5 OS = linux
6
7
8 CC ?= gcc
9 LD = $(CC)
10 AR = ar
11
12 CFLAGS ?= -g
13
14 DESTDIR ?=
15 PREFIX ?= $(HOME)
16 BINDIR ?= $(PREFIX)/bin
17 MANDIR ?= $(PREFIX)/share/man
18
19 PKG_CONFIG ?= pkg-config
20
21 CHECKER_FLAGS ?= -Wno-vla
78 PROGRAMS += example
79 PROGRAMS += graph
80 PROGRAMS += obfuscate
81 PROGRAMS += sparse
82 PROGRAMS += test-dissect
83 PROGRAMS += test-lexing
84 PROGRAMS += test-linearize
85 PROGRAMS += test-parsing
86 PROGRAMS += test-unssa
87
88 INST_PROGRAMS=smatch sparse cgcc
89 INST_MAN1=sparse.1 cgcc.1
90
91
92 all:
93
94 ########################################################################
95 # common flags/options/...
96
97 cflags = -fno-strict-aliasing
98 cflags += -Wall -Wwrite-strings -Wno-switch -Wno-psabi
99
100 GCC_BASE := $(shell $(CC) --print-file-name=)
101 cflags += -DGCC_BASE=\"$(GCC_BASE)\"
102
103 MULTIARCH_TRIPLET := $(shell $(CC) -print-multiarch 2>/dev/null)
104 cflags += -DMULTIARCH_TRIPLET=\"$(MULTIARCH_TRIPLET)\"
105
106
107 bindir := $(DESTDIR)$(BINDIR)
108 man1dir := $(DESTDIR)$(MANDIR)/man1
109
110 ########################################################################
111 # target specificities
112
113 compile: compile-i386.o
114 EXTRA_OBJS += compile-i386.o
115
116 # Can we use GCC's generated dependencies?
117 HAVE_GCC_DEP:=$(shell touch .gcc-test.c && \
118 $(CC) -c -Wp,-MP,-MMD,.gcc-test.d .gcc-test.c 2>/dev/null && \
237 SMATCH_OBJS += smatch_impossible.o
238 SMATCH_OBJS += smatch_integer_overflow.o
239 SMATCH_OBJS += smatch_kernel_user_data.o
240 SMATCH_OBJS += smatch_links.o
241 SMATCH_OBJS += smatch_math.o
242 SMATCH_OBJS += smatch_mem_tracker.o
243 SMATCH_OBJS += smatch_modification_hooks.o
244 SMATCH_OBJS += smatch_mtag_data.o
245 SMATCH_OBJS += smatch_mtag_map.o
246 SMATCH_OBJS += smatch_mtag.o
247 SMATCH_OBJS += smatch_nul_terminator.o
248 SMATCH_OBJS += smatch_param_cleared.o
249 SMATCH_OBJS += smatch_param_compare_limit.o
250 SMATCH_OBJS += smatch_parameter_names.o
251 SMATCH_OBJS += smatch_param_filter.o
252 SMATCH_OBJS += smatch_param_limit.o
253 SMATCH_OBJS += smatch_param_set.o
254 SMATCH_OBJS += smatch_param_to_mtag_data.o
255 SMATCH_OBJS += smatch_param_used.o
256 SMATCH_OBJS += smatch_parse_call_math.o
257 SMATCH_OBJS += smatch_parsed_conditions.o
258 SMATCH_OBJS += smatch_passes_array_size.o
259 SMATCH_OBJS += smatch_project.o
260 SMATCH_OBJS += smatch_ranges.o
261 SMATCH_OBJS += smatch_real_absolute.o
262 SMATCH_OBJS += smatch_recurse.o
263 SMATCH_OBJS += smatch_returns.o
264 SMATCH_OBJS += smatch_return_to_param.o
265 SMATCH_OBJS += smatch_scope.o
266 SMATCH_OBJS += smatch_slist.o
267 SMATCH_OBJS += smatch_start_states.o
268 SMATCH_OBJS += smatch_statement_count.o
269 SMATCH_OBJS += smatch_states.o
270 SMATCH_OBJS += smatch_stored_conditions.o
271 SMATCH_OBJS += smatch_string_list.o
272 SMATCH_OBJS += smatch_strings.o
273 SMATCH_OBJS += smatch_strlen.o
274 SMATCH_OBJS += smatch_struct_assignment.o
275 SMATCH_OBJS += smatch_sval.o
276 SMATCH_OBJS += smatch_tracker.o
277 SMATCH_OBJS += smatch_type_links.o
|