diff options
Diffstat (limited to 'Makefile.include')
-rw-r--r-- | Makefile.include | 37 |
1 files changed, 15 insertions, 22 deletions
diff --git a/Makefile.include b/Makefile.include index dccc69d0..cd8ae7d7 100644 --- a/Makefile.include +++ b/Makefile.include @@ -33,11 +33,23 @@ endef # Run the C Preprocessor with file $1 and return the last line, removing quotes. define c_macro_test -$(strip $(shell $(CC) -E $1 2>/dev/null | tail -1 | tr -d '"')) +$(strip $(call debug_shell, $(CC) -E $1 | tail -1 | tr -d '"')) endef -define c_compile_test -$(shell $(CC) -c -Wall -Werror -o /dev/null $1 2>/dev/null && echo yes || echo no) +define c_compile_test # $1: files to compile, $2: cflags +$(call debug_shell, $(CC) -c -Wall -Werror $2 $1 -o /dev/null && echo yes || echo no) +endef + +define find_dependency +$(call debug_shell, $(if $(PKG_CONFIG_LIBDIR),PKG_CONFIG_LIBDIR=$(PKG_CONFIG_LIBDIR),) $(PKG_CONFIG) --exists $1 && echo yes || echo no) +endef + +define dependency_cflags +$(call debug_shell, $(if $(PKG_CONFIG_LIBDIR),PKG_CONFIG_LIBDIR=$(PKG_CONFIG_LIBDIR),) $(PKG_CONFIG) --cflags $1 2>/dev/null) +endef + +define dependency_ldflags +$(call debug_shell, $(if $(PKG_CONFIG_LIBDIR),PKG_CONFIG_LIBDIR=$(PKG_CONFIG_LIBDIR),) $(PKG_CONFIG) --libs $1 2>/dev/null) endef define LIBPCI_TEST @@ -111,25 +123,6 @@ int main(int argc, char **argv) endef export LIBJAYLINK_TEST -define FTDI_TEST -#include <stdlib.h> -#include <ftdi.h> -struct ftdi_context *ftdic = NULL; -int main(int argc, char **argv) -{ - (void) argc; - (void) argv; - return ftdi_init(ftdic); -} -endef -export FTDI_TEST - -define FTDI_232H_TEST -#include <ftdi.h> -enum ftdi_chip_type type = TYPE_232H; -endef -export FTDI_232H_TEST - define NI845X_TEST #include <ni845x.h> |