Steven Rostedt | f7d8235 | 2012-04-06 00:47:53 +0200 | [diff] [blame] | 1 | # trace-cmd version |
| 2 | EP_VERSION = 1 |
| 3 | EP_PATCHLEVEL = 1 |
| 4 | EP_EXTRAVERSION = 0 |
| 5 | |
| 6 | # file format version |
| 7 | FILE_VERSION = 6 |
| 8 | |
| 9 | MAKEFLAGS += --no-print-directory |
| 10 | |
| 11 | |
| 12 | # Makefiles suck: This macro sets a default value of $(2) for the |
| 13 | # variable named by $(1), unless the variable has been set by |
| 14 | # environment or command line. This is necessary for CC and AR |
| 15 | # because make sets default values, so the simpler ?= approach |
| 16 | # won't work as expected. |
| 17 | define allow-override |
| 18 | $(if $(or $(findstring environment,$(origin $(1))),\ |
| 19 | $(findstring command line,$(origin $(1)))),,\ |
| 20 | $(eval $(1) = $(2))) |
| 21 | endef |
| 22 | |
| 23 | # Allow setting CC and AR, or setting CROSS_COMPILE as a prefix. |
| 24 | $(call allow-override,CC,$(CROSS_COMPILE)gcc) |
| 25 | $(call allow-override,AR,$(CROSS_COMPILE)ar) |
| 26 | |
| 27 | EXT = -std=gnu99 |
| 28 | INSTALL = install |
| 29 | |
| 30 | # Use DESTDIR for installing into a different root directory. |
| 31 | # This is useful for building a package. The program will be |
| 32 | # installed in this directory as if it was the root directory. |
| 33 | # Then the build tool can move it later. |
| 34 | DESTDIR ?= |
| 35 | DESTDIR_SQ = '$(subst ','\'',$(DESTDIR))' |
| 36 | |
| 37 | prefix ?= /usr/local |
| 38 | bindir_relative = bin |
| 39 | bindir = $(prefix)/$(bindir_relative) |
| 40 | man_dir = $(prefix)/share/man |
| 41 | man_dir_SQ = '$(subst ','\'',$(man_dir))' |
Steven Rostedt | f7d8235 | 2012-04-06 00:47:53 +0200 | [diff] [blame] | 42 | |
Namhyung Kim | 9f1efa8 | 2013-06-04 14:20:16 +0900 | [diff] [blame] | 43 | export man_dir man_dir_SQ INSTALL |
Steven Rostedt | f7d8235 | 2012-04-06 00:47:53 +0200 | [diff] [blame] | 44 | export DESTDIR DESTDIR_SQ |
| 45 | |
Jiri Olsa | e0e96d0 | 2013-12-03 14:09:17 +0100 | [diff] [blame] | 46 | set_plugin_dir := 1 |
| 47 | |
| 48 | # Set plugin_dir to preffered global plugin location |
| 49 | # If we install under $HOME directory we go under |
| 50 | # $(HOME)/.traceevent/plugins |
| 51 | # |
| 52 | # We dont set PLUGIN_DIR in case we install under $HOME |
| 53 | # directory, because by default the code looks under: |
| 54 | # $(HOME)/.traceevent/plugins by default. |
| 55 | # |
| 56 | ifeq ($(plugin_dir),) |
| 57 | ifeq ($(prefix),$(HOME)) |
| 58 | override plugin_dir = $(HOME)/.traceevent/plugins |
| 59 | set_plugin_dir := 0 |
| 60 | else |
| 61 | override plugin_dir = $(prefix)/lib/traceevent/plugins |
| 62 | endif |
| 63 | endif |
| 64 | |
| 65 | ifeq ($(set_plugin_dir),1) |
Josh Boyer | b935a58 | 2014-01-22 10:01:48 -0500 | [diff] [blame] | 66 | PLUGIN_DIR = -DPLUGIN_DIR="$(plugin_dir)" |
Jiri Olsa | e0e96d0 | 2013-12-03 14:09:17 +0100 | [diff] [blame] | 67 | PLUGIN_DIR_SQ = '$(subst ','\'',$(PLUGIN_DIR))' |
| 68 | endif |
| 69 | |
Jiri Olsa | c3d090f | 2013-12-19 14:42:02 +0100 | [diff] [blame] | 70 | include $(if $(BUILD_SRC),$(BUILD_SRC)/)../../scripts/Makefile.include |
| 71 | |
Steven Rostedt | f7d8235 | 2012-04-06 00:47:53 +0200 | [diff] [blame] | 72 | # copy a bit from Linux kbuild |
| 73 | |
| 74 | ifeq ("$(origin V)", "command line") |
| 75 | VERBOSE = $(V) |
| 76 | endif |
| 77 | ifndef VERBOSE |
| 78 | VERBOSE = 0 |
| 79 | endif |
| 80 | |
| 81 | ifeq ("$(origin O)", "command line") |
| 82 | BUILD_OUTPUT := $(O) |
| 83 | endif |
| 84 | |
| 85 | ifeq ($(BUILD_SRC),) |
Jiri Olsa | 4c7aafc | 2013-12-19 14:42:07 +0100 | [diff] [blame] | 86 | ifneq ($(OUTPUT),) |
Steven Rostedt | f7d8235 | 2012-04-06 00:47:53 +0200 | [diff] [blame] | 87 | |
| 88 | define build_output |
Jiri Olsa | 198430b | 2014-01-02 10:53:04 +0100 | [diff] [blame] | 89 | $(if $(VERBOSE:1=),@)+$(MAKE) -C $(OUTPUT) \ |
| 90 | BUILD_SRC=$(CURDIR)/ -f $(CURDIR)/Makefile $1 |
Steven Rostedt | f7d8235 | 2012-04-06 00:47:53 +0200 | [diff] [blame] | 91 | endef |
| 92 | |
Steven Rostedt | f7d8235 | 2012-04-06 00:47:53 +0200 | [diff] [blame] | 93 | all: sub-make |
| 94 | |
Namhyung Kim | 4ccdf57 | 2013-06-04 14:20:17 +0900 | [diff] [blame] | 95 | $(MAKECMDGOALS): sub-make |
Steven Rostedt | f7d8235 | 2012-04-06 00:47:53 +0200 | [diff] [blame] | 96 | |
| 97 | sub-make: force |
| 98 | $(call build_output, $(MAKECMDGOALS)) |
| 99 | |
| 100 | |
| 101 | # Leave processing to above invocation of make |
| 102 | skip-makefile := 1 |
| 103 | |
Jiri Olsa | 4c7aafc | 2013-12-19 14:42:07 +0100 | [diff] [blame] | 104 | endif # OUTPUT |
Steven Rostedt | f7d8235 | 2012-04-06 00:47:53 +0200 | [diff] [blame] | 105 | endif # BUILD_SRC |
| 106 | |
| 107 | # We process the rest of the Makefile if this is the final invocation of make |
| 108 | ifeq ($(skip-makefile),) |
| 109 | |
| 110 | srctree := $(if $(BUILD_SRC),$(BUILD_SRC),$(CURDIR)) |
| 111 | objtree := $(CURDIR) |
| 112 | src := $(srctree) |
| 113 | obj := $(objtree) |
| 114 | |
| 115 | export prefix bindir src obj |
| 116 | |
| 117 | # Shell quotes |
| 118 | bindir_SQ = $(subst ','\'',$(bindir)) |
| 119 | bindir_relative_SQ = $(subst ','\'',$(bindir_relative)) |
Jiri Olsa | e0e96d0 | 2013-12-03 14:09:17 +0100 | [diff] [blame] | 120 | plugin_dir_SQ = $(subst ','\'',$(plugin_dir)) |
Steven Rostedt | f7d8235 | 2012-04-06 00:47:53 +0200 | [diff] [blame] | 121 | |
| 122 | LIB_FILE = libtraceevent.a libtraceevent.so |
| 123 | |
| 124 | CONFIG_INCLUDES = |
| 125 | CONFIG_LIBS = |
| 126 | CONFIG_FLAGS = |
| 127 | |
| 128 | VERSION = $(EP_VERSION) |
| 129 | PATCHLEVEL = $(EP_PATCHLEVEL) |
| 130 | EXTRAVERSION = $(EP_EXTRAVERSION) |
| 131 | |
| 132 | OBJ = $@ |
| 133 | N = |
| 134 | |
| 135 | export Q VERBOSE |
| 136 | |
| 137 | EVENT_PARSE_VERSION = $(EP_VERSION).$(EP_PATCHLEVEL).$(EP_EXTRAVERSION) |
| 138 | |
Namhyung Kim | 3c6d8d8 | 2013-12-19 18:17:44 +0900 | [diff] [blame] | 139 | INCLUDES = -I. -I $(srctree)/../../include $(CONFIG_INCLUDES) |
Steven Rostedt | f7d8235 | 2012-04-06 00:47:53 +0200 | [diff] [blame] | 140 | |
| 141 | # Set compile option CFLAGS if not set elsewhere |
| 142 | CFLAGS ?= -g -Wall |
| 143 | |
| 144 | # Append required CFLAGS |
| 145 | override CFLAGS += $(CONFIG_FLAGS) $(INCLUDES) $(PLUGIN_DIR_SQ) |
Arnaldo Carvalho de Melo | c055875 | 2012-09-12 14:29:40 -0300 | [diff] [blame] | 146 | override CFLAGS += $(udis86-flags) -D_GNU_SOURCE |
Steven Rostedt | f7d8235 | 2012-04-06 00:47:53 +0200 | [diff] [blame] | 147 | |
| 148 | ifeq ($(VERBOSE),1) |
| 149 | Q = |
Steven Rostedt | f7d8235 | 2012-04-06 00:47:53 +0200 | [diff] [blame] | 150 | else |
| 151 | Q = @ |
Steven Rostedt | f7d8235 | 2012-04-06 00:47:53 +0200 | [diff] [blame] | 152 | endif |
| 153 | |
Steven Rostedt | f7d8235 | 2012-04-06 00:47:53 +0200 | [diff] [blame] | 154 | do_compile_shared_library = \ |
| 155 | ($(print_shared_lib_compile) \ |
| 156 | $(CC) --shared $^ -o $@) |
| 157 | |
Steven Rostedt | f7d8235 | 2012-04-06 00:47:53 +0200 | [diff] [blame] | 158 | do_plugin_build = \ |
| 159 | ($(print_plugin_build) \ |
| 160 | $(CC) $(CFLAGS) -shared -nostartfiles -o $@ $<) |
| 161 | |
| 162 | do_build_static_lib = \ |
| 163 | ($(print_static_lib_build) \ |
| 164 | $(RM) $@; $(AR) rcs $@ $^) |
| 165 | |
| 166 | |
Jiri Olsa | c3d090f | 2013-12-19 14:42:02 +0100 | [diff] [blame] | 167 | do_compile = $(QUIET_CC)$(CC) -c $(CFLAGS) $(EXT) $< -o $(obj)/$@; |
Steven Rostedt | f7d8235 | 2012-04-06 00:47:53 +0200 | [diff] [blame] | 168 | |
| 169 | $(obj)/%.o: $(src)/%.c |
Jiri Olsa | c3d090f | 2013-12-19 14:42:02 +0100 | [diff] [blame] | 170 | $(call do_compile) |
Steven Rostedt | f7d8235 | 2012-04-06 00:47:53 +0200 | [diff] [blame] | 171 | |
| 172 | %.o: $(src)/%.c |
Jiri Olsa | c3d090f | 2013-12-19 14:42:02 +0100 | [diff] [blame] | 173 | $(call do_compile) |
Steven Rostedt | f7d8235 | 2012-04-06 00:47:53 +0200 | [diff] [blame] | 174 | |
Jiri Olsa | c877bbd | 2013-12-03 14:09:16 +0100 | [diff] [blame] | 175 | PEVENT_LIB_OBJS = event-parse.o |
| 176 | PEVENT_LIB_OBJS += event-plugin.o |
| 177 | PEVENT_LIB_OBJS += trace-seq.o |
| 178 | PEVENT_LIB_OBJS += parse-filter.o |
| 179 | PEVENT_LIB_OBJS += parse-utils.o |
Namhyung Kim | d6c2522 | 2013-06-04 14:20:21 +0900 | [diff] [blame] | 180 | PEVENT_LIB_OBJS += kbuffer-parse.o |
Steven Rostedt | f7d8235 | 2012-04-06 00:47:53 +0200 | [diff] [blame] | 181 | |
Jiri Olsa | d9d13f8 | 2013-12-03 14:09:27 +0100 | [diff] [blame] | 182 | PLUGIN_OBJS = plugin_jbd2.o |
| 183 | PLUGIN_OBJS += plugin_hrtimer.o |
Jiri Olsa | f825628 | 2013-12-03 14:09:28 +0100 | [diff] [blame] | 184 | PLUGIN_OBJS += plugin_kmem.o |
Jiri Olsa | 35d79f9f | 2013-12-03 14:09:29 +0100 | [diff] [blame] | 185 | PLUGIN_OBJS += plugin_kvm.o |
Jiri Olsa | de705e2 | 2013-12-03 14:09:30 +0100 | [diff] [blame] | 186 | PLUGIN_OBJS += plugin_mac80211.o |
Jiri Olsa | 83e815e | 2013-12-03 14:09:31 +0100 | [diff] [blame] | 187 | PLUGIN_OBJS += plugin_sched_switch.o |
Jiri Olsa | 07a180a | 2013-12-03 14:09:32 +0100 | [diff] [blame] | 188 | PLUGIN_OBJS += plugin_function.o |
Jiri Olsa | 40c03ad | 2013-12-03 14:09:33 +0100 | [diff] [blame] | 189 | PLUGIN_OBJS += plugin_xen.o |
Jiri Olsa | 0401092 | 2013-12-03 14:09:34 +0100 | [diff] [blame] | 190 | PLUGIN_OBJS += plugin_scsi.o |
Jiri Olsa | 9437147 | 2013-12-03 14:09:35 +0100 | [diff] [blame] | 191 | PLUGIN_OBJS += plugin_cfg80211.o |
Jiri Olsa | e0549f1 | 2013-12-03 14:09:26 +0100 | [diff] [blame] | 192 | |
Jiri Olsa | e0e96d0 | 2013-12-03 14:09:17 +0100 | [diff] [blame] | 193 | PLUGINS := $(PLUGIN_OBJS:.o=.so) |
Steven Rostedt | f7d8235 | 2012-04-06 00:47:53 +0200 | [diff] [blame] | 194 | |
Jiri Olsa | e0e96d0 | 2013-12-03 14:09:17 +0100 | [diff] [blame] | 195 | ALL_OBJS = $(PEVENT_LIB_OBJS) $(PLUGIN_OBJS) |
| 196 | |
| 197 | CMD_TARGETS = $(LIB_FILE) $(PLUGINS) |
Steven Rostedt | f7d8235 | 2012-04-06 00:47:53 +0200 | [diff] [blame] | 198 | |
| 199 | TARGETS = $(CMD_TARGETS) |
| 200 | |
| 201 | |
| 202 | all: all_cmd |
| 203 | |
| 204 | all_cmd: $(CMD_TARGETS) |
| 205 | |
| 206 | libtraceevent.so: $(PEVENT_LIB_OBJS) |
Jiri Olsa | e6262e2 | 2013-12-19 14:42:04 +0100 | [diff] [blame] | 207 | $(QUIET_LINK)$(CC) --shared $^ -o $@ |
Steven Rostedt | f7d8235 | 2012-04-06 00:47:53 +0200 | [diff] [blame] | 208 | |
| 209 | libtraceevent.a: $(PEVENT_LIB_OBJS) |
Jiri Olsa | e6262e2 | 2013-12-19 14:42:04 +0100 | [diff] [blame] | 210 | $(QUIET_LINK)$(RM) $@; $(AR) rcs $@ $^ |
Steven Rostedt | f7d8235 | 2012-04-06 00:47:53 +0200 | [diff] [blame] | 211 | |
Jiri Olsa | e0e96d0 | 2013-12-03 14:09:17 +0100 | [diff] [blame] | 212 | plugins: $(PLUGINS) |
| 213 | |
Namhyung Kim | 52b5c0d | 2012-07-06 16:21:32 +0900 | [diff] [blame] | 214 | $(PEVENT_LIB_OBJS): %.o: $(src)/%.c TRACEEVENT-CFLAGS |
Jiri Olsa | bdebbac | 2013-12-19 14:42:03 +0100 | [diff] [blame] | 215 | $(QUIET_CC_FPIC)$(CC) -c $(CFLAGS) $(EXT) -fPIC $< -o $@ |
Steven Rostedt | f7d8235 | 2012-04-06 00:47:53 +0200 | [diff] [blame] | 216 | |
Jiri Olsa | e0e96d0 | 2013-12-03 14:09:17 +0100 | [diff] [blame] | 217 | $(PLUGIN_OBJS): %.o : $(src)/%.c |
Jiri Olsa | bdebbac | 2013-12-19 14:42:03 +0100 | [diff] [blame] | 218 | $(QUIET_CC_FPIC)$(CC) -c $(CFLAGS) -fPIC -o $@ $< |
Jiri Olsa | e0e96d0 | 2013-12-03 14:09:17 +0100 | [diff] [blame] | 219 | |
| 220 | $(PLUGINS): %.so: %.o |
Jiri Olsa | e6262e2 | 2013-12-19 14:42:04 +0100 | [diff] [blame] | 221 | $(QUIET_LINK)$(CC) $(CFLAGS) -shared -nostartfiles -o $@ $< |
Jiri Olsa | e0e96d0 | 2013-12-03 14:09:17 +0100 | [diff] [blame] | 222 | |
Steven Rostedt | f7d8235 | 2012-04-06 00:47:53 +0200 | [diff] [blame] | 223 | define make_version.h |
Jiri Olsa | 198430b | 2014-01-02 10:53:04 +0100 | [diff] [blame] | 224 | (echo '/* This file is automatically generated. Do not modify. */'; \ |
| 225 | echo \#define VERSION_CODE $(shell \ |
| 226 | expr $(VERSION) \* 256 + $(PATCHLEVEL)); \ |
| 227 | echo '#define EXTRAVERSION ' $(EXTRAVERSION); \ |
| 228 | echo '#define VERSION_STRING "'$(VERSION).$(PATCHLEVEL).$(EXTRAVERSION)'"'; \ |
| 229 | echo '#define FILE_VERSION '$(FILE_VERSION); \ |
| 230 | ) > $1 |
Steven Rostedt | f7d8235 | 2012-04-06 00:47:53 +0200 | [diff] [blame] | 231 | endef |
| 232 | |
| 233 | define update_version.h |
Jiri Olsa | 198430b | 2014-01-02 10:53:04 +0100 | [diff] [blame] | 234 | ($(call make_version.h, $@.tmp); \ |
| 235 | if [ -r $@ ] && cmp -s $@ $@.tmp; then \ |
| 236 | rm -f $@.tmp; \ |
| 237 | else \ |
| 238 | echo ' UPDATE $@'; \ |
| 239 | mv -f $@.tmp $@; \ |
| 240 | fi); |
Steven Rostedt | f7d8235 | 2012-04-06 00:47:53 +0200 | [diff] [blame] | 241 | endef |
| 242 | |
| 243 | ep_version.h: force |
| 244 | $(Q)$(N)$(call update_version.h) |
| 245 | |
| 246 | VERSION_FILES = ep_version.h |
| 247 | |
| 248 | define update_dir |
Jiri Olsa | 198430b | 2014-01-02 10:53:04 +0100 | [diff] [blame] | 249 | (echo $1 > $@.tmp; \ |
| 250 | if [ -r $@ ] && cmp -s $@ $@.tmp; then \ |
| 251 | rm -f $@.tmp; \ |
| 252 | else \ |
| 253 | echo ' UPDATE $@'; \ |
| 254 | mv -f $@.tmp $@; \ |
| 255 | fi); |
Steven Rostedt | f7d8235 | 2012-04-06 00:47:53 +0200 | [diff] [blame] | 256 | endef |
| 257 | |
| 258 | ## make deps |
| 259 | |
| 260 | all_objs := $(sort $(ALL_OBJS)) |
| 261 | all_deps := $(all_objs:%.o=.%.d) |
| 262 | |
Namhyung Kim | 860df58 | 2012-06-22 14:37:36 +0900 | [diff] [blame] | 263 | # let .d file also depends on the source and header files |
Steven Rostedt | f7d8235 | 2012-04-06 00:47:53 +0200 | [diff] [blame] | 264 | define check_deps |
Jiri Olsa | 198430b | 2014-01-02 10:53:04 +0100 | [diff] [blame] | 265 | @set -e; $(RM) $@; \ |
| 266 | $(CC) -MM $(CFLAGS) $< > $@.$$$$; \ |
| 267 | sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \ |
| 268 | $(RM) $@.$$$$ |
Steven Rostedt | f7d8235 | 2012-04-06 00:47:53 +0200 | [diff] [blame] | 269 | endef |
| 270 | |
Steven Rostedt | f7d8235 | 2012-04-06 00:47:53 +0200 | [diff] [blame] | 271 | $(all_deps): .%.d: $(src)/%.c |
| 272 | $(Q)$(call check_deps) |
| 273 | |
| 274 | $(all_objs) : %.o : .%.d |
| 275 | |
| 276 | dep_includes := $(wildcard $(all_deps)) |
| 277 | |
| 278 | ifneq ($(dep_includes),) |
| 279 | include $(dep_includes) |
| 280 | endif |
| 281 | |
Namhyung Kim | 52b5c0d | 2012-07-06 16:21:32 +0900 | [diff] [blame] | 282 | ### Detect environment changes |
| 283 | TRACK_CFLAGS = $(subst ','\'',$(CFLAGS)):$(ARCH):$(CROSS_COMPILE) |
| 284 | |
| 285 | TRACEEVENT-CFLAGS: force |
| 286 | @FLAGS='$(TRACK_CFLAGS)'; \ |
| 287 | if test x"$$FLAGS" != x"`cat TRACEEVENT-CFLAGS 2>/dev/null`" ; then \ |
Ingo Molnar | 65fb099 | 2013-10-09 11:49:27 +0200 | [diff] [blame] | 288 | echo 1>&2 " FLAGS: * new build flags or cross compiler"; \ |
Namhyung Kim | 52b5c0d | 2012-07-06 16:21:32 +0900 | [diff] [blame] | 289 | echo "$$FLAGS" >TRACEEVENT-CFLAGS; \ |
| 290 | fi |
| 291 | |
Steven Rostedt | f7d8235 | 2012-04-06 00:47:53 +0200 | [diff] [blame] | 292 | tags: force |
| 293 | $(RM) tags |
Namhyung Kim | 6545e3a | 2012-06-22 17:10:14 +0900 | [diff] [blame] | 294 | find . -name '*.[ch]' | xargs ctags --extra=+f --c-kinds=+px \ |
| 295 | --regex-c++='/_PE\(([^,)]*).*/PEVENT_ERRNO__\1/' |
Steven Rostedt | f7d8235 | 2012-04-06 00:47:53 +0200 | [diff] [blame] | 296 | |
| 297 | TAGS: force |
| 298 | $(RM) TAGS |
Namhyung Kim | 6545e3a | 2012-06-22 17:10:14 +0900 | [diff] [blame] | 299 | find . -name '*.[ch]' | xargs etags \ |
| 300 | --regex='/_PE(\([^,)]*\).*/PEVENT_ERRNO__\1/' |
Steven Rostedt | f7d8235 | 2012-04-06 00:47:53 +0200 | [diff] [blame] | 301 | |
| 302 | define do_install |
Steven Rostedt | f7d8235 | 2012-04-06 00:47:53 +0200 | [diff] [blame] | 303 | if [ ! -d '$(DESTDIR_SQ)$2' ]; then \ |
| 304 | $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$2'; \ |
| 305 | fi; \ |
| 306 | $(INSTALL) $1 '$(DESTDIR_SQ)$2' |
| 307 | endef |
| 308 | |
Jiri Olsa | 02a82c7 | 2013-12-19 14:42:05 +0100 | [diff] [blame] | 309 | define do_install_plugins |
| 310 | for plugin in $1; do \ |
| 311 | $(call do_install,$$plugin,$(plugin_dir_SQ)); \ |
| 312 | done |
| 313 | endef |
| 314 | |
Jiri Olsa | e0e96d0 | 2013-12-03 14:09:17 +0100 | [diff] [blame] | 315 | install_lib: all_cmd install_plugins |
Jiri Olsa | 02a82c7 | 2013-12-19 14:42:05 +0100 | [diff] [blame] | 316 | $(call QUIET_INSTALL, $(LIB_FILE)) \ |
| 317 | $(call do_install,$(LIB_FILE),$(bindir_SQ)) |
Steven Rostedt | f7d8235 | 2012-04-06 00:47:53 +0200 | [diff] [blame] | 318 | |
Jiri Olsa | 02a82c7 | 2013-12-19 14:42:05 +0100 | [diff] [blame] | 319 | install_plugins: $(PLUGINS) |
| 320 | $(call QUIET_INSTALL, trace_plugins) \ |
| 321 | $(call do_install_plugins, $(PLUGINS)) |
Jiri Olsa | e0e96d0 | 2013-12-03 14:09:17 +0100 | [diff] [blame] | 322 | |
Steven Rostedt | f7d8235 | 2012-04-06 00:47:53 +0200 | [diff] [blame] | 323 | install: install_lib |
| 324 | |
| 325 | clean: |
Jiri Olsa | 4a953c7 | 2013-12-19 14:42:06 +0100 | [diff] [blame] | 326 | $(call QUIET_CLEAN, libtraceevent) \ |
| 327 | $(RM) *.o *~ $(TARGETS) *.a *.so $(VERSION_FILES) .*.d \ |
| 328 | $(RM) TRACEEVENT-CFLAGS tags TAGS |
Steven Rostedt | f7d8235 | 2012-04-06 00:47:53 +0200 | [diff] [blame] | 329 | |
| 330 | endif # skip-makefile |
| 331 | |
Jiri Olsa | 9bb8e5e | 2014-01-01 17:50:50 +0100 | [diff] [blame] | 332 | PHONY += force plugins |
Steven Rostedt | f7d8235 | 2012-04-06 00:47:53 +0200 | [diff] [blame] | 333 | force: |
| 334 | |
Jiri Olsa | 9bb8e5e | 2014-01-01 17:50:50 +0100 | [diff] [blame] | 335 | plugins: |
| 336 | @echo > /dev/null |
| 337 | |
Steven Rostedt | f7d8235 | 2012-04-06 00:47:53 +0200 | [diff] [blame] | 338 | # Declare the contents of the .PHONY variable as phony. We keep that |
| 339 | # information in a variable so we can use it in if_changed and friends. |
| 340 | .PHONY: $(PHONY) |