target/cortex_m: support Infineon Cortex-M33 from SLx2 MCU
[openocd.git] / Makefile.am
bloba4f77adc2d39ae6d4f9cf4c1ae5f56f48b5316b3
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/GFDL-1.2 \
68         LICENSES/preferred/gfdl-1.2.texi.readme \
69         LICENSES/preferred/GPL-2.0 \
70         LICENSES/preferred/LGPL-2.1 \
71         LICENSES/preferred/MIT \
72         LICENSES/stand-alone/GPL-3.0 \
73         tools/logger.pl \
74         tools/rlink_make_speed_table \
75         tools/st7_dtc_as \
76         contrib
78 libtool: $(LIBTOOL_DEPS)
79         $(SHELL) ./config.status --recheck
81 docs: pdf html doxygen
83 Doxyfile: $(srcdir)/Doxyfile.in
84         @echo "Creating $@ from $<..."
85         @( \
86           echo "### @@@ -= DO NOT EDIT THIS FILE =- @@@ ###" && \
87           echo "### @@@ Make changes to Doxyfile.in @@@ ###" && \
88           sed -e 's,@srcdir\@,$(srcdir),' \
89             -e 's,@builddir\@,$(builddir),' \
90             -e 's,@doxygen_as_html\@,$(doxygen_as_html),' \
91             -e 's,@doxygen_as_pdf\@,$(doxygen_as_pdf),' $< \
92         ) > $@
94 THE_MANUAL = doxygen/latex/refman.pdf
96 doxygen::
97         $(MAKE) Doxyfile
98         doxygen Doxyfile 2>&1 | perl $(srcdir)/tools/logger.pl > doxygen.log
99         @if [ -f doxygen/latex/refman.tex ]; then \
100                 echo "Creating $(THE_MANUAL)..."; \
101                 $(MAKE) $(THE_MANUAL); \
102         else \
103                 echo "Skipping Doxygen PDF..."; \
104         fi
106 $(THE_MANUAL): %.pdf: %.tex
107         -cd $$(dirname $*) && pdflatex $$(basename $*)
108         -cd $$(dirname $*) && pdflatex $$(basename $*)
110 TCL_PATH = tcl
111 # command to find paths of script files, relative to TCL_PATH
112 TCL_FILES = find $(srcdir)/$(TCL_PATH) -name '*.cfg' -o -name '*.tcl' -o -name '*.txt' | \
113                 sed -e 's,^$(srcdir)/$(TCL_PATH),,'
115 dist-hook:
116         if test -d $(srcdir)/.git -a \( ! -e $(distdir)/ChangeLog -o -w $(distdir)/ChangeLog \) ; then \
117                 git --git-dir $(srcdir)/.git log | $(srcdir)/tools/git2cl/git2cl > $(distdir)/ChangeLog ; \
118         fi
119         for i in $$($(TCL_FILES)); do \
120                 j="$(distdir)/$(TCL_PATH)/$$i" && \
121                 mkdir -p "$$(dirname $$j)" && \
122                 $(INSTALL_DATA) $(srcdir)/$(TCL_PATH)/$$i $$j; \
123         done
125 install-data-hook:
126         for i in $$($(TCL_FILES)); do \
127                 j="$(DESTDIR)$(pkgdatadir)/scripts/$$i" && \
128                 mkdir -p "$$(dirname $$j)" && \
129                 $(INSTALL_DATA) $(srcdir)/$(TCL_PATH)/$$i $$j; \
130         done
132 uninstall-hook:
133         rm -rf $(DESTDIR)$(pkgdatadir)/scripts
135 distclean-local:
136         rm -rf Doxyfile doxygen
137         -rm -f $(srcdir)/jimtcl/configure.gnu
139 DISTCLEANFILES += doxygen.log
141 METASOURCES = AUTO
143 BUILT_SOURCES =
144 CLEANFILES =
146 MAINTAINERCLEANFILES = \
147         %D%/INSTALL \
148         %D%/configure \
149         %D%/Makefile.in \
150         %D%/depcomp \
151         %D%/config.guess \
152         %D%/config.sub \
153         %D%/config.h.in \
154         %D%/config.h.in~ \
155         %D%/compile \
156         %D%/ltmain.sh \
157         %D%/missing \
158         %D%/aclocal.m4 \
159         %D%/install-sh \
160         %D%/texinfo.tex
162 include src/Makefile.am
163 include doc/Makefile.am