X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=tools%2Flttng-gen-tp;h=ed0c48fa549973f844e4001cb99adbc2b8325959;hb=86a4e97112c40b1ec823c60de8138d6bb55262fe;hp=8ae243f682360b2916985dad0bc39facb60b5904;hpb=2d9c7df199d251c3094cd9ce241a59e78bc4ade3;p=lttng-ust.git diff --git a/tools/lttng-gen-tp b/tools/lttng-gen-tp index 8ae243f6..ed0c48fa 100755 --- a/tools/lttng-gen-tp +++ b/tools/lttng-gen-tp @@ -35,11 +35,6 @@ class HeaderFile: #undef TRACEPOINT_INCLUDE #define TRACEPOINT_INCLUDE "./{headerFilename}" -#ifdef __cplusplus -extern "C"{{ -#endif /* __cplusplus */ - - #if !defined({includeGuard}) || defined(TRACEPOINT_HEADER_MULTI_READ) #define {includeGuard} @@ -50,11 +45,6 @@ extern "C"{{ #endif /* {includeGuard} */ #include - -#ifdef __cplusplus -}} -#endif /* __cplusplus */ - """ def __init__(self, filename, template): self.outputFilename = filename @@ -140,12 +130,20 @@ class ObjFile: cc = self._detectCC() if cc == "": raise RuntimeError("No C Compiler detected") + if 'CPPFLAGS' in os.environ: + cppflags = os.environ['CPPFLAGS'] + else: + cppflags = "" if 'CFLAGS' in os.environ: cflags = os.environ['CFLAGS'] else: cflags = "" + if 'LDFLAGS' in os.environ: + ldflags = os.environ['LDFLAGS'] + else: + ldflags = "" - command = cc + " -c " + cflags + " -I. -llttng-ust" + " -o " + self.outputFilename + " " + cFilename + command = cc + " -c " + cppflags + cflags + ldflags + " -I. -llttng-ust" + " -o " + self.outputFilename + " " + cFilename if verbose: print("Compile command: " + command) subprocess.call(command.split())