target/arm_adi_v5,arm_dap: introduce pre_connect_init() dap operation
[openocd.git] / Makefile.am
blob153c471a9b8021a339c65fcb02a396ae60b43bff
1 # SPDX-License-Identifier: GPL-2.0-or-later
3 # not a GNU package. You can remove this line, if
4 # have all needed files, that a GNU package needs
5 AUTOMAKE_OPTIONS = gnu 1.6
7 .DELETE_ON_ERROR:
9 # make sure we pass the correct jimtcl flags to distcheck
10 DISTCHECK_CONFIGURE_FLAGS = --disable-install-jim
12 # do not run Jim Tcl tests (esp. during distcheck)
13 check-recursive: SUBDIRS :=
15 nobase_dist_pkgdata_DATA = \
16         contrib/libdcc/dcc_stdio.c \
17         contrib/libdcc/dcc_stdio.h \
18         contrib/libdcc/example.c \
19         contrib/libdcc/README \
20         contrib/60-openocd.rules
22 SUBDIRS =
23 DIST_SUBDIRS =
24 bin_PROGRAMS =
25 noinst_LTLIBRARIES =
26 info_TEXINFOS =
27 dist_man_MANS =
28 EXTRA_DIST =
29 DISTCLEANFILES =
31 if INTERNAL_JIMTCL
32 SUBDIRS += jimtcl
33 DIST_SUBDIRS += jimtcl
34 EXTRA_DIST += jimtcl/configure.gnu
35 # jimtcl from 0.79 to 0.82 miss cleaning jsmn.o
36 DISTCLEANFILES += jimtcl/jsmn/jsmn.o
37 endif
39 # common flags used in openocd build
40 AM_CFLAGS = $(GCC_WARNINGS)
42 AM_CPPFLAGS = $(HOST_CPPFLAGS)\
43                           -I$(top_srcdir)/src \
44                           -I$(top_builddir)/src \
45                           -DPKGDATADIR=\"$(pkgdatadir)\" \
46                           -DBINDIR=\"$(bindir)\"
48 if INTERNAL_JIMTCL
49 AM_CPPFLAGS += -I$(top_srcdir)/jimtcl \
50                            -I$(top_builddir)/jimtcl
51 endif
52 EXTRA_DIST += \
53         BUGS \
54         HACKING \
55         NEWTAPS \
56         README.Windows \
57         README.macOS \
58         $(EXTRA_DIST_NEWS) \
59         Doxyfile.in \
60         LICENSES/license-rules.txt \
61         LICENSES/exceptions/eCos-exception-2.0 \
62         LICENSES/preferred/BSD-1-Clause \
63         LICENSES/preferred/BSD-2-Clause \
64         LICENSES/preferred/BSD-2-Clause-Views \
65         LICENSES/preferred/BSD-3-Clause \
66         LICENSES/preferred/BSD-Source-Code \
67         LICENSES/preferred/CC0-1.0 \
68         LICENSES/preferred/GFDL-1.2 \
69         LICENSES/preferred/gfdl-1.2.texi.readme \
70         LICENSES/preferred/GPL-2.0 \
71         LICENSES/preferred/LGPL-2.1 \
72         LICENSES/preferred/MIT \
73         LICENSES/stand-alone/GPL-3.0 \
74         tools/logger.pl \
75         tools/rlink_make_speed_table \
76         tools/st7_dtc_as \
77         contrib
79 libtool: $(LIBTOOL_DEPS)
80         $(SHELL) ./config.status --recheck
82 docs: pdf html doxygen
84 Doxyfile: $(srcdir)/Doxyfile.in
85         @echo "Creating $@ from $<..."
86         @( \
87           echo "### @@@ -= DO NOT EDIT THIS FILE =- @@@ ###" && \
88           echo "### @@@ Make changes to Doxyfile.in @@@ ###" && \
89           sed -e 's,@srcdir\@,$(srcdir),' \
90             -e 's,@builddir\@,$(builddir),' \
91             -e 's,@doxygen_as_html\@,$(doxygen_as_html),' \
92             -e 's,@doxygen_as_pdf\@,$(doxygen_as_pdf),' $< \
93         ) > $@
95 THE_MANUAL = doxygen/latex/refman.pdf
97 doxygen::
98         $(MAKE) Doxyfile
99         doxygen Doxyfile 2>&1 | perl $(srcdir)/tools/logger.pl > doxygen.log
100         @if [ -f doxygen/latex/refman.tex ]; then \
101                 echo "Creating $(THE_MANUAL)..."; \
102                 $(MAKE) $(THE_MANUAL); \
103         else \
104                 echo "Skipping Doxygen PDF..."; \
105         fi
107 $(THE_MANUAL): %.pdf: %.tex
108         -cd $$(dirname $*) && pdflatex $$(basename $*)
109         -cd $$(dirname $*) && pdflatex $$(basename $*)
111 TCL_PATH = tcl
112 # command to find paths of script files, relative to TCL_PATH
113 TCL_FILES = find $(srcdir)/$(TCL_PATH) -name '*.cfg' -o -name '*.tcl' -o -name '*.txt' | \
114                 sed -e 's,^$(srcdir)/$(TCL_PATH),,'
116 dist-hook:
117         if test -d $(srcdir)/.git -a \( ! -e $(distdir)/ChangeLog -o -w $(distdir)/ChangeLog \) ; then \
118                 git --git-dir $(srcdir)/.git log | $(srcdir)/tools/git2cl/git2cl > $(distdir)/ChangeLog ; \
119         fi
120         for i in $$($(TCL_FILES)); do \
121                 j="$(distdir)/$(TCL_PATH)/$$i" && \
122                 mkdir -p "$$(dirname $$j)" && \
123                 $(INSTALL_DATA) $(srcdir)/$(TCL_PATH)/$$i $$j; \
124         done
126 install-data-hook:
127         for i in $$($(TCL_FILES)); do \
128                 j="$(DESTDIR)$(pkgdatadir)/scripts/$$i" && \
129                 mkdir -p "$$(dirname $$j)" && \
130                 $(INSTALL_DATA) $(srcdir)/$(TCL_PATH)/$$i $$j; \
131         done
133 uninstall-hook:
134         rm -rf $(DESTDIR)$(pkgdatadir)/scripts
136 distclean-local:
137         rm -rf Doxyfile doxygen
138         -rm -f $(srcdir)/jimtcl/configure.gnu
140 DISTCLEANFILES += doxygen.log
142 METASOURCES = AUTO
144 BUILT_SOURCES =
145 CLEANFILES =
147 MAINTAINERCLEANFILES = \
148         %D%/INSTALL \
149         %D%/configure \
150         %D%/Makefile.in \
151         %D%/depcomp \
152         %D%/config.guess \
153         %D%/config.sub \
154         %D%/config.h.in \
155         %D%/config.h.in~ \
156         %D%/compile \
157         %D%/ltmain.sh \
158         %D%/missing \
159         %D%/aclocal.m4 \
160         %D%/install-sh \
161         %D%/texinfo.tex
163 include src/Makefile.am
164 include doc/Makefile.am