libusb: require pkg-config support
[openocd.git] / src / helper / Makefile.am
1 include $(top_srcdir)/common.mk
2
3 METASOURCES = AUTO
4 noinst_LTLIBRARIES = libhelper.la
5
6 CONFIGFILES = options.c time_support_common.c
7
8 libhelper_la_CPPFLAGS = $(AM_CPPFLAGS) $(LIBUSB1_CFLAGS)
9
10 libhelper_la_SOURCES = \
11         binarybuffer.c \
12         $(CONFIGFILES) \
13         configuration.c \
14         log.c \
15         command.c \
16         time_support.c \
17         replacements.c \
18         fileio.c \
19         util.c \
20         jim-nvp.c
21
22 if IOUTIL
23 libhelper_la_SOURCES += ioutil.c
24 else
25 libhelper_la_SOURCES += ioutil_stubs.c
26 endif
27
28 libhelper_la_CFLAGS =
29 if IS_MINGW
30 # FD_* macros are sloppy with their signs on MinGW32 platform
31 libhelper_la_CFLAGS += -Wno-sign-compare
32 endif
33
34 noinst_HEADERS = \
35         binarybuffer.h \
36         configuration.h \
37         ioutil.h \
38         list.h \
39         util.h \
40         types.h \
41         log.h \
42         command.h \
43         time_support.h \
44         replacements.h \
45         fileio.h \
46         system.h \
47         bin2char.c \
48         jim-nvp.h
49
50 EXTRA_DIST = startup.tcl
51
52 BIN2C = bin2char$(EXEEXT_FOR_BUILD)
53
54 BUILT_SOURCES = $(BIN2C)
55
56 $(BIN2C): bin2char.c
57         ${CC_FOR_BUILD} ${CFLAGS_FOR_BUILD} $(srcdir)/bin2char.c -o $@
58
59 CLEANFILES = bin2char$(EXEEXT_FOR_BUILD)
60
61 MAINTAINERCLEANFILES = $(srcdir)/Makefile.in