diff options
| author | Darren Hart <dvhart@linux.intel.com> | 2011-11-30 19:19:20 -0500 |
|---|---|---|
| committer | Steven Rostedt <rostedt@goodmis.org> | 2011-11-30 20:45:45 -0500 |
| commit | 5f576e9af7ad706774d9764a9ae3989376797c0e (patch) | |
| tree | 97f67f8b0aca7e75984d7bedecfa154f98c59e8a /Makefile | |
| parent | 67665b91b3011763872e99a038156f62d6ebec3a (diff) | |
trace-cmd: Cross-compile fixes for LDFLAGS and include path
Add ability for the Makefile to respect LDFLAGS.
Also remove hardcoded /usr/local/include include path.
Link: http://lkml.kernel.org/r/4ED6C808.9030003@linux.intel.com
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 7 |
1 files changed, 4 insertions, 3 deletions
| @@ -202,12 +202,13 @@ export Q VERBOSE | |||
| 202 | TRACECMD_VERSION = $(TC_VERSION).$(TC_PATCHLEVEL).$(TC_EXTRAVERSION) | 202 | TRACECMD_VERSION = $(TC_VERSION).$(TC_PATCHLEVEL).$(TC_EXTRAVERSION) |
| 203 | KERNELSHARK_VERSION = $(KS_VERSION).$(KS_PATCHLEVEL).$(KS_EXTRAVERSION) | 203 | KERNELSHARK_VERSION = $(KS_VERSION).$(KS_PATCHLEVEL).$(KS_EXTRAVERSION) |
| 204 | 204 | ||
| 205 | INCLUDES = -I. -I/usr/local/include $(CONFIG_INCLUDES) | 205 | INCLUDES = -I. $(CONFIG_INCLUDES) |
| 206 | 206 | ||
| 207 | include features.mk | 207 | include features.mk |
| 208 | 208 | ||
| 209 | # Set compile option CFLAGS if not set elsewhere | 209 | # Set compile option CFLAGS if not set elsewhere |
| 210 | CFLAGS ?= -g -Wall | 210 | CFLAGS ?= -g -Wall |
| 211 | LDFLAGS ?= | ||
| 211 | 212 | ||
| 212 | ifndef NO_PTRACE | 213 | ifndef NO_PTRACE |
| 213 | ifneq ($(call try-cc,$(SOURCE_PTRACE),),y) | 214 | ifneq ($(call try-cc,$(SOURCE_PTRACE),),y) |
| @@ -251,7 +252,7 @@ do_fpic_compile = \ | |||
| 251 | 252 | ||
| 252 | do_app_build = \ | 253 | do_app_build = \ |
| 253 | ($(print_app_build) \ | 254 | ($(print_app_build) \ |
| 254 | $(CC) $^ -rdynamic -o $@ $(CONFIG_LIBS) $(LIBS)) | 255 | $(CC) $^ -rdynamic -o $@ $(LDFLAGS) $(CONFIG_LIBS) $(LIBS)) |
| 255 | 256 | ||
| 256 | do_compile_shared_library = \ | 257 | do_compile_shared_library = \ |
| 257 | ($(print_shared_lib_compile) \ | 258 | ($(print_shared_lib_compile) \ |
| @@ -263,7 +264,7 @@ do_compile_plugin_obj = \ | |||
| 263 | 264 | ||
| 264 | do_plugin_build = \ | 265 | do_plugin_build = \ |
| 265 | ($(print_plugin_build) \ | 266 | ($(print_plugin_build) \ |
| 266 | $(CC) $(CFLAGS) -shared -nostartfiles -o $@ $<) | 267 | $(CC) $(CFLAGS) $(LDFLAGS) -shared -nostartfiles -o $@ $<) |
| 267 | 268 | ||
| 268 | do_build_static_lib = \ | 269 | do_build_static_lib = \ |
| 269 | ($(print_static_lib_build) \ | 270 | ($(print_static_lib_build) \ |
