libusb: introduce jtag_libusb_choose_interface() and use it for JLink
[openocd.git] / Makefile.am
blob2ddc96d3d39895032abbc6a3f4eb4083b7280ae0
1 # not a GNU package. You can remove this line, if
2 # have all needed files, that a GNU package needs
3 AUTOMAKE_OPTIONS = gnu 1.6
5 # make sure we pass the correct jimtcl flags to distcheck
6 DISTCHECK_CONFIGURE_FLAGS = --disable-install-jim
8 nobase_dist_pkgdata_DATA = \
9         contrib/libdcc/dcc_stdio.c \
10         contrib/libdcc/dcc_stdio.h \
11         contrib/libdcc/example.c \
12         contrib/libdcc/README \
13         contrib/99-openocd.rules
15 if INTERNAL_JIMTCL
16 SUBDIRS = jimtcl
17 else
18 SUBDIRS =
19 endif
21 SUBDIRS += src doc
23 EXTRA_DIST = \
24         BUGS \
25         HACKING \
26         NEWTAPS \
27         README.Windows \
28         README.OSX \
29         $(wildcard $(srcdir)/NEWS*) \
30         Doxyfile.in \
31         tools/logger.pl \
32         tools/rlink_make_speed_table \
33         tools/st7_dtc_as \
34         contrib
36 libtool: $(LIBTOOL_DEPS)
37         $(SHELL) ./config.status --recheck
39 docs: pdf html doxygen
41 Doxyfile: $(srcdir)/Doxyfile.in
42         @echo "Creating $@ from $<..."
43         @( \
44           echo "### @@@ -= DO NOT EDIT THIS FILE =- @@@ ###" && \
45           echo "### @@@ Make changes to Doxyfile.in @@@ ###" && \
46           sed -e 's,@srcdir\@,$(srcdir),' \
47             -e 's,@builddir\@,$(builddir),' \
48             -e 's,@doxygen_as_html\@,$(doxygen_as_html),' \
49             -e 's,@doxygen_as_pdf\@,$(doxygen_as_pdf),' $< \
50         ) > $@
52 THE_MANUAL = doxygen/latex/refman.pdf
54 doxygen::
55         $(MAKE) Doxyfile
56         doxygen Doxyfile 2>&1 | perl $(srcdir)/tools/logger.pl > doxygen.log
57         @if [ -f doxygen/latex/refman.tex ]; then \
58                 echo "Creating $(THE_MANUAL)..."; \
59                 $(MAKE) $(THE_MANUAL); \
60         else \
61                 echo "Skipping Doxygen PDF..."; \
62         fi
64 $(THE_MANUAL): %.pdf: %.tex
65         -cd $$(dirname $*) && pdflatex $$(basename $*)
66         -cd $$(dirname $*) && pdflatex $$(basename $*)
68 TCL_PATH = tcl
69 # command to find paths of script files, relative to TCL_PATH
70 TCL_FILES = find $(srcdir)/$(TCL_PATH) -name '*.cfg' -o -name '*.tcl' -o -name '*.txt' | \
71                 sed -e 's,^$(srcdir)/$(TCL_PATH),,'
73 dist-hook:
74         if test -d $(srcdir)/.git -a \( ! -e $(distdir)/ChangeLog -o -w $(distdir)/ChangeLog \) ; then \
75                 git --git-dir $(srcdir)/.git log | $(srcdir)/tools/git2cl/git2cl > $(distdir)/ChangeLog ; \
76         fi
77         for i in $$($(TCL_FILES)); do \
78                 j="$(distdir)/$(TCL_PATH)/$$i" && \
79                 mkdir -p "$$(dirname $$j)" && \
80                 $(INSTALL_DATA) $(srcdir)/$(TCL_PATH)/$$i $$j; \
81         done
83 install-data-hook:
84         for i in $$($(TCL_FILES)); do \
85                 j="$(DESTDIR)$(pkgdatadir)/scripts/$$i" && \
86                 mkdir -p "$$(dirname $$j)" && \
87                 $(INSTALL_DATA) $(srcdir)/$(TCL_PATH)/$$i $$j; \
88         done
90 uninstall-hook:
91         rm -rf $(DESTDIR)$(pkgdatadir)/scripts
93 distclean-local:
94         rm -rf Doxyfile doxygen
95         rm -f $(srcdir)/jimtcl/configure.gnu
97 DISTCLEANFILES = doxygen.log
99 MAINTAINERCLEANFILES = \
100         $(srcdir)/INSTALL \
101         $(srcdir)/configure \
102         $(srcdir)/Makefile.in \
103         $(srcdir)/depcomp \
104         $(srcdir)/config.guess \
105         $(srcdir)/config.sub \
106         $(srcdir)/config.h.in \
107         $(srcdir)/config.h.in~ \
108         $(srcdir)/compile \
109         $(srcdir)/ltmain.sh \
110         $(srcdir)/missing \
111         $(srcdir)/aclocal.m4 \
112         $(srcdir)/install-sh