Greg Kroah-Hartman | b244131 | 2017-11-01 15:07:57 +0100 | [diff] [blame] | 1 | # SPDX-License-Identifier: GPL-2.0 |
Steven Rostedt | f7d8235 | 2012-04-06 00:47:53 +0200 | [diff] [blame] | 2 | # trace-cmd version |
| 3 | EP_VERSION = 1 |
| 4 | EP_PATCHLEVEL = 1 |
| 5 | EP_EXTRAVERSION = 0 |
| 6 | |
| 7 | # file format version |
| 8 | FILE_VERSION = 6 |
| 9 | |
| 10 | MAKEFLAGS += --no-print-directory |
| 11 | |
| 12 | |
| 13 | # Makefiles suck: This macro sets a default value of $(2) for the |
| 14 | # variable named by $(1), unless the variable has been set by |
| 15 | # environment or command line. This is necessary for CC and AR |
| 16 | # because make sets default values, so the simpler ?= approach |
| 17 | # won't work as expected. |
| 18 | define allow-override |
| 19 | $(if $(or $(findstring environment,$(origin $(1))),\ |
| 20 | $(findstring command line,$(origin $(1)))),,\ |
| 21 | $(eval $(1) = $(2))) |
| 22 | endef |
| 23 | |
| 24 | # Allow setting CC and AR, or setting CROSS_COMPILE as a prefix. |
| 25 | $(call allow-override,CC,$(CROSS_COMPILE)gcc) |
| 26 | $(call allow-override,AR,$(CROSS_COMPILE)ar) |
He Kuang | e3d09ec | 2015-05-28 13:28:54 +0000 | [diff] [blame] | 27 | $(call allow-override,NM,$(CROSS_COMPILE)nm) |
Steven Rostedt | f7d8235 | 2012-04-06 00:47:53 +0200 | [diff] [blame] | 28 | |
| 29 | EXT = -std=gnu99 |
| 30 | INSTALL = install |
| 31 | |
| 32 | # Use DESTDIR for installing into a different root directory. |
| 33 | # This is useful for building a package. The program will be |
| 34 | # installed in this directory as if it was the root directory. |
| 35 | # Then the build tool can move it later. |
| 36 | DESTDIR ?= |
| 37 | DESTDIR_SQ = '$(subst ','\'',$(DESTDIR))' |
| 38 | |
Wang Nan | bb53e17 | 2015-05-17 10:56:28 +0000 | [diff] [blame] | 39 | LP64 := $(shell echo __LP64__ | ${CC} ${CFLAGS} -E -x c - | tail -n 1) |
| 40 | ifeq ($(LP64), 1) |
| 41 | libdir_relative = lib64 |
| 42 | else |
| 43 | libdir_relative = lib |
| 44 | endif |
| 45 | |
Steven Rostedt | f7d8235 | 2012-04-06 00:47:53 +0200 | [diff] [blame] | 46 | prefix ?= /usr/local |
Wang Nan | bb53e17 | 2015-05-17 10:56:28 +0000 | [diff] [blame] | 47 | libdir = $(prefix)/$(libdir_relative) |
Steven Rostedt | f7d8235 | 2012-04-06 00:47:53 +0200 | [diff] [blame] | 48 | man_dir = $(prefix)/share/man |
| 49 | man_dir_SQ = '$(subst ','\'',$(man_dir))' |
Steven Rostedt | f7d8235 | 2012-04-06 00:47:53 +0200 | [diff] [blame] | 50 | |
Namhyung Kim | 9f1efa8 | 2013-06-04 14:20:16 +0900 | [diff] [blame] | 51 | export man_dir man_dir_SQ INSTALL |
Steven Rostedt | f7d8235 | 2012-04-06 00:47:53 +0200 | [diff] [blame] | 52 | export DESTDIR DESTDIR_SQ |
| 53 | |
Jiri Olsa | e0e96d0 | 2013-12-03 14:09:17 +0100 | [diff] [blame] | 54 | set_plugin_dir := 1 |
| 55 | |
| 56 | # Set plugin_dir to preffered global plugin location |
| 57 | # If we install under $HOME directory we go under |
| 58 | # $(HOME)/.traceevent/plugins |
| 59 | # |
| 60 | # We dont set PLUGIN_DIR in case we install under $HOME |
| 61 | # directory, because by default the code looks under: |
| 62 | # $(HOME)/.traceevent/plugins by default. |
| 63 | # |
| 64 | ifeq ($(plugin_dir),) |
| 65 | ifeq ($(prefix),$(HOME)) |
| 66 | override plugin_dir = $(HOME)/.traceevent/plugins |
| 67 | set_plugin_dir := 0 |
| 68 | else |
Wang Nan | bb53e17 | 2015-05-17 10:56:28 +0000 | [diff] [blame] | 69 | override plugin_dir = $(libdir)/traceevent/plugins |
Jiri Olsa | e0e96d0 | 2013-12-03 14:09:17 +0100 | [diff] [blame] | 70 | endif |
| 71 | endif |
| 72 | |
| 73 | ifeq ($(set_plugin_dir),1) |
Josh Boyer | b935a58 | 2014-01-22 10:01:48 -0500 | [diff] [blame] | 74 | PLUGIN_DIR = -DPLUGIN_DIR="$(plugin_dir)" |
Jiri Olsa | e0e96d0 | 2013-12-03 14:09:17 +0100 | [diff] [blame] | 75 | PLUGIN_DIR_SQ = '$(subst ','\'',$(PLUGIN_DIR))' |
| 76 | endif |
| 77 | |
Jiri Olsa | 2d58ab9 | 2015-01-07 18:39:45 +0100 | [diff] [blame] | 78 | include ../../scripts/Makefile.include |
Jiri Olsa | c3d090f | 2013-12-19 14:42:02 +0100 | [diff] [blame] | 79 | |
Steven Rostedt | f7d8235 | 2012-04-06 00:47:53 +0200 | [diff] [blame] | 80 | # copy a bit from Linux kbuild |
| 81 | |
| 82 | ifeq ("$(origin V)", "command line") |
| 83 | VERBOSE = $(V) |
| 84 | endif |
| 85 | ifndef VERBOSE |
| 86 | VERBOSE = 0 |
| 87 | endif |
| 88 | |
Jiri Olsa | 2d58ab9 | 2015-01-07 18:39:45 +0100 | [diff] [blame] | 89 | ifeq ($(srctree),) |
Uwe Kleine-König | e19b7ce | 2016-11-22 09:30:26 +0100 | [diff] [blame] | 90 | srctree := $(patsubst %/,%,$(dir $(CURDIR))) |
Jiri Olsa | 2d58ab9 | 2015-01-07 18:39:45 +0100 | [diff] [blame] | 91 | srctree := $(patsubst %/,%,$(dir $(srctree))) |
| 92 | srctree := $(patsubst %/,%,$(dir $(srctree))) |
| 93 | #$(info Determined 'srctree' to be $(srctree)) |
Steven Rostedt | f7d8235 | 2012-04-06 00:47:53 +0200 | [diff] [blame] | 94 | endif |
| 95 | |
Wang Nan | bb53e17 | 2015-05-17 10:56:28 +0000 | [diff] [blame] | 96 | export prefix libdir src obj |
Steven Rostedt | f7d8235 | 2012-04-06 00:47:53 +0200 | [diff] [blame] | 97 | |
| 98 | # Shell quotes |
Wang Nan | bb53e17 | 2015-05-17 10:56:28 +0000 | [diff] [blame] | 99 | libdir_SQ = $(subst ','\'',$(libdir)) |
| 100 | libdir_relative_SQ = $(subst ','\'',$(libdir_relative)) |
Jiri Olsa | e0e96d0 | 2013-12-03 14:09:17 +0100 | [diff] [blame] | 101 | plugin_dir_SQ = $(subst ','\'',$(plugin_dir)) |
Steven Rostedt | f7d8235 | 2012-04-06 00:47:53 +0200 | [diff] [blame] | 102 | |
Steven Rostedt | f7d8235 | 2012-04-06 00:47:53 +0200 | [diff] [blame] | 103 | CONFIG_INCLUDES = |
| 104 | CONFIG_LIBS = |
| 105 | CONFIG_FLAGS = |
| 106 | |
| 107 | VERSION = $(EP_VERSION) |
| 108 | PATCHLEVEL = $(EP_PATCHLEVEL) |
| 109 | EXTRAVERSION = $(EP_EXTRAVERSION) |
| 110 | |
| 111 | OBJ = $@ |
| 112 | N = |
| 113 | |
Steven Rostedt | f7d8235 | 2012-04-06 00:47:53 +0200 | [diff] [blame] | 114 | EVENT_PARSE_VERSION = $(EP_VERSION).$(EP_PATCHLEVEL).$(EP_EXTRAVERSION) |
| 115 | |
Jiri Olsa | fe31672 | 2016-07-31 16:52:34 +0200 | [diff] [blame] | 116 | LIB_TARGET = libtraceevent.a libtraceevent.so.$(EVENT_PARSE_VERSION) |
| 117 | LIB_INSTALL = libtraceevent.a libtraceevent.so* |
| 118 | |
Jiri Olsa | 2d58ab9 | 2015-01-07 18:39:45 +0100 | [diff] [blame] | 119 | INCLUDES = -I. -I $(srctree)/tools/include $(CONFIG_INCLUDES) |
Steven Rostedt | f7d8235 | 2012-04-06 00:47:53 +0200 | [diff] [blame] | 120 | |
Jiri Olsa | 2d58ab9 | 2015-01-07 18:39:45 +0100 | [diff] [blame] | 121 | # Set compile option CFLAGS |
| 122 | ifdef EXTRA_CFLAGS |
| 123 | CFLAGS := $(EXTRA_CFLAGS) |
| 124 | else |
| 125 | CFLAGS := -g -Wall |
| 126 | endif |
Steven Rostedt | f7d8235 | 2012-04-06 00:47:53 +0200 | [diff] [blame] | 127 | |
| 128 | # Append required CFLAGS |
Jiri Olsa | 2d58ab9 | 2015-01-07 18:39:45 +0100 | [diff] [blame] | 129 | override CFLAGS += -fPIC |
Steven Rostedt | f7d8235 | 2012-04-06 00:47:53 +0200 | [diff] [blame] | 130 | override CFLAGS += $(CONFIG_FLAGS) $(INCLUDES) $(PLUGIN_DIR_SQ) |
Arnaldo Carvalho de Melo | c055875b7 | 2012-09-12 14:29:40 -0300 | [diff] [blame] | 131 | override CFLAGS += $(udis86-flags) -D_GNU_SOURCE |
Steven Rostedt | f7d8235 | 2012-04-06 00:47:53 +0200 | [diff] [blame] | 132 | |
| 133 | ifeq ($(VERBOSE),1) |
| 134 | Q = |
Steven Rostedt | f7d8235 | 2012-04-06 00:47:53 +0200 | [diff] [blame] | 135 | else |
| 136 | Q = @ |
Steven Rostedt | f7d8235 | 2012-04-06 00:47:53 +0200 | [diff] [blame] | 137 | endif |
| 138 | |
Masahiro Yamada | 505d308 | 2017-03-09 16:16:33 -0800 | [diff] [blame] | 139 | # Disable command line variables (CFLAGS) override from top |
Jiri Olsa | 2d58ab9 | 2015-01-07 18:39:45 +0100 | [diff] [blame] | 140 | # level Makefile (perf), otherwise build Makefile will get |
| 141 | # the same command line setup. |
| 142 | MAKEOVERRIDES= |
Steven Rostedt | f7d8235 | 2012-04-06 00:47:53 +0200 | [diff] [blame] | 143 | |
Jiri Olsa | 2d58ab9 | 2015-01-07 18:39:45 +0100 | [diff] [blame] | 144 | export srctree OUTPUT CC LD CFLAGS V |
| 145 | build := -f $(srctree)/tools/build/Makefile.build dir=. obj |
Steven Rostedt | f7d8235 | 2012-04-06 00:47:53 +0200 | [diff] [blame] | 146 | |
Jiri Olsa | 2d58ab9 | 2015-01-07 18:39:45 +0100 | [diff] [blame] | 147 | PLUGINS = plugin_jbd2.so |
| 148 | PLUGINS += plugin_hrtimer.so |
| 149 | PLUGINS += plugin_kmem.so |
| 150 | PLUGINS += plugin_kvm.so |
| 151 | PLUGINS += plugin_mac80211.so |
| 152 | PLUGINS += plugin_sched_switch.so |
| 153 | PLUGINS += plugin_function.so |
| 154 | PLUGINS += plugin_xen.so |
| 155 | PLUGINS += plugin_scsi.so |
| 156 | PLUGINS += plugin_cfg80211.so |
Steven Rostedt | f7d8235 | 2012-04-06 00:47:53 +0200 | [diff] [blame] | 157 | |
Jiri Olsa | 2d58ab9 | 2015-01-07 18:39:45 +0100 | [diff] [blame] | 158 | PLUGINS := $(addprefix $(OUTPUT),$(PLUGINS)) |
| 159 | PLUGINS_IN := $(PLUGINS:.so=-in.o) |
Steven Rostedt | f7d8235 | 2012-04-06 00:47:53 +0200 | [diff] [blame] | 160 | |
Jiri Olsa | 39944a7 | 2016-08-01 09:55:51 +0200 | [diff] [blame] | 161 | TE_IN := $(OUTPUT)libtraceevent-in.o |
| 162 | LIB_TARGET := $(addprefix $(OUTPUT),$(LIB_TARGET)) |
He Kuang | e3d09ec | 2015-05-28 13:28:54 +0000 | [diff] [blame] | 163 | DYNAMIC_LIST_FILE := $(OUTPUT)libtraceevent-dynamic-list |
Jiri Olsa | e0e96d0 | 2013-12-03 14:09:17 +0100 | [diff] [blame] | 164 | |
Jiri Olsa | 39944a7 | 2016-08-01 09:55:51 +0200 | [diff] [blame] | 165 | CMD_TARGETS = $(LIB_TARGET) $(PLUGINS) $(DYNAMIC_LIST_FILE) |
Steven Rostedt | f7d8235 | 2012-04-06 00:47:53 +0200 | [diff] [blame] | 166 | |
| 167 | TARGETS = $(CMD_TARGETS) |
| 168 | |
Steven Rostedt | f7d8235 | 2012-04-06 00:47:53 +0200 | [diff] [blame] | 169 | all: all_cmd |
| 170 | |
| 171 | all_cmd: $(CMD_TARGETS) |
| 172 | |
Jiri Olsa | 2d58ab9 | 2015-01-07 18:39:45 +0100 | [diff] [blame] | 173 | $(TE_IN): force |
| 174 | $(Q)$(MAKE) $(build)=libtraceevent |
| 175 | |
Jiri Olsa | fe31672 | 2016-07-31 16:52:34 +0200 | [diff] [blame] | 176 | $(OUTPUT)libtraceevent.so.$(EVENT_PARSE_VERSION): $(TE_IN) |
| 177 | $(QUIET_LINK)$(CC) --shared $^ -Wl,-soname,libtraceevent.so.$(EP_VERSION) -o $@ |
| 178 | @ln -sf $(@F) $(OUTPUT)libtraceevent.so |
| 179 | @ln -sf $(@F) $(OUTPUT)libtraceevent.so.$(EP_VERSION) |
Steven Rostedt | f7d8235 | 2012-04-06 00:47:53 +0200 | [diff] [blame] | 180 | |
Jiri Olsa | 2d58ab9 | 2015-01-07 18:39:45 +0100 | [diff] [blame] | 181 | $(OUTPUT)libtraceevent.a: $(TE_IN) |
Jiri Olsa | e6262e2 | 2013-12-19 14:42:04 +0100 | [diff] [blame] | 182 | $(QUIET_LINK)$(RM) $@; $(AR) rcs $@ $^ |
Steven Rostedt | f7d8235 | 2012-04-06 00:47:53 +0200 | [diff] [blame] | 183 | |
He Kuang | e3d09ec | 2015-05-28 13:28:54 +0000 | [diff] [blame] | 184 | $(OUTPUT)libtraceevent-dynamic-list: $(PLUGINS) |
| 185 | $(QUIET_GEN)$(call do_generate_dynamic_list_file, $(PLUGINS), $@) |
| 186 | |
Jiri Olsa | e0e96d0 | 2013-12-03 14:09:17 +0100 | [diff] [blame] | 187 | plugins: $(PLUGINS) |
| 188 | |
Jiri Olsa | 2d58ab9 | 2015-01-07 18:39:45 +0100 | [diff] [blame] | 189 | __plugin_obj = $(notdir $@) |
| 190 | plugin_obj = $(__plugin_obj:-in.o=) |
Steven Rostedt | f7d8235 | 2012-04-06 00:47:53 +0200 | [diff] [blame] | 191 | |
Jiri Olsa | 2d58ab9 | 2015-01-07 18:39:45 +0100 | [diff] [blame] | 192 | $(PLUGINS_IN): force |
| 193 | $(Q)$(MAKE) $(build)=$(plugin_obj) |
Jiri Olsa | e0e96d0 | 2013-12-03 14:09:17 +0100 | [diff] [blame] | 194 | |
Jiri Olsa | 2d58ab9 | 2015-01-07 18:39:45 +0100 | [diff] [blame] | 195 | $(OUTPUT)%.so: $(OUTPUT)%-in.o |
| 196 | $(QUIET_LINK)$(CC) $(CFLAGS) -shared -nostartfiles -o $@ $^ |
Jiri Olsa | e0e96d0 | 2013-12-03 14:09:17 +0100 | [diff] [blame] | 197 | |
Steven Rostedt | f7d8235 | 2012-04-06 00:47:53 +0200 | [diff] [blame] | 198 | define make_version.h |
Jiri Olsa | 198430b | 2014-01-02 10:53:04 +0100 | [diff] [blame] | 199 | (echo '/* This file is automatically generated. Do not modify. */'; \ |
| 200 | echo \#define VERSION_CODE $(shell \ |
| 201 | expr $(VERSION) \* 256 + $(PATCHLEVEL)); \ |
| 202 | echo '#define EXTRAVERSION ' $(EXTRAVERSION); \ |
| 203 | echo '#define VERSION_STRING "'$(VERSION).$(PATCHLEVEL).$(EXTRAVERSION)'"'; \ |
| 204 | echo '#define FILE_VERSION '$(FILE_VERSION); \ |
| 205 | ) > $1 |
Steven Rostedt | f7d8235 | 2012-04-06 00:47:53 +0200 | [diff] [blame] | 206 | endef |
| 207 | |
| 208 | define update_version.h |
Jiri Olsa | 198430b | 2014-01-02 10:53:04 +0100 | [diff] [blame] | 209 | ($(call make_version.h, $@.tmp); \ |
| 210 | if [ -r $@ ] && cmp -s $@ $@.tmp; then \ |
| 211 | rm -f $@.tmp; \ |
| 212 | else \ |
| 213 | echo ' UPDATE $@'; \ |
| 214 | mv -f $@.tmp $@; \ |
| 215 | fi); |
Steven Rostedt | f7d8235 | 2012-04-06 00:47:53 +0200 | [diff] [blame] | 216 | endef |
| 217 | |
| 218 | ep_version.h: force |
| 219 | $(Q)$(N)$(call update_version.h) |
| 220 | |
| 221 | VERSION_FILES = ep_version.h |
| 222 | |
| 223 | define update_dir |
Jiri Olsa | 198430b | 2014-01-02 10:53:04 +0100 | [diff] [blame] | 224 | (echo $1 > $@.tmp; \ |
| 225 | if [ -r $@ ] && cmp -s $@ $@.tmp; then \ |
| 226 | rm -f $@.tmp; \ |
| 227 | else \ |
| 228 | echo ' UPDATE $@'; \ |
| 229 | mv -f $@.tmp $@; \ |
| 230 | fi); |
Steven Rostedt | f7d8235 | 2012-04-06 00:47:53 +0200 | [diff] [blame] | 231 | endef |
| 232 | |
Steven Rostedt | f7d8235 | 2012-04-06 00:47:53 +0200 | [diff] [blame] | 233 | tags: force |
| 234 | $(RM) tags |
Namhyung Kim | 6545e3a | 2012-06-22 17:10:14 +0900 | [diff] [blame] | 235 | find . -name '*.[ch]' | xargs ctags --extra=+f --c-kinds=+px \ |
| 236 | --regex-c++='/_PE\(([^,)]*).*/PEVENT_ERRNO__\1/' |
Steven Rostedt | f7d8235 | 2012-04-06 00:47:53 +0200 | [diff] [blame] | 237 | |
| 238 | TAGS: force |
| 239 | $(RM) TAGS |
Namhyung Kim | 6545e3a | 2012-06-22 17:10:14 +0900 | [diff] [blame] | 240 | find . -name '*.[ch]' | xargs etags \ |
| 241 | --regex='/_PE(\([^,)]*\).*/PEVENT_ERRNO__\1/' |
Steven Rostedt | f7d8235 | 2012-04-06 00:47:53 +0200 | [diff] [blame] | 242 | |
Jiri Olsa | c121bdb | 2016-07-31 16:49:33 +0200 | [diff] [blame] | 243 | define do_install_mkdir |
| 244 | if [ ! -d '$(DESTDIR_SQ)$1' ]; then \ |
| 245 | $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$1'; \ |
| 246 | fi |
| 247 | endef |
| 248 | |
Steven Rostedt | f7d8235 | 2012-04-06 00:47:53 +0200 | [diff] [blame] | 249 | define do_install |
Jiri Olsa | c121bdb | 2016-07-31 16:49:33 +0200 | [diff] [blame] | 250 | $(call do_install_mkdir,$2); \ |
Jiri Olsa | 722a498 | 2016-07-16 18:57:51 +0200 | [diff] [blame] | 251 | $(INSTALL) $(if $3,-m $3,) $1 '$(DESTDIR_SQ)$2' |
Steven Rostedt | f7d8235 | 2012-04-06 00:47:53 +0200 | [diff] [blame] | 252 | endef |
| 253 | |
Jiri Olsa | 02a82c7 | 2013-12-19 14:42:05 +0100 | [diff] [blame] | 254 | define do_install_plugins |
| 255 | for plugin in $1; do \ |
| 256 | $(call do_install,$$plugin,$(plugin_dir_SQ)); \ |
| 257 | done |
| 258 | endef |
| 259 | |
He Kuang | e3d09ec | 2015-05-28 13:28:54 +0000 | [diff] [blame] | 260 | define do_generate_dynamic_list_file |
David Carrillo-Cisneros | 6467753 | 2017-02-07 21:28:40 -0800 | [diff] [blame] | 261 | symbol_type=`$(NM) -u -D $1 | awk 'NF>1 {print $$1}' | \ |
| 262 | xargs echo "U W w" | tr ' ' '\n' | sort -u | xargs echo`;\ |
| 263 | if [ "$$symbol_type" = "U W w" ];then \ |
| 264 | (echo '{'; \ |
| 265 | $(NM) -u -D $1 | awk 'NF>1 {print "\t"$$2";"}' | sort -u;\ |
| 266 | echo '};'; \ |
| 267 | ) > $2; \ |
| 268 | else \ |
| 269 | (echo Either missing one of [$1] or bad version of $(NM)) 1>&2;\ |
| 270 | fi |
He Kuang | e3d09ec | 2015-05-28 13:28:54 +0000 | [diff] [blame] | 271 | endef |
| 272 | |
Jiri Olsa | e0e96d0 | 2013-12-03 14:09:17 +0100 | [diff] [blame] | 273 | install_lib: all_cmd install_plugins |
Jiri Olsa | 39944a7 | 2016-08-01 09:55:51 +0200 | [diff] [blame] | 274 | $(call QUIET_INSTALL, $(LIB_TARGET)) \ |
Jiri Olsa | fe31672 | 2016-07-31 16:52:34 +0200 | [diff] [blame] | 275 | $(call do_install_mkdir,$(libdir_SQ)); \ |
| 276 | cp -fpR $(LIB_INSTALL) $(DESTDIR)$(libdir_SQ) |
Steven Rostedt | f7d8235 | 2012-04-06 00:47:53 +0200 | [diff] [blame] | 277 | |
Jiri Olsa | 02a82c7 | 2013-12-19 14:42:05 +0100 | [diff] [blame] | 278 | install_plugins: $(PLUGINS) |
| 279 | $(call QUIET_INSTALL, trace_plugins) \ |
| 280 | $(call do_install_plugins, $(PLUGINS)) |
Jiri Olsa | e0e96d0 | 2013-12-03 14:09:17 +0100 | [diff] [blame] | 281 | |
Jiri Olsa | 722a498 | 2016-07-16 18:57:51 +0200 | [diff] [blame] | 282 | install_headers: |
| 283 | $(call QUIET_INSTALL, headers) \ |
| 284 | $(call do_install,event-parse.h,$(prefix)/include/traceevent,644); \ |
| 285 | $(call do_install,event-utils.h,$(prefix)/include/traceevent,644); \ |
| 286 | $(call do_install,kbuffer.h,$(prefix)/include/traceevent,644) |
| 287 | |
Steven Rostedt | f7d8235 | 2012-04-06 00:47:53 +0200 | [diff] [blame] | 288 | install: install_lib |
| 289 | |
| 290 | clean: |
Jiri Olsa | 4a953c7 | 2013-12-19 14:42:06 +0100 | [diff] [blame] | 291 | $(call QUIET_CLEAN, libtraceevent) \ |
Riku Voipio | c867b15 | 2015-06-18 15:52:18 +0300 | [diff] [blame] | 292 | $(RM) *.o *~ $(TARGETS) *.a *.so $(VERSION_FILES) .*.d .*.cmd \ |
Jiri Olsa | 4a953c7 | 2013-12-19 14:42:06 +0100 | [diff] [blame] | 293 | $(RM) TRACEEVENT-CFLAGS tags TAGS |
Steven Rostedt | f7d8235 | 2012-04-06 00:47:53 +0200 | [diff] [blame] | 294 | |
Jiri Olsa | 9bb8e5e | 2014-01-01 17:50:50 +0100 | [diff] [blame] | 295 | PHONY += force plugins |
Steven Rostedt | f7d8235 | 2012-04-06 00:47:53 +0200 | [diff] [blame] | 296 | force: |
| 297 | |
Steven Rostedt | f7d8235 | 2012-04-06 00:47:53 +0200 | [diff] [blame] | 298 | # Declare the contents of the .PHONY variable as phony. We keep that |
| 299 | # information in a variable so we can use it in if_changed and friends. |
| 300 | .PHONY: $(PHONY) |