From 7e1df7540d519f63b4309b380e69b10ca5bff103 Mon Sep 17 00:00:00 2001 From: Jussi Pakkanen Date: Sat, 26 Dec 2015 20:28:23 +0200 Subject: Handle custom targets that produce static libraries that are then linked to other targets. --- compilers.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'compilers.py') diff --git a/compilers.py b/compilers.py index 06dd1d0..73fd8cd 100644 --- a/compilers.py +++ b/compilers.py @@ -28,6 +28,7 @@ cpp_suffixes = ['cc', 'cpp', 'cxx', 'h', 'hh', 'hpp', 'hxx', 'c++'] c_suffixes = ['c'] clike_suffixes = c_suffixes + cpp_suffixes obj_suffixes = ['o', 'obj', 'res'] +lib_suffixes = ['a', 'lib', 'dll', 'dylib', 'so'] def is_header(fname): if hasattr(fname, 'fname'): @@ -47,6 +48,12 @@ def is_object(fname): suffix = fname.split('.')[-1] return suffix in obj_suffixes +def is_library(fname): + if hasattr(fname, 'fname'): + fname = fname.fname + suffix = fname.split('.')[-1] + return suffix in lib_suffixes + gnulike_buildtype_args = {'plain' : [], 'debug' : ['-g'], 'debugoptimized' : ['-O2', '-g'], -- cgit v1.1